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

eZ debug

Timing: Jan 18 2025 21:01:29
Script start
Timing: Jan 18 2025 21:01:29
Module start 'content'
Timing: Jan 18 2025 21:01:29
Module end 'content'
Timing: Jan 18 2025 21:01:29
Script end

Main resources:

Total runtime0.7965 sec
Peak memory usage4,096.0000 KB
Database Queries213

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0097 587.8359180.8203
Module start 'content' 0.00980.6376 768.6563674.7188
Module end 'content' 0.64730.1490 1,443.3750340.4375
Script end 0.7963  1,783.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.5832210.0002
Check MTime0.00160.2070210.0001
Mysql Total
Database connection0.00200.256910.0020
Mysqli_queries0.704588.45322130.0033
Looping result0.00240.30462110.0000
Template Total0.762595.720.3812
Template load0.00220.276620.0011
Template processing0.760395.458820.3801
Template load and register function0.00020.028010.0002
states
state_id_array0.00120.145910.0012
state_identifier_array0.00080.101320.0004
Override
Cache load0.00190.2423580.0000
Sytem overhead
Fetch class attribute can translate value0.00160.195150.0003
Fetch class attribute name0.00200.2517100.0002
XML
Image XML parsing0.00140.175550.0003
class_abstraction
Instantiating content class attribute0.00000.0051110.0000
General
dbfile0.00460.5737330.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 32
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs