PHP session.use_trans_sid = ON -how to turn this off?
Hi...
I am doing another install of the zen cart on a new server machine, but got this configuration error on the installation screen:
PHP session.use_trans_sid = ON
I also got cURL = OFF
when I "CLICKED FOR MORE INFO" I read the instruction which stated that the php session.use_trans_id could be turned off via an htaccess file. When I did write the instructed line into an htaccess file:
php_flag session.use_trans_sid off
It managed to turn cURL ON (go figure, right?) BUT -- the PHP.session.use_trans_sid is still set to OFF. This could be because the instruction on the link listed at http://www.olate.com/articles/252
also mentioned that the following line:
ini_set('session.use_trans_sid', false);
needed to be added into the "php code" -- :lamo:
Question -- where would I add this line? Does anyone know? It never mentions it specifically on the file I read on olate. I looked in the init_includes folder and tried to also look in the functions to see if I would find a setting or insert for this line, but I'm completely clueless as to what they mean. :frusty:
I've been searching for some time. Still I consider myself somewhat of a "newbie" at this. Any insight would be greatly appreciated.
Thanks so much.
Kinget
Re: PHP session.use_trans_sid = ON -how to turn this off?
We do not encourage the use of ini_set() for use_trans_sid settings.
The recommended approach is through your .htaccess or php.ini settings.
Changing the use_trans_sid setting should have no effect on CURL whatsoever. Enabling CURL support requires compiling CURL support into PHP.
Re: PHP session.use_trans_sid = ON -how to turn this off?
Thank you for your response.
I'm a bit confused by what you wrote.
They managed to get cURL running but still they never turned off the php session use. I asked the server to turn it off from the php.ini file, but it seems to draw a "blank." I also added the recommended line of code to the htaccess file, as instructed on the olate site as follows (except the last line):
You can disable that feature via a .htaccess file or directly from PHP code.
For a .htaccess file you should add the following line:
php_flag session.use_trans_sid off
And in PHP code:
ini_set('session.use_trans_sid', false);
Where is ini_set('session.use') in the zen cart code to do this? It seems I can't get it turned off from the php.ini file from the server. And just doing the first line "php_flag" in the htaccess file isn't turning it off either. Any insight on how I can accomplish trouble-shooting this issue?
Thanks for your help.
Kinget
Re: PHP session.use_trans_sid = ON -how to turn this off?
1. If I were setting up a site on a host that didn't allow the use_trans_sid setting set to OFF, I would not try to run Zen Cart or any other ecommerce system on it.
2. Preferred methods for turning off use_trans_sid are:
a) server-wide php configuration settings (controlled by hosting company)
or
b) your own domain-specific php.ini file (controlled by you and/or hosting company)
or
c) your own .htaccess file (controlled by you and/or hosting company)
If your host is preventing you from using custom settings in your .htaccess or is not providing support for your own php.ini file, then they most likely also block you from changing it programmatically using an ini_set() statement.
3. If you insist on using ini_set() (which we do not recommend), you can do it as follows:
a) edit your /index.php file
b) add you ini_set('session.use_trans_sid', false); statement to the top of the file (after the starting <?php )
c) save and upload.
You'll have to do the same for the zc_install/index.php file or else it will not be able to detect the alteration.
Once again ... and I say this for future readers of this post ... THIS IS NOT A RECOMMENDED APPROACH. It is a crutch to accommodate the webhost configuration.
Re: PHP session.use_trans_sid = ON -how to turn this off?
Dr. Byte,
Thank you so much for your communication and direction on this. I was finally able to get the server to shut it off.:clap: Fortunately - now...I won't have to use the ini(set) as you recommended. I also mentioned the problem with their htaccess -- hopefully that too will not be an issue from here on out.
thanks again for all your help.
Kinget :-)
Re: PHP session.use_trans_sid = ON -how to turn this off?
i changed the info the way that you said, in the .htaccess file.
this is how it looks:
Code:
# $Id: .htaccess 1105 2005-04-04 22:05:35Z birdbrain $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>
# Fix certain PHP values
#<IfModule mod_php4.c>
# php_value session.use_trans_sid 0
php_flag session.use_trans_sid off
# php_value register_globals 1
#</IfModule>
# to turn off register_globals
# php_value register_globals 0
what do i need to change? i am still getting the same error message...
Re: PHP session.use_trans_sid = ON -how to turn this off?
Since every webserver is configured differently by the hosting company, it's best to ask your hosting company for the correct way to disable the session.use_trans_sid setting.