Andrew Lyle Global Moderator Posted December 31, 2008 Global Moderator Share Posted December 31, 2008 I recently moved hosts, and can't seem to find the answer on why things aren't working, but think I have a clue why. I use my .htaccess to modify the php.ini (shared host) with things like: <IfModule mod_php4.c> php_value upload_max_filesize 11M php_value max_execution_time 800 php_value post_max_size 64M </IfModule> which always worked on the old server, but since going from PHP4 to PHP5 (even modifying the first line doesn't work <IfModule mod_php5.c> I noticed the upload_tmp_dir in my is set to "no value" the same thing that gave me problems in the past, but that was over 2 years ago. I have tried: ini_set('upload_tmp_dir', '/Storage/tmp/'); but to no success. Anyone got any idea how I can modify my php.ini? Link to comment https://www.neowin.net/forum/topic/715626-htaccess-and-mod_php/ Share on other sites More sharing options...
0 fatboyuk Posted December 31, 2008 Share Posted December 31, 2008 I do something similar on PHP5 but I don't use the first and last lines in your example, just put the php_value lines in and give it a go. If the new host has something like suPHP set up you won't be able to use php_value commands in your htaccess file, but you should be able to create a file called php.ini to put the commands in - this will over ride the server php.ini with your values. TO see if there is a problem with suPHP look in your error log in the control panel (if you have any!) - if you see something like 'invalid command php_value ' you are on a box with suPHP meaning you will have to use the php.ini method HTH Link to comment https://www.neowin.net/forum/topic/715626-htaccess-and-mod_php/#findComment-590341634 Share on other sites More sharing options...
0 Andrew Lyle Global Moderator Posted December 31, 2008 Author Global Moderator Share Posted December 31, 2008 I contacted my host, and they never gave me a solid answer, but did provide a solution for me, by adding a php.ini, and modifying the original php.ini so it can also read the new custom one. Link to comment https://www.neowin.net/forum/topic/715626-htaccess-and-mod_php/#findComment-590344088 Share on other sites More sharing options...
0 seb86 Posted January 2, 2009 Share Posted January 2, 2009 Try using this instead. <IfModule mod_rewrite.c> Link to comment https://www.neowin.net/forum/topic/715626-htaccess-and-mod_php/#findComment-590350842 Share on other sites More sharing options...
0 Mathachew Veteran Posted January 2, 2009 Veteran Share Posted January 2, 2009 admin2gd1 said: Try using this instead. <IfModule mod_rewrite.c> He's not looking to do any rewriting, at least he hasn't stated this. This could be caused by a number of things, but I would try what your host actually stated. While .htaccess may work, I believe it's possible to restrict PHP configuration changes via .htaccess, especially when it comes to the upload limit; hosts don't like letting anyone set that to whatever they want. Link to comment https://www.neowin.net/forum/topic/715626-htaccess-and-mod_php/#findComment-590350908 Share on other sites More sharing options...
Question
Andrew Lyle Global Moderator
I recently moved hosts, and can't seem to find the answer on why things aren't working, but think I have a clue why.
I use my .htaccess to modify the php.ini (shared host) with things like:
which always worked on the old server, but since going from PHP4 to PHP5 (even modifying the first line doesn't work
I noticed the upload_tmp_dir in my is set to "no value" the same thing that gave me problems in the past, but that was over 2 years ago.
I have tried:
but to no success.
Anyone got any idea how I can modify my php.ini?
Link to comment
https://www.neowin.net/forum/topic/715626-htaccess-and-mod_php/Share on other sites
4 answers to this question
Recommended Posts