Jump to content

php_ini


Scooby08

Recommended Posts

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

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

Archived

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

×
×
  • Create New...

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.