Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2006
    Posts
    154
    Plugin Contributions
    0

    Default 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" --

    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.

    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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,407
    Blog Entries
    7
    Plugin Contributions
    81

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

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2006
    Posts
    154
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Jan 2004
    Posts
    66,407
    Blog Entries
    7
    Plugin Contributions
    81

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

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2006
    Posts
    154
    Plugin Contributions
    0

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

  6. #6
    Join Date
    Feb 2009
    Posts
    79
    Plugin Contributions
    1

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

  7. #7
    Join Date
    Jan 2004
    Posts
    66,407
    Blog Entries
    7
    Plugin Contributions
    81

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

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. PHP session.use_trans_sid = ON
    By wotnow in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 16 Sep 2011, 03:37 AM
  2. PHP session.use_trans_sid = ON
    By Maynards in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 24 Jun 2011, 10:19 AM
  3. How do I turn off use_trans_sid ?
    By nitation in forum Installing on a Windows Server
    Replies: 1
    Last Post: 4 Feb 2009, 10:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR