PHP Tree Script Not Working

Posted on 2008-11-03
Last Modified: 2011-10-19
I downloaded a script from DHTML Goodies and made no modifications

But it gives me an error that I can't solve!
Parse error: syntax error, unexpected $end in dhtmlgoodies_tree.class.php on line 257
Question by:hankknight
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 22866500
Could I possibly see your code in which your make use of the downloaded software?

Expert Comment

ID: 22866513
I just tried it on PHP 5.2.6, with sample files that are included in the original download - it works fine.

The only thing I did is renamed example file "dhtmlgoodies-tree.html" to "dhtmlgoodies-tree.php" (only because my php is configured to parse only *.php files) and opened it up through localhost...

Expert Comment

ID: 22866547
Also, line 257 in "dhtmlgoodies_tree.class.php" is actually the end of the file, with only "?>" closing tag on that line (from the original download). So you must have done some modifications which broke it...
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 16

Author Comment

ID: 22866739
I just did a fresh download and it still gives me an error!  This is the code that I am using:

If the code works on your server could you please upload a working version?

Accepted Solution

den4b earned 500 total points
ID: 22866914
I don't really understand what you want me to upload, because the stuff from your last link just works, no errors of any kind... All I did is unpacked it to the local server...

Try setting up a new/clean web server, for example: WAMP (
LVL 16

Author Comment

ID: 22867355
Thanks for the help!

The problem was that the script uses short tags in a few places:
<? ?>

My server requires full tags:
<?php ?>

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question