Change Php.ini

liunx

Guest
I need to enable, and turn off, a few php.ini settings for some scripting software I desire to install, SugarCRM, Opensource. Can you tell me how to do?<!--content-->
You make modifications in your .htaccess file. You cannot modify the php.ini file as that is server wide.<br /><br />What is it you need to change?<!--content-->
Here's the prompt "PHP Allow Call Time Pass Reference Turned Off Allow Call Time Pass Reference is On (this should be set to Off in php.ini)"<br /><!--content-->
in your .htaccess file try adding<br /><br />php_value allow_call_time_pass_reference 1<br /><br /><!--content-->
Thank you ... I'll give that a shot.<!--content-->
What would the script be to change session.gc_maxlifetime to 18000 for example? I hate when my sessions are timing out and would like to keep them from doing that. Would there be a con to setting them for that long? <br /><br />Also, since that is one of two things that I modified in .htaccess, is there anything that needs to seperate them, or just new line?<br /><br />Thanks,<br />-Jacques<!--content-->
<!--quoteo(post=210311:date=Aug 2 2007, 01:57 PM:name=jgingras)--><div class='quotetop'>QUOTE(jgingras @ Aug 2 2007, 01:57 PM) <a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=210311"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><div class='quotemain'><!--quotec-->What would the script be to change session.gc_maxlifetime to 18000 for example? I hate when my sessions are timing out and would like to keep them from doing that. Would there be a con to setting them for that long?<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->php_value session.gc_maxlifetime 18000<!--c2--></div><!--ec2--><br /><br />...would do the trick. But there are other things that can cause a session to expire if that doesn't solve your problem so you may want to google more on session management in php.<br /><br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Also, since that is one of two things that I modified in .htaccess, is there anything that needs to seperate them, or just new line?<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Each command just has to be on it's own line. You do not need any other separators (although blank lines are allowed if you want to use them just for better readability).<!--content-->
Since we do not have access to PHP.INI, I used .htaccess. In my .htaccess, I have definitions:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->[...]<br /> php_flag register_globals off<br /> php_flag    display_errors          on<br /> php_flag    display_startup_errors  on<br /> php_value   error_reporting         2047<br /> php_flag    log_errors              off<!--c2--></div><!--ec2--><br />It appears the file partially works: my register_globals are Off for the site as expected, but the error_reporting doesn't seem to work.<br /><br />I can run PHP code with a known error/warning but get no message.<br />If I put 'error_reporting(E_ALL)' at the top of the actual PHP file, it reports the error/warning as I wanted.<br /><br />Any ideas on what I am doing wrong?<br /><br />[EDIT]<br />Very odd...<br />I think there was something wrong with the formatting of the file. There were tabs hidden in the text (I only saw when I posted this message) and possibly some at the end of each line.<br /><br />I hate that the files are saved in one format (UNIX or Windows or ASCII) and when I edit them with my PHP editor, it causes extra blank lines because it attempts to translate into a different one.<br />Sorry for the bother, but if you have suggestions on the file type issue, I would love to hear it.<!--content-->
 
Top