It’s a common issue that datagrid seems to render, but only the header and footer are displayed. There is no data displayed in the grid.
- The first thing to look at is to check if PHP session is enabled. Run
phpinfo()and see if the
session.save_pathwas set to a valid path. In the most cases, this is the issue.
- Following above, also make sure session.auto_start must be set to "1"
- If the first step doesn't resolve the issue, check if
SERVER_ROOThas been set correctly. See installation article for details for how to set server root in conf.php.
- If the first two all look fine. Here's what you can do next. In FireFox browser use Firebug (Press F12) to view the ajax response returned from "
data.php". Likely there's an error occurred on the server during Ajax call.
- As pointed out by a few users, HTML editors such as Adobe Dreamweaver, adds a new line before the beginning
<?phptag in the config.php file. Apache web server has issues with it. Try to use a different HTML editor like Notepadd++ to avoid this kind of issue and also use Filezilla to upload the files onto the server. When using Notepad++, make sure the encoding is set to UTF-8 without BOM.
- phpGrid uses the default PHP session name. If you get a similar error message such as the following:
Notice: Undefined index: _oPHPGRID_tablename_sql in /home/www/phpGrid/data.php(1) : eval()'d code on line 1, you will need to declare your custom session name in conf.php
- Check the parameters in constructor are all set correctly. It needs ALL three parameters to work:
- the sql statement,
- primary key,
- and table name