Results 1 to 9 of 9

Thread: php session ids - htaccess - 500 server error !

  1. #1
    Join Date
    Jul 2004
    Location
    manchester england
    Age
    47
    Posts
    133

    Unhappy php session ids - htaccess - 500 server error !

    Hi folks

    My website (hosted) has been moved to another server which is configured differentley to the one i was originally hosted on. On my original server i changed the htaccess file to include this command

    php_value session.use_trans_sid 0

    and this removed the php session ids from being created on the php links on my site, they did not appear on the first page visit and any other visit and were considered more google friendly than having the id.

    Now on the new server when i put this into the htaccess i get a server 500 error and the site will not load. ( i have removed it! now) BUT without the htaccess change i get the session ids initially and then they go away.

    This is a bit awkward as when a bot comes along to index the site it picks up all of the session ids as this is its first visit.

    ive mentioned this to my host and they are investigating a workaround they said that they said.

    Basically, "php_value" and "php_flag" settings in .htaccess files are no longer recognised as HOSTSERVERNAME is running phpSuExec (which means that all php scripts are now run as your username instead of just the "nobody" user - which helps enhance security).
    what does this mean and has anyone got any ideas how i can disable the session id from being generated when you first visit the page? or let me know what to ask my host to do.

    thanks folks

  2. #2
    Join Date
    Jul 2004
    Location
    manchester england
    Age
    47
    Posts
    133

    Default php.ini

    okay i got a bit further on this i created a php.ini file and entered the same text that i had in the htaccess and this removed the session id, although at the same time stopped all my listings pages from working.

    so i think i need a php.ini but dont know what to put in it.

    anyone any suggestions.?

  3. #3
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default

    Quote Originally Posted by original89
    okay i got a bit further on this i created a php.ini file and entered the same text that i had in the htaccess and this removed the session id, although at the same time stopped all my listings pages from working.

    so i think i need a php.ini but dont know what to put in it.

    anyone any suggestions.?
    Your host should provide a basic php.ini that is compatible with their system.. One php.ini configuration setting that is critical to OR is:

    register_globals = On
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  4. #4
    Join Date
    Jul 2004
    Location
    manchester england
    Age
    47
    Posts
    133

    Thumbs up thanks

    cheers sandking

    I can create a blank php.ini in the same location as a htaccess so would you knowif the syntax of the php.ini would look like this?

    register_globals = On
    session.use_trans_sid = 0

    many thanks

  5. #5
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default

    I cannot be certain of your webhost's particular setup, but a regular php.ini file could possibly contain (at a minimum)

    [PHP]
    register_globals = On
    session.use_trans_sid = 0
    safe_mode = Off
    error_reporting = E_ALL & ~E_NOTICE
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  6. #6
    Join Date
    Jul 2004
    Location
    manchester england
    Age
    47
    Posts
    133

    Smile Fixed

    cool,

    thanks sandking i think the missing link here was the

    One php.ini configuration setting that is critical to OR is: register_globals = On
    so i added

    register_globals = On
    session.use_trans_sid = 0

    to the php.ini and its full speed ahead !!

  7. #7
    Join Date
    Feb 2004
    Location
    UK
    Posts
    38

    Default

    Quote Originally Posted by original89
    cool,

    thanks sandking i think the missing link here was the



    so i added

    register_globals = On
    session.use_trans_sid = 0

    to the php.ini and its full speed ahead !!

    Could you please verify if the admin pages work with use_trans_sid OFF.

    When I turned it off in the .htaccess, every admin page asked me to log back in with the IE browser.

    Thanks

  8. #8
    Join Date
    Jun 2004
    Posts
    1,067

    Default

    admin pages should work fine with use_trans_sid off as long as use_cookies is on, and the browser is accepting them.

  9. #9
    Join Date
    Feb 2004
    Location
    UK
    Posts
    38

    Default That seems to work

    Thx greengiant, that seems to have done the trick.

    What's amazing is that this problem never happened with Firefox browser.

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
  •