Wednesday, December 22, 2010

Parse error: syntax error, unexpected T_OBJECT_OPERATOR

After uploading project on my webserver I came up with this kind of error:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in path\to\project\web\index.php on line 12

which is this line:
sfContext::getInstance()->getController()->dispatch();


The problem was in PHP version set on webserver. So when I looked at check_configuration.php is saw that webserver is set for PHP4.
After changing into PHP5, everything went all right.

Monday, December 6, 2010

Javascript syntax highlighting problem in Netbeans 6.9

I had troubles figuring out how to highlight my javascript syntax in netbeans 6.9. it worked fine in 6.8. Even when I tried to make a new file, a javascript option doesn't show. Any help would be greatly appreciated. Thanks.

On a fresh install of 10.10 and 6.9, I found the NetBeans Update Centre was not ticked under Tools|Plugins|Settings tab.

I tried an update first, and got the message that the IDE was up to date. After ticking this box, I got many updates, and my code formatting is back to how I expect.