Parse error: syntax error due to PHP4

doomed - March 25, 2009 - 00:44
Project:ImageAPI
Version:6.x-1.5
Component:Code
Category:support request
Priority:critical
Assigned:wildlettuce
Status:needs review
Description

If you get this error:

Parse error: syntax error, unexpected T_ARRAY, expecting '&' or T_VARIABLE or T_CONST in /home/mydomain/public_html/drupal/sites/all/modules/imageapi/imageapi.module on line 161

The problem is on your PHP version. Imageapi needs PHP 5!

Just feeding the search engine, trying to help anyone looking for this.

#1

ArgentOfChange - April 22, 2009 - 02:50

Thanks for this! Cheers mate :)

#2

ArgentOfChange - April 22, 2009 - 02:39
Status:closed» active

#3

ArgentOfChange - April 22, 2009 - 02:50
Status:active» closed

#4

David Henry - May 8, 2009 - 07:51

that's the one:)

#5

Garrett Albright - May 20, 2009 - 21:35
Priority:minor» normal
Status:closed» needs review

EDIT: Never mind, I'm dumb. I forgot the stupid web host our client is using requires special crap in the .htaccess in order to use PHP 5.

AttachmentSize
array-error.patch 506 bytes

#6

Garrett Albright - May 20, 2009 - 21:32
Priority:normal» minor
Status:needs review» closed

Re-closing, since I can't do it when I edit my previous comment.

#7

wildlettuce - November 2, 2009 - 18:17
Component:Miscellaneous» Code
Priority:minor» critical
Assigned to:Anonymous» wildlettuce
Status:closed» needs review

I just moved my local site to the server. I use Dreamhost and they use php5 exclusively. I am getting the same error:

Parse error: syntax error, unexpected T_ARRAY, expecting '&' or T_VARIABLE or T_CONST in /home/wildlettuce/wildlettucedesign.com/sites/all/modules/imageapi/imageapi.module on line 161

Dreamhost does not offer support for php script so I am hoping someone here can help me.
Dreamhost servers run PHP in CGI mode.

Maybe I need "special crap in the .htaccess"?
Do I need a php.ini file? If so, I have no idea how to go about that either.
Am I just out of luck?

I need to have my site up by noon today... if possible. Please HELP!

#8

Garrett Albright - November 2, 2009 - 19:00

wildlettuce: Try running a phpinfo() script to see if you're really running PHP 5.

#9

wildlettuce - November 2, 2009 - 19:15

Thank you so much. I did not know of this phpinfo() script, I was using the web panel of my host which stated clearly that php5 was what was used exclusivly. I ran the script and low and behold - 4.4.9!

I am going to work this out with my hosting. Thank you again for responding so quickly.

#10

internets - November 11, 2009 - 22:20

I am running PHP Version 5.2.9 and still get this error.

Parse error: syntax error, unexpected T_ARRAY, expecting '&' or T_VARIABLE or T_CONST in sites/all/modules/imageapi/imageapi.module on line 161

 
 

Drupal is a registered trademark of Dries Buytaert.