Ursidae Posted April 5, 2009 Share Posted April 5, 2009 I have several subordinate php.ini files that are not being recognized. For example in my main php.ini file the max_upload_filesize is 2MB. I have a script that uploads certain files that are usually larger than 2MB so I created a php.ini file that would be local to the php script and I set max_upload_filesize to 8MB. I receive errors when I try to upload anything larger than 2MB. I'm not sure what the problem is. Is there a setting I need to change either in Apache or the main php.ini file that allows lower level php.ini file to be used? Link to comment https://forums.phpfreaks.com/topic/152665-sub-phpini-files-not-recognized/ Share on other sites More sharing options...
corbin Posted April 5, 2009 Share Posted April 5, 2009 To load php.inis from the web root and what not, PHP must be running in CGI mode. If it's not running in CGI mode, you could use .htaccess to set settings. Link to comment https://forums.phpfreaks.com/topic/152665-sub-phpini-files-not-recognized/#findComment-801744 Share on other sites More sharing options...
Fruct0se Posted April 5, 2009 Share Posted April 5, 2009 Try adding this line to your htaccess file: php_value upload_max_filesize 8000000 Link to comment https://forums.phpfreaks.com/topic/152665-sub-phpini-files-not-recognized/#findComment-801747 Share on other sites More sharing options...
Ursidae Posted April 5, 2009 Author Share Posted April 5, 2009 Thanks, I'll see what I can do. The server I'm working on is remote and I only have read only access to php.ini and htaccess. Link to comment https://forums.phpfreaks.com/topic/152665-sub-phpini-files-not-recognized/#findComment-801751 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.