Ajax DataGrid Support Product Page

Solved

DataGrid throws connection error on remote site

Reported 24 Jun 2012 22:11:21
1
has this problem
24 Jun 2012 22:11:21 John O'Melia posted:
I have the Ajax datagrid retrieving a list from a database. It works fine locally but when I upload it to the remote server it returns no rows and in the footer where it displays he number of items it says "connection error". The datagrid uses the same connection script I use elsewhere in the site without any problem.

I've searched the forums and found a few similar problems that suggested the path to the file was the issue, so I copied the connection file to the ajax_servers folder and tried accessing it directly without any luck. I even tried putting the connection directly in the dmx_grid1.php file and that did not work either.

As a last resort, I recreated the page without the datagrid but using the same connection file to retrieve the records and display them in an unordered list and it worked fine!

You can see the broken grid page here:jfomelia.com/cottonclubnew/admin/editEventsGrid.php

And here is the working plain list page:
jfomelia.com/cottonclubnew/admin/editEventsList.php

Here is the code for the grid page:

---edited by admin---

Replies

Replied 27 Jun 2012 18:14:11
27 Jun 2012 18:14:11 John O'Melia replied:
Has anyone been able to look at this? My site is going live this week. I have the grid on two pages currently and will be added to two more but since it won't work on my dev site I can't go live with it. I am at the point where I'll have to pull the grids out and replace them lists. Can anyone help?
Replied 28 Jun 2012 07:13:38
28 Jun 2012 07:13:38 Teodor Kuduschiev replied:
Hello,

Please tell me what is
- the local site structure and which is your local root folder defined in DW.
- the server site structure and which is your server root folder defined in DW.

Replied 28 Jun 2012 11:21:29
28 Jun 2012 11:21:29 John O'Melia replied:
I am running MAMP on Mac OSX Lion. My site root is Users/lomelia/Sites/cottonClub. This is how it is defined in Dreamweaver.
Thanks.
Replied 28 Jun 2012 11:26:40
28 Jun 2012 11:26:40 Teodor Kuduschiev replied:
What about the remote server paths? Are they the same and do you upload the files to any subfolder?
Replied 28 Jun 2012 11:43:29
28 Jun 2012 11:43:29 John O'Melia replied:
My remote server path on the hosting company is D:\inetpub\cottonclubgreenwich, while the IP address for that is 216.119.90.196. There is no subfolder. I'm noticing now the main folder on the server is "cottonclubgreenwich", while my local folder is "cottonClub". Would that make a difference? I've never had any kind of connection problems before this
Replied 28 Jun 2012 13:21:27
28 Jun 2012 13:21:27 Teodor Kuduschiev replied:
What i mean are not the names of the folders but the structure.

If your local files are structured and defined in the site configuration like:

LocalRootFolder/yourfile.php

And you are trying to upload it into:

ServerRootFolder/yourSiteName/yourfile.php

you should make sure that in your site configuration the yourSiteName folder is set as server root but NOT the actual ServerRootFolder.
Replied 28 Jun 2012 14:00:32
28 Jun 2012 14:00:32 John O'Melia replied:
On the hosting company I use my server root is "cottonclubgreenwich" and I upload directly to that. There is no "public_html" subfolder or such. AFAIK, there is no higher level server root to which I would have access. In my Dreamweaver remote server settings the root directory folder is empty.

On my local machine, my server path is localhost/cottonClub and all files reside there.
Replied 29 Jun 2012 01:36:29
29 Jun 2012 01:36:29 John O'Melia replied:
So what do I do about this? Are you suggesting I change the way this site has been structured for the past 6 years to make this plugin work correctly? On this same site, I have the HTML5 Slideshow working using data from a MySQL recordset. I also had the Niveo slider working the same way but decided the HTML5 Slideshow was a better fit. Both worked fine on the live host without a problem. Wouldn't changing the structure break these things? I'm really at a loss on this. I'm at the point where I'm just going to pull it out and use a plain HTML table with a repeat region and lose all the elegance you built into this nice plugin.
Replied 29 Jun 2012 11:32:33
29 Jun 2012 11:32:33 John O'Melia replied:
Teodor, I owe you an apology. Everything I said about my site structure was true but what I didn't realize was I had originally built the site on a development server that DID have sites in subfolders. For the live site I removed the existing grid, installed a new one and it works like a charm. I appreciate the help you've given me. As I said in a previous post, this is a very elegant extension with a lot of nice functionality. Thanks again.
Replied 29 Jun 2012 11:38:53
29 Jun 2012 11:38:53 Teodor Kuduschiev replied:
Hello John,

When you are using paths relative to root you should be careful with the root folder and subfolder and how the site is defined.

I am happy to hear it is all okay now.
Replied 09 Aug 2023 15:00:15
09 Aug 2023 15:00:15 User  replied:
Best Jim Corbett national park resorts are located in Jim Corbett National Park, Uttarakhand. The Resorts offer a broad variety of accommodation and amenities.

Reply to this topic