Re: private static variable not running



See if your config files will allow you to open php code using <? and
not <?php

I forget the setting, but that may be your problem.

HTH
D.

lamthierry@xxxxxxxxx wrote:
I have the following codes,

<?
private static $instance;
?>

which fails at he private static line with the following error message:

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION
or T_FUNCTION or T_VAR or '}'

The above was run on linux with PHP 5.1, however the above codes run
fine on windows with the same PHP version. Any help please? I really
need to get my singleton running.

Thierry

.



Relevant Pages

  • new install php not working. Please help.
    ... I did the fillowing install ... When I try access the index..php via the web the file it tries to download. ... of the config files and all looks good I can't find out why php will not ... I can't get php to work.. ...
    (php.general)
  • Re: Same error as many......
    ... does anyone need to see my config files? ... remove ALL SetInputFilter PHP & SetOutputFilter PHP's from your Apache ... Here is what I put into my APACHE config file: ... SetOutputFilter PHP ...
    (comp.lang.php)