Jump to content


Photo

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


  • Please log in to reply
3 replies to this topic

#1 jmh754

jmh754
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 24 July 2006 - 02:54 PM

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

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 24 July 2006 - 03:03 PM

You might be able to use ini_set to temporarily ajust the the max upload size for your script only, like so:
ini_set('upload_max_filesize', syze_in_bytes);
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

#3 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 24 July 2006 - 03:04 PM

You probably want to use the ini_set() function (http://www.php.net/ini_set)

Ken

#4 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 24 July 2006 - 03:55 PM

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/m...figuration.file
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users