about php 5.4.20version [message #183234] |
Sun, 13 October 2013 18:00 |
varsha.shakya
Messages: 2 Registered: October 2013
Karma: 0
|
Junior Member |
|
|
about $_SESSION and session_start();
how to replace SESSION ???
define("VARIABLE", variable) and $GLOBALS not functioning...
will any body provide me sample file ???
|
|
|
Re: about php 5.4.20version [message #183235 is a reply to message #183234] |
Sun, 13 October 2013 19:17 |
J.O. Aho
Messages: 194 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 13/10/13 20:00, Varsha Shakya wrote:
> about $_SESSION and session_start();
>
> how to replace SESSION ???
Try to use cookies instead, www.php.net/manual/en/function.setcookie.php
Hopefully you will reaserach the pro and cons of using cookies, as all
great Indian coders do.
> define("VARIABLE", variable) and $GLOBALS not functioning...
> will any body provide me sample file ???
Nope.
Note for the future: The subject of your post should be a summary of
your question and in the body you should actually have a proper
question, the more information you can share of what you want, the
better quality the replies will be.
People will not hand you a solution you can use stright away, as you
ain't paying them.
--
//Aho
|
|
|
Re: about php 5.4.20version [message #183236 is a reply to message #183234] |
Sun, 13 October 2013 21:02 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma: 0
|
Senior Member |
|
|
Varsha Shakya wrote:
> about $_SESSION and session_start();
>
> how to replace SESSION ???
You don't (cookies are a poor substitute, whoever suggests that should be
ashamed). PHP 5.4.20 does not remove $_SESSION or session_start(), so there
is no need to replace it.
That session.auto_start is PHP_INI_PERDIR now does not prevent you from
calling session_start(). It just means that session_start() will not be
called *automatically* if, and only if, you have not explicitly set
session.auto_start to 1 in any of php.ini, .htaccess, httpd.conf, or
..user.ini. session.auto_start=0 is the default since at least PHP 5.3, so
your code should not be affected by the change.
<http://php.net/ChangeLog-5.php#5.4.20>
<http://php.net/manual/en/configuration.changes.modes.php>
> define("VARIABLE", variable) and $GLOBALS not functioning...
The *seeming* “not functioning” might have to do with the fact that define()
defines _constants_, and that you, not having a minimum clue, are writing
nonsensical code. Blame yourself, not PHP.
> will any body provide me sample file ???
My Magic-8 Ball says “Unlikely”.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
|
|
|
|