PDA

View Full Version : php.ini values? Largest upload file size?



Rich
11-18-2003, 10:56 AM
HI,

How can I find out the following settings which are contained in php.ini?

file_uploads
upload_tmp_dir
and most important to me upload_max_filesize

I have a file upload app which seems to bomb out about 2MB.

If I want this changed, is it simple to do or is there a good reason for the current settings?

I'm just starting to use php so sorry it this is obvious to the others.

thevillageinn
11-18-2003, 11:21 AM
stick this into a new php file and browse to it on your domain...it'll report the php and related apache settings on your server.


<?php
phpinfo();
?>

hope that helps-

also to answer your question specifically on WWW9 which is where my site is...
1. On
2. No Value
3. 10M

Rich
11-18-2003, 12:33 PM
And that explains why I can't upload more than 2MB! My server is set to 2M!

I guess I need a help desk ticket.

Is there a good reason why one might want a 2M limit over a 10M or other?

Is there a good way to include php.ini into php scripts so I don't have to guess at these values?

The script I have uses a hardcoded max file size value, but does not include php.ini and use these values which I would think is the best way.

Thanks, that helps a lot!

thevillageinn
11-18-2003, 09:42 PM
I don't know enough at all about php to know about making local changes to php.ini, but I believe you can not make changes to php.ini because php is configured at httpd start, and the config file is not in an accessible location. plus php doesn't scan for additional configuration on each php call, like apache does for the .htaccess for each page served.

submit a help desk ticket, make sure you mention the defaults in the script you are using, Joe and Nick will probably be able to accomodate you, or explain why not.

Rich
11-19-2003, 03:54 PM
Thanks. Right now I'm at 2MB. I'll see if my users can live with this.

I have changed my script to read the setting from PHP.INI so that if/when we change the limit on the server I won't have to recode my script.

If we need more, I'll get it increased via a help desk ticket. But it's funny to hear that some servers are set differently than others.

Joe
11-19-2003, 05:31 PM
Each server is set by default to 2M - it takes a manual change to up them. I just went through them all - you should be all set now.

Joe

Rich
11-19-2003, 06:49 PM
Joe... Wow!

I feel like a kid in a candy store! I was testing my script and I guess it works, all of a sudden my 2M ceiling was blown away 16X!! :D

And I didn't even have to enter a help ticket!

Joe
11-19-2003, 07:56 PM
We can't always answer requests via the forums, but we try :)

stangz
11-19-2003, 08:58 PM
Originally posted by NHFTRich@Nov 19 2003, 05:49 PM
Joe... Wow!

And I didn't even have to enter a help ticket!
The support here is phenomenal. You submit a help ticket and within at most an hour there is a response but closer to like 5 minutes at any hour of the day (I dont think they sleep lol)...

Joe
11-09-2004, 06:20 PM
ah shucks! :)

Credit goes to my staff... your support team! Nick, Jeff, Dan, John do a BANG UP job!

Rich
11-14-2004, 07:29 PM
Well, I have to agree, you guys are very responsive! :D