22, November 2008

Getting Started - "Success" message but no file... - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: Getting Started - "Success" message but no file...
« previous next »
Pages: [1] Print

Author Topic: Getting Started - "Success" message but no file...  (Read 1639 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: Male
Posts: 6440
39464 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


Last blog : Just a better Internet portal provided by Google
Google dot what?
*
Posts: 2
22 credits
Members referred : 0


« Reply #2 on: Oct 21, 2006, 12:40:52 AM »

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.  Smiley

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: Male
Posts: 6440
39464 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.


Last blog : Just a better Internet portal provided by Google
Google dot what?
*
Posts: 2
12 credits
Members referred : 0


« Reply #4 on: Nov 12, 2006, 07:36:38 PM »

same problem here Cry
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 Cry

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
Tags : php forums directories Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: Getting Started - "Success" message but no file...
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Nov 22, 2008, 02:44:35 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 37.736
Total Topics: 7.650
Total Members: 4.396
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: thomas09

24 Guests, 4 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.