Topic: Getting Started - "Success" message but no file... (Read 1655 times)
Google dot what?
Posts: 2
22 credits Members referred : 0
« on: Oct 19, 2006, 11:21:09 PM »
Hello -
I'm new to PHP but need a way for files to be uploaded to a specific directory on a host server. I've tested the "foto_upload.php" file because that's the one that seems to do what I want it to do.
I've installed it on a host, placing the the "upload_class.php" file in a "/classes/upload/" directory as directed on line 2:
Code:
include ($_SERVER['DOCUMENT_ROOT']."/classes/upload/upload_class.php");
I've created the directories: "/test_files/" and it's sub-directories as listed on lines 114, 115, and 116:
Code:
$foto_upload->upload_dir = $_SERVER['DOCUMENT_ROOT']."/test_files/"; // "files" is the folder for the uploaded files (you have to create these folder) $foto_upload->foto_folder = $_SERVER['DOCUMENT_ROOT']."/test_files/photo/"; $foto_upload->thumb_folder = $_SERVER['DOCUMENT_ROOT']."/test_files/thumb/";
I've tested the form and everything seems to work. No errors, I get the "[file name] successfully uploaded!" message on the page, but when I check the directories, the file isn't there.
I've tried deleting the "photo" directory in the "/test_files/" directory, and when I try again, it automatically creates the "photo" directory as the notes indicate it should but the file still does not show up.
I gave full permissions (777) to all files and directories. Other than that, I'm using the downloaded files as is.
I'm assuming that the file should be appearing in the "photo" directory. Am I missing something? Any suggestions would be appreciated. Thanks.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6486
39748 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Oct 19, 2006, 11:41:43 PM »
I think that the upload is fine but you settings for resizing the images went wrong.
by default the script is using the Imagemagicks for transformations, check if IM is available other wise you need the GD option
I think that the upload is fine but you settings for resizing the images went wrong.
by default the script is using the Imagemagicks for transformations, check if IM is available other wise you need the GD option
I changed line 22 of "foto_upload.php" to:
Code:
var $use_image_magick = false; // switch between true and false
I tried it again, and the same thing happened. The files I'm trying to upload are pretty small. 24kb (621 x 707) and 12kb (193 x 239) respectively, could that be making a difference, since you are describing resizing the image?
Took me a while to figure out what ImageMagick vs "GD" was. I had to search through the forum to find explanations of the difference. like I said, I'm new.
But I still have a question: Are these applications loaded on the host server, or on my own computer? Could it be that they aren't uploading properly because both applications are missing?
Thanks again for the help.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6486
39748 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Oct 21, 2006, 08:30:06 AM »
please try the regular upload example first to see if the upload is working.
Google dot what?
Posts: 2
12 credits Members referred : 0
« Reply #4 on: Nov 12, 2006, 07:36:38 PM »
same problem here I've checking the code and upload is well done, but when it happens to execute the "convert blah blah" code it just fails. Well, it doesn't fail, but it never executes it. I've echoed the instruction and executed by myself in a terminal and it works. :-O
So, the problem is in the exec() on the thumbs() function. But I don't know how to solve it
Any help?
Google dot what?
Posts: 2
12 credits Members referred : 0
« Reply #5 on: Nov 12, 2006, 08:29:31 PM »
me again... i've solved it, just needed to add full path to "convert" ;-)
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4497