Scooby08 Posted December 10, 2008 Share Posted December 10, 2008 I have been searching around for answers as to how I can change the php_ini settings without actually having access to that file.. I am trying to increase the size of files that one may upload.. I have tried a couple different ways so far.. First I tried putting this at the top of the page: <?php ini_set('post_max_size', '4M'); ini_set('upload_max_filesize', '4M'); ?> No luck there.. I have read somewhere that you cannot change these settings in the file itself. So then I tried through .htaccess file using this.. php_value post_max_size 4M php_value upload_max_filesize 4M Any ideas out there for me to try?? Link to comment https://forums.phpfreaks.com/topic/136428-php_ini/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 10, 2008 Share Posted December 10, 2008 Is php running as an Apache module or as a CGI application? And have you checked with your web host if they allow you to change those settings? You can only put php settings in a .htaccess file when php is running as an Apache module and your web host allows it. You can only put php settings in a local php.ini when php is running as a CGI application and your web host allows it. Link to comment https://forums.phpfreaks.com/topic/136428-php_ini/#findComment-712048 Share on other sites More sharing options...
phpSensei Posted December 10, 2008 Share Posted December 10, 2008 Ya I was going to say that maybe your web host because many don't allow you to change the max upload size. Ask them to increase it for you... Link to comment https://forums.phpfreaks.com/topic/136428-php_ini/#findComment-712051 Share on other sites More sharing options...
chronister Posted December 10, 2008 Share Posted December 10, 2008 you can try creating a local php.ini file. make a file called php.ini and set those values in it. Then run a php_info() script and see if that changes anything for you. Link to comment https://forums.phpfreaks.com/topic/136428-php_ini/#findComment-712070 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.