| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| DNOA Member | PHP uploading problems Hello... I have an upload script that I found online (I've only worked with uploads once in my life, and it didn't involve image resizing): PHP Code: Any help appreciated Thanks..chulium. (I didn't include *ALL* of the code, like the form, etc, but everything else is working fine. I've spent hours trying to debug this script... trust me on the previous code: it's good.)
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #4 (permalink) |
| DNOA Member | No, the upload doesn't work at all... I CHMOD'ed everything to 777 (well, everything being the upload directory I made)...
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #6 (permalink) |
| DNOA Member | I did of course ![]() Any other ideas? :-/
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #7 (permalink) |
| NamePros Member | 1, where are you defining the $_FILE ? all I see is $imgfile 2, does your server support Imagemajik/system() commands? 3, is $uploaddir set anywhere and to the same folder you have chmodd? 4, Have you tried dumping what is uploaded i.e. PHP Code: |
| |
| | #8 (permalink) |
| DNOA Member | This might be easier... here's my whole code: PHP Code: Thanks.I actually have little idea of what I'm doing... So um, be nice ![]() Thanks! Help appreciated. Rep + .chulium.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #10 (permalink) |
| DNOA Member | Nope... that just made 2 more errors (both methods): Code: Warning: getimagesize(test.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/***/public_html/imgadmin/newimg.php on line 138 Warning: unlink(test.jpg) [function.unlink]: No such file or directory in /home/***/public_html/imgadmin/newimg.php on line 173 Warning: getimagesize(test.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/***/public_html/imgadmin/newimg.php on line 197 Warning: unlink(test.jpg) [function.unlink]: No such file or directory in /home/***/public_html/imgadmin/newimg.php on line 232 ![]() I do want to point out though that I'm duplicating the image variable ($imgfile2 and $imgfile) just on submission so I can turn one into a thumbnail, and just trim the other one down to size.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #11 (permalink) |
| DNOA Member | ...I still need help with this. Please? ![]() Suppose I offered a $10 USD PayPal reward when this works right?
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #12 (permalink) |
| Recovering Jerk Forum Moderator | Is your file even uploading? I prefer to use move_uploaded_file() and then make any changes to the file. Safe_mode restrictions normally prevent you from working on a file in the original tmp directory.
__________________ Proxy Filter SEO Tag Cloud Domain Name Generator Debate Forums Free Online Sudoku | My vBum Blog |
| |
| | #13 (permalink) |
| DNOA Member | It's not uploading ![]() I put in a quick error checker and changed the is_uploaded_file() to move_uploaded_file() and added the proper arguments for file and destination. I get an error now that it won't upload.... yet I'm not 100% sure why. Can anybody maybe write a quick, clean upload script as the ones I see on Google are either too simple, too complicated, or all contradict each other in methodology.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #14 (permalink) |
| Recovering Jerk Forum Moderator | Use hotscripts and find something free. Lots of things out there if you look hard enough. If you want a fairly full featured upload script try celerondude.com's script.
__________________ Proxy Filter SEO Tag Cloud Domain Name Generator Debate Forums Free Online Sudoku | My vBum Blog |
| |
| | #15 (permalink) |
| NamePros Regular | The php manual has a very detailed section on file uploads, including some sample code which has always worked for me and serves as the foundation for numerous image upload and manipulation scripts I've written: http://us3.php.net/manual/en/features.file-upload.php IMPORTANT: read the user comments at the bottom of the page. Lots of suggestions for things to look at if your upload still fails (various php.ini settings, permissions, etc.) |
| |
| | #16 (permalink) |
| DNOA Member | Thanks both. labrocca: I am using a simple, self-programmed gallery script for my photography site. Thanks for the suggestion, though. cef: I'll check it out; danke. If I still need help I'll update this thread.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |