Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ira42 on Feb 18, 2009 11:24
open dhtmlx forum
Tree data from server folders

Hey there,

I'm thinking about purchasing the suite. I'm testing the code with the GPL version, but can't get things working...

I'm trying to display a tree, generated based on a folder (+subfolders and files) on my server. I'm using the code from the 'dhtmlx20_tutorial' download from this site. I've updated the "$gl_starting_directory" to the server path I'd like to use as the top level folder.

But, when I run the sample files, I get the XML Error:

Error type: LoadXML
Description: Incorrect XML

AND:

Error type: DataStructure
Description: XML reffers to not existing parent

The PHP file generating the XML is named "DirectoryTree.php"... If I purchase the suite, will a working/updated version of this file be included? (OR am I just missing a setting somewhere?)

Thanks!

Ira
Answer posted by support+ on Feb 19, 2009 03:22

I checked the files and couldn't get same problem with various variants of starting directory path (including incorrect). If I understood you right, you got the problem with initial load of the tree. Right? Not when you expanded tree node. And you haven't chnaged anyhing in the code except value of $gl_starting_directory.

The description of the problem means that either value of initial ID in tree constructor and tree tag are different (in both cases initial value is 0) or xml which came from server on request sent after you opened the node in tree contained tree ID different from ID of expanded node. Both cases are not possible with demo application code which you candownload from site. Thus - I need more detailes to help:

 

1. OS on server
2. Browser on client side
3. Does it happen with any starting directory? Please provide the value you set for $gl_starting_directory
4. Have you done any chnages in initial code?

 

 

Answer posted by ira42 on Feb 19, 2009 08:14
I've managed to reproduce on my local server, running MAMP (OSX 10.5.6).  The same tutorial worked as expected on the first try,  but when I switch my PHP version from v.5 to v.4,  I get the same error I was getting on the live server (XML not found).

Does the suite (or maybe just this tutorial)  only work with PHP 5?

Ira


Answer posted by ira42 on Feb 19, 2009 08:28
Oh, and here is the additional info just in case:

Here's what I did:

  • Looked at demo on this page: http://www.dhtmlx.com/docs/products/demoApps/dhtmlxFileExplorerDemo/index.html
  • Clicked on “Go here” for step-by-step: http://www.dhtmlx.com/docs/products/dhtmlxLayout/doc/step-by-step/ch_dhtmlx20.html
  • Downloaded the tutorial files from here: http://www.dhtmlx.com/docs/products/dhtmlxLayout/doc/step-by-step/dhtmlx20_tutorial.zip
  • Unzipped to the root of a test server.  “/codebase/”  folder is empty,  so I had to download the full suite,  and copied the files from the “dhtmlx_full” folder to the /codebase/  folder...
  • Changed the folder path in the config file to the server path:  /var/www/subdomainname.mysitename.com/images   (correct path)
  • Get XML errors,  and tree doesn't load
  • Tried a number of different starting paths (and double checked permissions on folders, etc)

The production server info is as follows:
  • Server API: Apache/2.0.52 (Red Hat)
  • PHP:  version 4.3.9
  • Browsers used for testing: Safari, Firefox (Mac and PC)
Tx!


Answer posted by support on Feb 24, 2009 10:36
Could you please load http://yoursiteURL.com/dhtmlxFileExplorerDemo/xml/directoryTree.php in the browser and send us results for investigation?