session_status

Hi Experts,

What are the corresponding values for session_status()?

When I echo it I get a 2

Thanks
APD TorontoSoftware DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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

Chris StanyonWebDevCommented:
These are the meanings of the return values:

PHP_SESSION_DISABLED = 0
PHP_SESSION_NONE = 1
PHP_SESSION_ACTIVE = 2
0

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
Ray PaseurCommented:
Assume you're talking about this... http://php.net/manual/en/function.session-status.php
0
Ray PaseurCommented:
You can find these things out in the online man pages (sometimes) or you can force PHP to tell you with something like this:
http://iconoun.com/demo/temp_apd_toronto.php

<?php // demo/temp_apd_toronto.php

/**
 * See http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/Q_28624598.html
 */
error_reporting(E_ALL);

// NOT SURE IF THIS IS NEEDED - TRY WITHOUT IT
session_start();


// MAKE THE OUTPUT EASY TO READ
echo '<pre>';

echo PHP_EOL . "PHP_SESSION_DISABLED "; var_dump(PHP_SESSION_DISABLED);
echo PHP_EOL . "PHP_SESSION_NONE ";     var_dump(PHP_SESSION_NONE);
echo PHP_EOL . "PHP_SESSION_ACTIVE ";   var_dump(PHP_SESSION_ACTIVE);

Open in new window

Be aware that PHP will set values identical to these values in other constants.  It's wise to use only the named constants, since their definition values are not guaranteed.  In other words, don't ask this question!
0
APD TorontoSoftware DeveloperAuthor Commented:
Thanks Ray!
0
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.