Jump to content

Recommended Posts

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?

 

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?

 

Thanks,

-Jacques

Link to post
Share on other sites
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?

 

>php_value session.gc_maxlifetime 18000

 

...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.

 

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?

 

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).

Link to post
Share on other sites
  • 4 months later...

Since we do not have access to PHP.INI, I used .htaccess. In my .htaccess, I have definitions:

 

>[...]
php_flag register_globals off
php_flag	display_errors		  on
php_flag	display_startup_errors  on
php_value   error_reporting		 2047
php_flag	log_errors			  off

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.

 

I can run PHP code with a known error/warning but get no message.

If I put 'error_reporting(E_ALL)' at the top of the actual PHP file, it reports the error/warning as I wanted.

 

Any ideas on what I am doing wrong?

 

[EDIT]

Very odd...

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.

 

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.

Sorry for the bother, but if you have suggestions on the file type issue, I would love to hear it.

Edited by erisande
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...