Jump to content

Archived

This topic is now archived and is closed to further replies.

jmh754

Any way to edit php.ini remotely w/o root access?

Recommended Posts

Hi, I am in need of a way to change php's upload_max_filesize setting even though I can't access the server's php.ini file.  I seem to remember doing this somehow in the past, though it was a while back and I can't remember if I'm making it up or not.  I'm also trying to get my hosting company to change it for me, but their online help ticket system is apparently broken, and access to their forums is pending...sigh.  Any help would be much appreciated.

Jason

Share this post


Link to post
Share on other sites
You might be able to use ini_set to temporarily ajust the the max upload size for your script only, like so:
[code]ini_set('upload_max_filesize', syze_in_bytes);[/code]
change size_in_bytes to the max file size you'll accept a file to be in bytes. For example 1048576 bytes will equal to 1MegaByte

Share this post


Link to post
Share on other sites
You probably want to use the ini_set() function (http://www.php.net/ini_set)

Ken

Share this post


Link to post
Share on other sites
take a look at what mode your host is running php under. if it's CLI or CGI mode, you can create your own php.ini in the folder that you need the changes to apply.
http://us3.php.net/manual/en/configuration.php#configuration.file

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.