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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Cannot run install/index.php, Parse error: syntax error
Pages: [1]

Author Topic: Cannot run install/index.php, Parse error: syntax error  (Read 6293 times)

stubert

  • Guest
Cannot run install/index.php, Parse error: syntax error
July 29, 2009, 12:40:53 pm
I am trying to install CiviCRM 2.2 into my Drupal installation... I've uploaded the civicrm folder into /sites/all/modules.  Instructions tell me the next step is to run the install/index.php file, but I get this error:

Quote
Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home1/stcamesg/public_html/01/sites/all/modules/civicrm/CRM/Utils/System.php on line 42

I do NOT have a civicrm.settings.php file because I simply cannot find one anywhere! I need a blank one so I can fill in my directory paths, but I fail to locate where this is.  I know one needs to be in the same directory as the durpal settings.php file, but, again, I am missing the blank version of this civicrm.settings.php file in order to do this.

Does anyone know why this parse error shows up on the install/index.php file?

Where can I find a civicrm.settings.php file, and what directory--exactly--does this need to be placed in? Is it somewhere in the myriad of folders I uploaded?!  ???

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cannot run install/index.php, Parse error: syntax error
July 29, 2009, 01:14:17 pm

if i had to guess, you are not using php5.2.x. Most likely the webserver is on PHP 4.x. You might want to check with your host and/or do a phpinfo

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

stubert

  • Guest
Re: Cannot run install/index.php, Parse error: syntax error
July 29, 2009, 03:04:52 pm
Wow. Our cPanel lied to us, I guess. Yes - wrong version of php.

Thanks!

Sammet

  • Guest
Re: Cannot run install/index.php, Parse error: syntax error
October 10, 2009, 02:10:21 am
Hi!

I have the same problem and I am wondering what you did to solve the problem?

1. Downgrading CiviCRM or upgrading your MySql?

2. And if so - how did you do it?

Sorry for maybe very obvious questions, but I am totally new to CRM and installing databases, so be patient....

Anxious help

My very best regards,

Sammet

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cannot run install/index.php, Parse error: syntax error
October 10, 2009, 10:33:32 am

you need to upgrade your php to 5.2.x. Contact your hosting provider for help and/or hire someone from http://civicrm.org/professional/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dcmorse

  • Guest
Re: Cannot run install/index.php, Parse error: syntax error
February 18, 2010, 08:31:48 pm
Same error here. Looks like they were serious when they said to check versions.

Got Apache 2.2.11 (2.1 recommended)
Got php 5.2.9 (5.2.x is recommended)
mysql is "4.1.22-standard", ("5.x with INNODB enabled" is recommended)

So I guess the syntax error is caused by a stale MySQL version.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Cannot run install/index.php, Parse error: syntax error
February 18, 2010, 11:03:05 pm
Quote
So I guess the syntax error is caused by a stale MySQL version.

Syntax error is due PHP version.

Kurund
Found this reply helpful? Support CiviCRM

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Cannot run install/index.php, Parse error: syntax error
March 15, 2011, 03:35:56 pm
OK, fast forward two years - my cPanel lied to me as well - my cpanel on left said I was at php 5.2.x, but after two hours of hair pulling and a quick service call, it turns out I was running php 4.x

As explained to me, that long laundry list of versions of things on the left column of cpanel is just what the server is capable of serving up for me, NOT the versions of things that I'm running.

THANKS to this old post, I'm back up and running - I had installed this on another server successfully, and really thought I was losing my mind!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Cannot run install/index.php, Parse error: syntax error

This forum was archived on 2017-11-26.