File upload errors

theewok

Joined: 2002-08-24
Posts: 13
Posted: Sat, 2002-08-24 18:27

Everytime I try uploading a file anywhere into my gallery, it will come up with this error message. I've checked out my permissions and things seem to be fine there. All of the netpbm programs are up-to-date, the config files work fine w/o errors. I also have tried a new gallery from scratch and it does the same thing. It used to work just fine and dandy, but doesn't now! If I enter a URL of an image to add, that works. I also use PHP-Nuke 5.5, but if I use it alone instead of as a module, it still does the same thing. Any ideas?

Apache 1.3.22
Php version 4.0.6
upload_max_filesize = 128M
file_uploads = On

------------ WITHOUT DEBUG -------------

Processing status...
- Adding 12fingeredman.jpg
Warning: Unable to open 'none' for reading: No such file or directory in /www/htdocs/www.theewok.net/modules/Gallery/platform/fs_unix.php on line 24

Error: Invalid image: 12fingeredman.jpg!

-------------- WITH DEBUG ------------------

Processing status...
- Adding 12fingeredman.jpg
Warning: Unable to open 'none' for reading: No such file or directory in /www/htdocs/www.theewok.net/modules/Gallery/platform/fs_unix.php on line 24

Executing:

/usr/local/netpbm/bin/jpegtopnm /www/htdocs/www.theewok.net/modules/Gallery/albums/Wallpaper/12fingeredman.jpg | /usr/local/netpbm/bin/pnmfile --allimages

Results:

stdin: Image 0:

Error messages:

jpegtopnm: Can't open /www/htdocs/www.theewok.net/modules/Gallery/albums/Wallpaper/12fingeredman.jpg. Errno=No such file or directory(2).
pnmfile: Error reading magic number from PBM file. Most often, this means your input file is empty.

Status: 1 (expected 0)
Error: Invalid image: 12fingeredman.jpg!
Need help? Look in the Gallery FAQ

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2002-08-25 18:15

This is probably FAQ C.14.

 
theewok

Joined: 2002-08-24
Posts: 13
Posted: Mon, 2002-08-26 02:18

That's something I've already checked and its enabled -- and it tells me that in phpinfo().

Now i've tried a couple of simple other php scripts and am unable to upload a file. So perhaps it looks like a problem w/ some configuration w/ php or Apache. Any ideas?

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Mon, 2002-08-26 20:22

If you have shell access, try executing the command manually and see what
you get with results. If things suddenly changed, try contacting your webhost
to find out what they changed, if they changed anything.

 
theewok

Joined: 2002-08-24
Posts: 13
Posted: Mon, 2002-08-26 23:47

I host it myself. I've tried the netpbm commands and they execute just fine and dandy.

 
KungFoo

Joined: 2002-08-22
Posts: 12
Posted: Tue, 2002-08-27 01:57

I am having a similar problem. When I try to upload a file I receive this error:

Processing status...
- Adding aestack[1].jpg jpegtopnm: Can't open d:htmlusersarchEnemiesnethtmlcontentmultimediagalleryalbumsalbum01aestack_1.jpg. Errno=No such file or directory(2). pnmfile: EOF / read error reading magic number
Error: Invalid image: aestack_1.jpg!

My webhost is a Win2000/IIS5, they have PHP 4.0.6 installed. I do not have Shell access to my website. I'm not sure what other information is relevant to my problem. If you'd like more information feel free to ask. I did a google search for my error message and found a few hits. Apparently my problem is not a new one, on a Win2k/IIS5 setup I read that someone was having this very same problem about a year ago. So I was wondering if maybe a solution to this problem has been found? Any help is appreciated.
Thank You

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-08-27 05:15
Quote:
That's something I've already checked and its enabled -- and it tells me that in phpinfo().

Now i've tried a couple of simple other php scripts and am unable to upload a file. So perhaps it looks like a problem w/ some configuration w/ php or Apache. Any ideas?

Would you send us a pointer to your phpinfo() output, please? Thanks.

 
theewok

Joined: 2002-08-24
Posts: 13
Posted: Tue, 2002-08-27 15:34
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-08-28 03:07

Ok, I've identified the culprit. Your local upload_max_filesize is set to 0 bytes! This is instructing PHP not to accept any uploads. Gallery attempts to overload this value in the .htaccess file it creates. Check there and make sure that it's setting your limit to a sane value. Or just remove the php_value lines from your Gallery .htaccess file and keep tweaking it until your phpinfo() reports a reasonable upload size.

 
KungFoo

Joined: 2002-08-22
Posts: 12
Posted: Wed, 2002-08-28 06:13

If I post my php info from my webhost do you think you might be able to find my problem?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2002-08-29 05:18

I'll try, if you're running a supported webserver (last I recall you were using IIS).

 
theewok

Joined: 2002-08-24
Posts: 13
Posted: Fri, 2002-08-30 05:26

I've tried every which way to get the local value to equal the master value but I can't seem to get it to. I've tried not using the .htaccess file from Gallery, setting the value in Apache, tried the php.ini file, and everything else, yet on a phpinfo it still shows 0 for the max upload.

Any other ideas on how to set that correctly?

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Fri, 2002-08-30 07:09

Well, just checked your phpinfo, the local value is 2MB's which is normally fine.
If you want to set the main value, you'll need to edit the your php.ini file
listed in the phpinfo output. also, if you are running php as a module to apache,
then you also need to restart apache for any php config changes to take effect.

 
theewok

Joined: 2002-08-24
Posts: 13
Posted: Fri, 2002-08-30 14:06
Quote:
Well, just checked your phpinfo, the local value is 2MB's which is normally fine.
If you want to set the main value, you'll need to edit the your php.ini file
listed in the phpinfo output. also, if you are running php as a module to apache,
then you also need to restart apache for any php config changes to take effect.

Either I'm reading something wrong or your seeing something different than I. My Master value is 2mb but my Local value is still 0. And I do have it set in my php.ini file to be 2mb, hence the Master value being what it is. I also do restart Apache after each change to my php.ini file.