Web Hosting Talk







View Full Version : Local PHP.ini changes not Working?


arn
08-07-2002, 07:14 PM
...sigh....

this is such a simple thing... it frustrates me it doesn't work...

just trying to change the upload_max_filesize on a particular site.

I do phpinfo() on that site and get a 2M upload_max_filesize for Global and Local values.

I have a php.ini file in that same directory... upload_max_filesize = 10000000 and also tried it without the =.

Doesn't change any values. I even restarted apache.

So, I'm changing it in the master php.ini file... but I don't understand why it doesn't work.

Cpanel/Apache/PHP4 machine

arn

Starhost
08-07-2002, 08:39 PM
Are you editting the correct php.ini? (you can check this by looking at phpinfo(); there you will see the path of where teh php.ini has to be.

OneOfThem
08-07-2002, 08:43 PM
How about post_max_size ?

Check out this from the php.net site:


http://www.php.net/manual/en/configuration.php#ini.post-max-size

post_max_size integer
Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize.

If memory limit is enabled by configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.



Good luck

arn
08-07-2002, 08:58 PM
Originally posted by Starhost
Are you editting the correct php.ini? (you can check this by looking at phpinfo(); there you will see the path of where teh php.ini has to be.

This is the Global php.ini listed - correct? In the end I had to modify this to get it to work. I want it to only be changed on one site however...

My understanding was that PHP reads in a local version as well in directory of the script....

arn

apollo
08-08-2002, 10:31 AM
check out if you are editing correct script. Usually, people make mistakes by installing php in a different directory (not in default) and copying php.ini file to default location!

Check out phpinfo(); page for more info and paths, as user above already suggested!

Starhost
08-08-2002, 10:42 AM
If you would like to set it only for one virtualhost. You have to set it within the virtualhost section of the apache configuration file.

Do that by adding:

php_admin_value upload_max_filesize 10M