CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.module
Pages: [1]

Author Topic: Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.module  (Read 6911 times)

adrianrf

  • Guest
Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.module
October 10, 2007, 11:17:33 pm
updating working Drupal 5.2/CiviCRM install from 1.8 to 1.9 Beta,
per instructions
  [site offline; sessions table truncated, MySQL script ran without errs, etc.]

Drupal website is down, with white screen o' death/PHP error
  unless I disable CiviCRM Module (move civicrm directory out of site/all/modules tree)

 full error string:
   Parse error: syntax error, unexpected ',', expecting '(' in /home/www/<username>/<drupaldir>/sites/all/modules/civicrm/drupal/civicrm.module on line 477

civicrm.module source lines 475-485 say:

    if ( $userID ) {
        $html = CRM_Core_BAO_UFGroup::getEditHTML( $userID, '',
                                                   CRM_Core_Action::UPDATE, true,
                                                   $reset, null,
                                                   $doNotProcess, $ctype );
    } else {
        $html = CRM_Core_BAO_UFGroup::getEditHTML( $userID, '',
                                                   CRM_Core_Action::ADD, true,
                                                   $reset, null,
                                                   $doNotProcess, $ctype );
    }

which looks OK to me.

any other thoughts?

I do know my hosting company is still learning its way through supporting PHP5 (really!).


Adrian Russell-Falla
MoveOn Portland

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.module
October 11, 2007, 04:39:46 am
Hm, are you sure you’re running PHP 5? CiviCRM 1.9 requires it (and so there’s no PHP 4 download).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

adrianrf

  • Guest
Re: Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.mod
October 11, 2007, 08:39:44 am
good catch, Piotr!

many thanks!

phpinfo.php tells all...
  our host evidently silently reverted to PHP 4.4.7.

coding recommendo:
  would be good defensive practice to run a check for PHP5 early on, and put up a specific error message.
  save support messages & user stress..

cheers,


Adrian Russell-Falla

ps. I had the same problem trying 1.9 Alpha [obviously means my hoster had changed back to 4.4.7 at that time.]
however, didn't have time to persist or puzzle out on the night I was installing, so bailed out of the Alpha and reverted to 1.8
-- thereby possibly depriving the team of additional Alpha feedback...
« Last Edit: October 11, 2007, 10:30:38 am by adrianrf »

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.mod
October 12, 2007, 04:36:47 am
You can check with your host whether they don’t offer PHP 4 and PHP 5 in parallel; in many cases it’s simply a switch in the .htaccess file (so that .php files are parsed by the PHP 5 parser, not by the PHP 4 one).
« Last Edit: October 12, 2007, 04:40:37 am by Piotr Szotkowski »
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

pelicani

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
Re: Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.mod
November 30, 2007, 03:11:14 pm
we are having the same problem, with php 5.2.5 installed.
can y'all recommend another solution?
we just moved our server from verio to rackspace.
PHP Parse error: parse error, unexpected ',', expecting '(' in ... civicrm/drupal/civicrm.module on line 477

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.module
December 02, 2007, 08:57:06 pm
This means you have a bad version of civicrm.module – you either got the one from drupal.org, you try to use the PHP 4 version of civicrm.module on a PHP 5 install or vice versa.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Rayvan

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Re: Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.module
November 17, 2009, 09:13:33 am
I added this to the top of my root htaccess and it worked:

AddType x-mapp-php5 .php
AddHandler application/x-httpd-php5 .php

Hope this helps.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Parse error: syntax error, unexpected ',', expecting '(' in /.../civicrm.module

This forum was archived on 2017-11-26.