| Support Center

(Back to Website)

Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

POSTGRES Free Version 2.0 for test

Frederic Sep 07, 2017 02:46PM PKT

Hi,

Do you support POSTGRES on free version 2.0, Latest download available ?
Actually i get this message :

You must have PostgreSQL installed for this demo. Also set database crendentials in this demo. Click on Code tab for source.

I update, the credentials, but always the same problem !

Up 0 rated Down
Abu Ghufran Sep 07, 2017 10:14PM PKT PHP Grid - Support Center Engineer
If you are following demos/loading/db-layer-pgsql.php then...

To enable debugging errors,

1) Turn errors on. Goto jqgrid_dist.php make it 'on'

error_reporting(E_ALL); // show all messages
ini_set("display_errors","on"); // changed from off to on

2) If you are using non-mysql database,

$g = new jqgrid($db);
...
$g->con->debug = 1;
Up 0 rated Down
FREDERIC Sep 08, 2017 03:48PM PKT
Hi,

Thank you, for your answer. Yes I follow demos/loading/db-layer-pgsql.php

I enable debugging errors :

error_reporting(E_ALL); ini_set("display_errors","on");
and $g->con->debug = 1;

Below my report :
(postgres7): SELECT * FROM clients WHERE 1=1 LIMIT 1 OFFSET 0
...
No more details, only a pop up windows error with no message, and i can see the grid whith header column name as my data table, but no data display for each column.

Any more idea ?

BR

Up 0 rated Down
FREDERIC Sep 08, 2017 04:02PM PKT
Hi,

I m on HTTPS, the error windows cannot show error message.

When i m ON HTTP i can see that on error windows message :

(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 LIMIT 1 OFFSET 0
(postgres7): SELECT count(*) as c FROM (SELECT * FROM dbm_magasin WHERE 1=1) pg_tmp
(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 ORDER BY 1 asc LIMIT 5 OFFSET 0
{"page":1,"total":3,"records":"13","rows":[{"ID":"1","ID_MAGASIN":"14"},{"ID":"2","ID_MAGASIN":"13"},{"ID":"2519001","ID_MAGASIN":"2"},{"ID":"2519002","ID_MAGASIN":"3"},{"ID":"2519003","ID_MAGASIN":"4"}]}

Any Idea ?

BR
Up 0 rated Down
Abu Ghufran Sep 08, 2017 04:13PM PKT PHP Grid - Support Center Engineer
Yes, thats because https is not supported in free version.
You can disable debugging and test-run it on http.
Up 0 rated Down
FREDERIC Sep 08, 2017 06:05PM PKT
Error Message and Debug when i test On http :

ON HTTP i can see that on error windows message :

(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 LIMIT 1 OFFSET 0
(postgres7): SELECT count(*) as c FROM (SELECT * FROM dbm_magasin WHERE 1=1) pg_tmp
(postgres7): SELECT * FROM dbm_magasin WHERE 1=1 ORDER BY 1 asc LIMIT 5 OFFSET 0
{"page":1,"total":3,"records":"13","rows":[{"ID":"1","ID_MAGASIN":"14"},{"ID":"2","ID_MAGASIN":"13"},{"ID":"2519001","ID_MAGASIN":"2"},{"ID":"2519002","ID_MAGASIN":"3"},{"ID":"2519003","ID_MAGASIN":"4"}]}

-> And no data no data display for each column.
Up 0 rated Down
Abu Ghufran Sep 08, 2017 06:07PM PKT PHP Grid - Support Center Engineer
Please disabled errors and try again:
error_reporting(E_ALL); ini_set("display_errors","off");
and $g->con->debug = 0;
Up 0 rated Down
FEDERIC Sep 08, 2017 06:20PM PKT
Ok, better...

I get now, the good number of row in the grid, put no data on cell for each rows.
I test to delete -> OK
I test to insert -> OK on data table, mais nothing visible on cell grid
I test to update -> KO

Any Idea ?

BR
Up 0 rated Down
Abu Ghufran Sep 08, 2017 06:37PM PKT PHP Grid - Support Center Engineer
Use firefox->firebug->net->ajax-call of grid->response. You will see the output there, in case of any error. It should be proper JSON format data in order to render grid

Review this tutorial for '[debugging with firebug](https://phpgrid.desk.com/customer/portal/articles/926266)'.
Up 0 rated Down
FREDERIC Sep 08, 2017 07:24PM PKT
STATUS 200 OK

Reponse JSON:

{"page":1,"total":1,"records":"13","rows":[{"ID":"1","ID_MAGASIN":"14"},{"ID":"2","ID_MAGASIN":"13"}
,{"ID":"2519001","ID_MAGASIN":"2"},{"ID":"2519002","ID_MAGASIN":"3"},{"ID":"2519003","ID_MAGASIN":"4"
},{"ID":"2519004","ID_MAGASIN":"5"},{"ID":"2519005","ID_MAGASIN":"6"},{"ID":"2519006","ID_MAGASIN":"7"
},{"ID":"2519007","ID_MAGASIN":"10"},{"ID":"2519008","ID_MAGASIN":"9"},{"ID":"2519009","ID_MAGASIN":"8"
},{"ID":"2519010","ID_MAGASIN":"11"},{"ID":"2519011","ID_MAGASIN":"12"}]}

ANY IDEA ?
Up 0 rated Down
Abu Ghufran Sep 09, 2017 12:44AM PKT PHP Grid - Support Center Engineer
Make sure your $col["name"] property is exactly same as ID or ID_MAGASIN (case sensitive)
It is required to map json data on column fields.

PGSQL is returning it in caps, so we must have names in caps as well.
Up 0 rated Down
FREDERIC Sep 19, 2017 01:38PM PKT
Hi,

I add this snippet of code to manage CAPS of column. Always no grid data display !

----

$col = array();
$col["title"] = "ID"; // caption of column, can use HTML tags too
$col["name"] = "ID"; // grid column name, same as db field or alias from sql
$col["width"] = "20"; // width on grid
$col["editable"] = true;
$cols[] = $col;

$col = array();
$col["title"] = "ID_MAGASIN"; // caption of column, can use HTML tags too
$col["name"] = "ID_MAGASIN"; // grid column name, same as db field or alias from sql
$col["width"] = "40"; // width on grid
$col["editable"] = true;
$cols[] = $col;
$g->set_columns($cols);

-----

Any more IDEA ?
Up 0 rated Down
Abu Ghufran Sep 20, 2017 04:16AM PKT PHP Grid - Support Center Engineer
I am unable to get the issue. Please email me grid code + database table sql file to generate case here (at gridphp@gmail.com)

Otherwise, We can also have a quick remote session. Check your email for scheduling.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Contact Us

  • Post a Public Question
  • Email Us
  • Live Chat!
  • Ask the Community

    Instructions

    • Paste complete code that is involved in your question. You can use pastebin.com to share code link.

    Screenshots or Online link of webpage is helpful in resolution. You can also send email at address mentioned below.

    • To report an issue, Write steps to regenerate the case.

    • For email support or live chat, Use gridphp@gmail.com and add it in Google Chat.
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete