session (SID) not work in PHP5

Dear experts,

Im using php session without cookies.

I do have a problem to pass the SID to the other pages.

Below here is the php.ini file that i have configure in linux fedora core 3.


session.save_path:       /var/lib/php/session      
session.serialize_handler:       php      
session.use_cookies:      Off            
session.use_only_cookies:      Off      
session.use_trans_sid:      1      

What is the main caused of the problem?
Pls provide some guide.

Thanks
MNCWAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WoodyRoundUpCommented:
hi there.
is your /var/lib/php/session storing your session file there?
has the permission for the folder been set?

how do you call your session?
mind to give some line of codes?

how u do set and do you retrieve?

Diablo84Commented:
hi MNCW,

At the risk of asking a stupid question, you do have session_start(); at the top of the scripts to initialize the session data i assume?

What is the setting for url_rewriter.tags in the php.ini fle? (this will be which tags to rewrite when passing the session id via the query string, eg: a=href).

---------------------------------------------
As a side note, is there a reason why you are not using cookies... the trans_sid approach can be a security risk, quote from: http://us2.php.net/manual/en/ref.session.php#ini.session.use-trans-sid

" URL based session management has additional security risks compared to cookie based session management. Users may send a URL that contains an active session ID to their friends by email or users may save a URL that contains a session ID to their bookmarks and access your site with the same session ID always, for example."
---------------------------------------------

Diablo84

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
iamanindianCommented:
What does this show?
------------------------------------
<?php
echo session_id();
?>
------------------------------------

WC
iamanindianCommented:
Sorry I missed Diablo84's post. I am assuming session_start() has already been called. :)

Regards
WC
MNCWAuthor Commented:
Thanks guy...

I got the solutions for the above problem.

my php.ini file in linux server in save under different extension name, this may caused the out the session without cookie not works.

Thank for guidance
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.