Forums / Install & configuration / Parse error:syntax error with php 5

Parse error:syntax error with php 5

Author Message

Karlheinz Laping

Monday 31 March 2008 12:27:03 am

Hi,
I'm new with ezpublish. I also get the error message: "Parse error: syntax error, unexpected ',', expecting '(' in ........index.php on line 121" DESPITE the fact I have php 5.1.2-29.50

What can I do?
carolus

Felix Laate

Monday 31 March 2008 12:54:51 am

Hi carolus,

welcome to the community :-)

Syntax errors where not extinguished with PHP5 as far as I know.

I think your error has to do with your code. Check if you somewhere have a "," where you should have had a "(".

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Karlheinz Laping

Monday 31 March 2008 1:33:03 am

Hi, thanks for the quick answer. I checked the index.php. I use the original index.php with the following code which seems okay to me:

$logMap = array( 'notice' => eZDebug::LEVEL_NOTICE,
'warning' => eZDebug::LEVEL_WARNING,
'error' => eZDebug::LEVEL_ERROR,

Some other observations: (1) The setup wizard worked properly. At the end of the installation process I also get thousands of strange strings like 'Л' => 'L', 'К' => 'K', 'Й' on the screen but also the message that I can lock in. May be that this means something for you.

(2)I repeated the installation severals times but the results have been the same ones.
Sometimes I also get the message: "Fatal error: eZ Publish did not finish its request. The execution of eZ Publish was abruptly ended, the debug output is present below."

(3) Further, the site cannot completely be opened.

At the beginning I am asked for the port of the mysql database. I do not know what to entry so I let the field free

carolus

Kristof Coomans

Tuesday 01 April 2008 12:44:07 am

Hi Carolus

The parse error really looks like you are using PHP 4 instead of PHP 5, see http://issues.ez.no/11722. Are you really sure you are using PHP 5? Put a phpinfo file ( http://www.php.net/manual/en/function.phpinfo.php ) on your web server and access it to know all details about the PHP that Apache is using.

Further, (1) seems to be this issue: http://issues.ez.no/8969

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Karlheinz Laping

Thursday 03 April 2008 12:39:47 pm

Hi Kristof,

I definitely have php5 on my server. I checked it with phpinfo(). Also, I contacted the support team of the provider and they confirmed. The issue must be a different one. I do not have any idea what to do.
carolus

rohit anand

Saturday 26 July 2008 8:13:24 am

hi me a beginner in php

I just configured my apache2.2.9 and php5.2.6. My phpinfo wrks 5n. but wheni add any php statement other than phpinfo(). It gives error. This my first test program and got struck into this.

Parse error: syntax error, unexpected ',' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php on line 7

the code is my first program:

<html>
<head>
<title>Hello in PHP</title>
</head>
<body>
<h1>Hello in PHP</h1>
<? print “Hello, world!”;
?>
</body>
</html>

please help me. I am trying to learn php programming myself.

rohit anand

Saturday 26 July 2008 8:14:46 am

my phpinfo() wrks 5n and gives me the configuration for my php5.2.6

sos

Kristof Coomans

Saturday 26 July 2008 12:02:18 pm

Hi

You are using wrong quotes. Use either straight double " or straight single ' quotes.

Please keep in mind that this forum is dedicated to eZ Publish, and not to PHP itself. So might be better to look for another forum to post your PHP related questions. Thank you and good luck!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org