Grid loads but no records are loaded, error pop-up

QuestionsGrid loads but no records are loaded, error pop-up
Oliver asked 8 months ago

bought the grid yesterday and installed it as indicated

when loading my demo page data is not loaded into the grid, error popup shows JSON data, tried it with various browsers, does not work

no data / html is echoed before the php part, cannot be the root cause of the error

5 Answers
Abu answered 8 months ago


Please share your code for review.

Oliver answered 8 months ago
 * PHP Grid Component
 * @author Abu Ghufran <[email protected]> -
 * @version 2.0.0
 * @license: see license.txt included in package
// include and create object
require 'conn_localhost.php';
// Database config file to be passed in phpgrid constructor
$db_conf = array(
    "type"        => PHPGRID_DBTYPE,
    "server"   => PHPGRID_DBHOST,
    "user"        => PHPGRID_DBUSER,
    "password"     => PHPGRID_DBPASS,
    "database"     => PHPGRID_DBNAME
$g = new jqgrid($db_conf);
$grid["caption"] = "Sample Grid";
$g->table = "sys_languages";
$out = $g->render("list10");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="gridphp/lib/js/themes/redmond/jquery-ui.custom.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="gridphp/lib/js/jqgrid/css/ui.jqgrid.css" />
    <script src="gridphp/lib/js/jquery.min.js" type="text/javascript"></script>
    <script src="gridphp/lib/js/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
    <script src="gridphp/lib/js/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="gridphp/lib/js/themes/jquery-ui.custom.min.js" type="text/javascript"></script>
    <?php echo $out ?>
Abu answered 8 months ago

It seems like there is some white space in one of the included files.

e.g. Check ‘conn_localhost.php’
There are usually 2 reasons for this.

1) Blank space character at start of grid file OR before render() function (new line etc)
White spaces can be removed by checking top and end of all included files.
2) Invisible BOM character at start of file
To remove invisible BOM character, i would recommend Notepad++ -> Open file -> Encoding menu -> Encode UTF without BOM

Martin Mata answered 5 months ago

I have the same issue, could you inform if you fix the problem?

Tasagore Seibei answered 4 months ago

Don’t know if it helps but…

I’ve a proxy server (apache2) and a internal webserver (apache2). If I try to reach the demos from the external URL, example all the grids are blank and shows a “error” popup, but if I reach the demos directly to the webserver from the internal network, example all works fine.

No errors in the apache (proxy or webserver). Any hint?

Tasagore Seibei replied 4 months ago

Solved, in that environment seems that Grid does not detect properly http/https header. I’ve forced it to https and now all works fine.

Your Answer

20 + 18 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?