This paper introduces the solution to PHP using session error. For those who use session for the first time, they may encounter undefined variable:_ The reason for an error like session is that the session is not opened. Because session in PHP is not opened by default, it needs to be opened in the program to use. PHP error: PHP notice: undefined variable:_ Reasons and solutions of session
Undefined variable encountered:_ The reason for the session error is that PHP session is not turned on
There are two solutions
1. Add session to the program_ Start() function
2. Add session.auto in php.ini_ Start = 0 is set to session.auto_ start = 1
This is how to solve the problem of undefined variable_ Session
Source: http://www.phpbest.com/html/content-9-377-1.html
N otice:Asessionhadalreadybeenstarte Solutions
Notice: A session had already been started – ignoring session_ start() in .. on line ..
This happens when you try to start session more than once.
The solution for above problem is
1) in php.ini file set session.autostart to 0
session.auto_ start = 0
2) In your code use this line
if (! session_ id()) session_ start();
instead of
session_ start();
Similar Posts:
- Session_start(): Cannot start session when headers already sent in [How to Solve]
- session_start(): Cannot send session cookie – headers already sent
- AttributeError: module ‘tensorflow’ has no attribute ‘Session’
- .NET WebServiceSession[WebMethod(EnableSession = true)]
- How to Solve KTAG Red PCB “Program already running” Issue
- [Solved] Android ADB server didn’t ACK * failed to start daemon *
- [Solved] TypeError: Cannot read property ‘getAttribute’ of undefined
- Non-ASCII character ‘\xe8’ in file xxx.py on line 8, but no encoding declared
- Android ADB server didn’t ACK * failed to start d
- Tensorflow reported an error when using session module: attributeerror: module ‘tensorflow’ has no attribute ‘session’, which has been solved