Skip to content

PHP Session

Question:

The grid header displays, but then an error is presented:

Notice: Undefined index: _oPHPGRID_tablename_sql in /home/hcw/public_html/phpGrid/data.php(1) : eval()'d code on line 1

Notice: Undefined index: _oPHPGRID_tablename_sql_key in /home/hcw/public_html/phpGrid/data.php(1) : eval()'d code on line 1

....

Solution:

The error is caused by a PHP session issue. Make sure PHP Session is enabled and set to a valid directory. Use phpinfo() to view your PHP configuration. Be sure that session.save_path is set to a valid path that exists and is writable by your web server.

In Linux, by default, the path is /var/php_sessions/

In addition, please make sure session.auto_start must be set to 1. In some hosts, this value is default to 0. Without session to auto start, phpGrid cannot load the data from database using the credential stored in session.
 
Some web hosting services such as iPage, disallows shared user session folder for security reasons. Users MUST create and maintain their own session folder.

http://www.ipage.com/knowledgebase/beta/article.bml?ArticleID=1290&type=How%20To#Nugget_1374

Feedback and Knowledge Base