+ Reply to Thread
Results 1 to 7 of 7

Thread: Installation problem

  1. Join Date
    Oct 2004
    Posts
    4

    Installation problem

    Getting error:
    Code:
    Parse error: parse error, unexpected $ in /home/web/content/properties/common/counter/counter.php on line 733
    Any idea why?

  2. Join Date
    Aug 2004
    Posts
    781

    Installation problem

    No idea why, especially since counter.php isn't 733 lines long

    Go to http://www.ep-dev.com and download the latest "official" version of the counter.

    Also, if you could tell me where you originally downloaded the counter from I would appreciate it.

  3. Join Date
    Oct 2004
    Posts
    4

    Installation problem

    Sorry I should note that I added a "?>" to the end of all the PHP files. Obviously I'm not an intermediate PHP programmer, I was wondering why there aren't any close PHP tags?

    Anyway I've redownloaded the package from the official site (same as original) and I'm still getting the same error.

    Code:
    Parse error: parse error, unexpected $ in /home/web/content/properties/common/counter/counter.php on line 731

  4. Join Date
    Aug 2004
    Posts
    781

    Installation problem

    Could you please post the entire counter.php (make sure to put it between the code bbcode on this forum). I would like to see your configuration as there is likely something wrong with it.

  5. Join Date
    Oct 2004
    Posts
    4

    Installation problem

    Hmm I'm getting error posting the entire code.
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@dev-forums.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Here's a link to it instead:
    http://www.properties.curtin.edu.au/common...er/counter.phps

  6. Join Date
    Oct 2004
    Posts
    4

    Installation problem

    You know what.. after sending that link, as I was testing it I noticed the lower part of the code is not color coded. I noticed the PHP closure "?>" and a new PHP opening block started with "<?" instead of "<?php" (near the javascript code). I changed it and it works now.

    Apologies to have wasted your time. Isn't it a good rule of thumb (as suggested by Zend) to have full <?php instead of short-tags for code redistribution? Just a suggestion. Thanks for the support.. it's great here. I'm just a learner.

  7. Join Date
    Aug 2004
    Posts
    781

    Installation problem

    No, <? is generally accepted throughout all scripts. I do not know of any strict <?php setting (although there is a strict <% setting).

    I only use <?php once, at the beginning of my scripts. The rest of the time I save alot of clutter by using <?. This is very common and is practiced in many scripts.

    There is no reason to close a php tag if it doesn't need to be closed. In fact, it is better this way for a couple of reasons:
    1. Your scripts are not affected by not having a close tag, even if the script is included elsewhere.
    2. Leaving behind a close tag leaves open the possibility for accidental whitespace after the tag. While this isn't a problem with the counter because of its output, it could be a problem for a script that is setting specific headers or cookies, as the script will error upon the white space and it could take ages to figure out where the white space has been output to the browser .

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts