Invalid Image Error Solved
|
atlantis
Joined: 2003-07-03
Posts: 12 |
Posted: Thu, 2003-07-03 20:01
|
|
I would get an "Inavlid Image" error on some of the images I was trying to upload using ImageMagick. Debug mode didn't help. I finally found the problem. Apparently the UPLOAD_MAX_FILESIZE value in my php.ini file was set at 2M. I changed it to 6M and now I can upload my images (and movies). c:\winnt\php.ini ; Maximum allowed size for uploaded files. ---- Gallery version: 1.3.3 |
|
| Login or register to post comments |

Posts: 4
any idea of the command to do this for UNIX?
I can't seem to find the php.ini file, is it hidden?
Posts: 8186
setup/phpinfo.php (when Gallery is in config mode) will show you where it is.
Posts: 12
From http://www.php.net/manual/en/faq.installation.php#faq.installation.phpini
By default on Unix it should be in /usr/local/lib which is <install-path>/lib. Howver, most people will change this at compile-time. Another common place to check is /etc/php.ini.
-*-
This may also help:
pettijhn at uiuc dot edu
07-Nov-2003 12:23
http://www.php.net/manual/en/configuration.php#configuration.file
"After setting a bunch of variables trying to fix a file upload error (files over a certain size resulted in the connection dying), I learned that in /etc/httpd/conf.d/php.conf there is a line LimitRequestBody 524288. Comment that out, restart apache."[/url]
Posts: 1
/usr/local/php5/lib
There are other php.ini files, but changing them does not affect the server's behavior.
Refer to this FAQ for more information:
FAQ Gallery:c.6
Posts: 3
FYI
php.ini is not visible or changable for people being hosted on a shared server.
Call your web host and they may change it from the default value (2M) to 8M so it will be at least equal your max_post value.
Jeff
Posts: 36
question, i asked netfirms to change the php.ini file they said they cant do that now, so is there any other way i can get around this?
Posts: 1
I read all of the posts but still couldn't get over the 2MB problem. On my Startlogic server they have the php.ini file located in /usr/local/lib/php.ini set to:
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
Since I doubted that they would change it I looked for other ways. For Gallery2 I installed the data folder with the default name of g2data in my home directory not accessible from the web. I tried adding a php.ini in the gallery2 and g2data directories with the following but it did not eliminate the >2MB upload problem:
post_max_size = 12M
upload_max_filesize = 12M
I also tried modifying the .htaccess file in the g2data directory since that is the only location where that file existed by adding following:
php_value post_max_size 80000000
php_value upload_max_filesize 80000000
but that did not work either.
*** The SOLUTION that did work for me ***:
Create another .htaccess in the gallery2 folder.. the one that is accessible from the web located in your public_html directory and put the following in the file for up to 80MB post and upload capability:
php_value post_max_size 80000000
php_value upload_max_filesize 80000000
php_value magic_quotes_gpc off
Posts: 1
I just wanted to add my findings:
I did all of the above, but was still having problems. It turns out, two things were wrong:
1. php overrides were not turned on (settings in .htaccess were being ingored)
2. there was a php.ini file and a php4.ini file. The php4.ini file was the one being used and limiting my uploads to 2M. Changed it to 64M and it worked just fine.
Posts: 1
I've been fighting this problem for years and I finally figured it out. I'm running MacOSX Server 10.4.x and the problem was in the file at /etc/php.ini.default and all I had to do is change the following line:
upload_max_filesize = 2M
to
upload_max_filesize = 20M
I still can't get it to allow .htaccess files, but at least I can upload large photos now. Woot!
--
Bobby Kinstle