LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Weird PHP warning while session_start() (https://www.linuxquestions.org/questions/linux-newbie-8/weird-php-warning-while-session_start-823073/)

olegk25 07-30-2010 11:47 AM

Weird PHP warning while session_start()
 
Hi,

with the simpliest php page

PHP Code:

<?php
session_start
(); // start up your PHP session!
?>

I have the following warning:
Code:

Warning: s in /home/Web-home/htdocs/ps.php on line 2 Call Stack: 0.0002 66640
1. {main}() /home/Web-home/htdocs/ps.php:0 0.0003 66640
2. session_start() /home/Web-home/htdocs/ps.php:2
Dump $_SERVER $_SERVER['REQUEST_METHOD'] = 'GET' $_SERVER['REQUEST_URI'] = '/ps.php' $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Ant.com Toolbar 2.0 Firefox/3.6.8' Dump $_REQUEST $_REQUEST['PHPSESSID'] = '3vcd5c3km29i6ddiagrs68ligv8u0m77'
Warning: U in Unknown on line 0 Warning: U in Unknown on line 0

What could be the problem? Something is with PHP/Apache setup?

PHP Version 5.2.5
IHS 7.0.0.7 (Apache 2) + ldap
Session Support enabled

r3sistance 07-30-2010 02:33 PM

Hi,

From what I can see of this cookie method, it's incredibly vulnerable to encoding errors and can have issues interacting with certain file systems. I would advise taking a look at the php manual page for this, a lot of people have had various errors, yours maybe related to one of theirs and the solution the same.

olegk25 08-02-2010 03:33 AM

Thanks, r3sistance!

the problem was in session.save_path parameter


All times are GMT -5. The time now is 05:56 PM.