mhdi
asked on
PHP - Parse error: syntax error, unexpected ':'
Hi,
I have this code working on my localhost WAMP server. However after setting it up on my brand new VPS I get the following error.
Any ideas what this could be? I have never seen a colon in PHP before.
Line 69 is line 8 from the snippet below...
I assume it is something to do with my VPS setup / configuration.
Thanks
MHDI
I have this code working on my localhost WAMP server. However after setting it up on my brand new VPS I get the following error.
Parse error: syntax error, unexpected ':' in .... on line 69
Any ideas what this could be? I have never seen a colon in PHP before.
Line 69 is line 8 from the snippet below...
//pagination get
$counterPagination="";
$counterPagination=0;
$address[$counterPagination]=$urlMain;
$paginationAddress="";
$paginationAddress=$urlMain;
pagination:
$htmlPagination = new simple_html_dom;
$ch = curl_init();
I assume it is something to do with my VPS setup / configuration.
Thanks
MHDI
I do not do a vps (yet), however, one thing I got bit by once was code compatibility issues when moving from php executable to php-cgi environment. Things work differently for some aspects in each of those.
Just a thought.
Just a thought.
ASKER
Yes this is a php error.
I dont have any ini files so I dont think it is dynamic as you suggested.
Ill look into the php-cgi suggestion.
I dont have any ini files so I dont think it is dynamic as you suggested.
Ill look into the php-cgi suggestion.
Hello,
The only times I can recall that a colon is used in PHP is for shorthand conditional statements (ternary operators) and classes (scope resolution operators).
I think line 68 was meant to be a comment. Put a // or a # in front of it and re-run your script to see if it functions normally.
The only times I can recall that a colon is used in PHP is for shorthand conditional statements (ternary operators) and classes (scope resolution operators).
I think line 68 was meant to be a comment. Put a // or a # in front of it and re-run your script to see if it functions normally.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found solution myself.
Wow, I didn't know we had that in php. good to know!
{traces of DOS}
That makes 2 of us. Thanks for the update.
A Jurassic Halmark Moment
Apropo.. lol
Apropo.. lol
this is a php file error, yes?