parse error in core.php at line 14 on installation

Hi,

I get the following error on installation:

"
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/18/d84696650/htdocs/Omeka/application/libraries/Omeka/Core.php on line 14
"

My ISP is 1&1, a german-based company

Any advice would be welcome

Alan

Hi Alan, what version of Omeka are you running?

Hi Dave

Version 0.9.0, it says.

A

My PhP version is 4.4.8.
Can I run Omeka on this version?
Is it possible that this is the cause of the problem?

A

That's causing your problems. I checked the 1&1 hosting website, and they do support PHP4,PHP5. Without using 1&1 personally, i know many shared hosting services allow you to change your PHP version in an admin panel, or by contacting their staff. Good luck.

OK I checked with 1&1 - apparently although my package does include PhP5, because I started my subscription before it was introduced, I do not have access to it. I'll work this out with them and then try again.

Thanks
A

The problem is caused because 1&1 runs both PhP4 and PhP5 in parallel, and PhP4 is chosen by default.

1&1 FAQ says that code can be forced to run as PhP5 in one of two ways:

(1) if the php code itself has the extension .php5
(2) if the following line is added to the .htaccess file:
AddType x-mapp-php5 .php

When I put this line in the .htaccess for the root, the installation process starts correctly (though it generates errors further on - I will check whether additional htaccess files are needed in subdirectories or includes)

This seems to me of general interest - there must be quite a few servers running 2 versions of PhP.

A

Right.

The problem now is the following. I am directed to start the install process. An error is generated as follows (after turning debugging on):

An error occurred within the following SQL statement: SHOW TABLES LIKE 'omeka_%' Stack Trace: #0 /homepages/18/d84696650/htdocs/Omeka/application/libraries/Zend/Db/Statement.php(109): Zend_Db_Statement_Mysqli->_prepare('SHOW TABLES LIK...') #1 /homepages/18/d84696650/htdocs/Omeka/application/libraries/Zend/Db/Adapter/Mysqli.php(284): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SHOW TABLES LIK...') #2 /homepages/18/d84696650/htdocs/Omeka/application/libraries/Zend/Db/Adapter/Abstract.php(261): Zend_Db_Adapter_Mysqli->prepare('SHOW TABLES LIK...') #3 /homepages/18/d84696650/htdocs/Omeka/application/libraries/Omeka/Db.php(255): Zend_Db_Adapter_Abstract->query('SHOW TABLES LIK...', Array) #4 /homepages/18/d84696650/htdocs/Omeka/install/install.php(23): Omeka_Db->query('SHOW TABLES LIK...') #5 /homepages/18/d84696650/htdocs/Omeka/install/index.php(18): require_once('/homepages/18/d...') #6 {main} Dump of the exception: object(Zend_Db_Statement_Mysqli_Exception)#74 (6) { ["message:protected"]=> string(37) "Mysqli prepare error: Unknown command" ["string:private"]=> string(0) "" ["code:protected"]=> int(0) ["file:protected"]=> string(87) "/homepages/18/d84696650/htdocs/Omeka/application/libraries/Zend/Db/Statement/Mysqli.php" ["line:protected"]=> int(85) ["trace:private"]=> array(6) { [0]=> array(6) { ["file"]=> string(80) "/homepages/18/d84696650/htdocs/Omeka/application/libraries/Zend/Db/Statement.php" ["line"]=> int(109) ["function"]=> string(8) "_prepare" ["class"]=> string(24) "Zend_Db_Statement_Mysqli" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(26) "SHOW TABLES LIKE 'omeka_%'" } } [1]=> array(6) { ["file"]=> string(85) "/homepages/18/d84696650/htdocs/Omeka/application/libraries/Zend/Db/Adapter/Mysqli.php" ["line"]=> int(284) ["function"]=> string(11) "__construct" ["class"]=> string(17) "Zend_Db_Statement" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> object(Zend_Db_Adapter_Mysqli)#69 (6) { ["_config:protected"]=> array(6) { ["host"]=> string(21) "db278.oneandone.co.uk" ["username"]=> string(11) "dbo97893408" ["password"]=> string(8) "kreplach" ["dbname"]=> string(10) "db97893408" ["options"]=> array(2) { ["caseFolding"]=> int(0) ["autoQuoteIdentifiers"]=> bool(true) } ["driver_options"]=> array(0) { } } ["_fetchMode:protected"]=> int(2) ["_profiler:protected"]=> object(Zend_Db_Profiler)#70 (4) { ["_queryProfiles:protected"]=> array(0) { } ["_enabled:protected"]=> bool(false) ["_filterElapsedSecs:protected"]=> NULL ["_filterTypes:protected"]=> NULL } ["_connection:protected"]=> object(mysqli)#72 (0) { } ["_caseFolding:protected"]=> int(0) ["_autoQuoteIdentifiers:protected"]=> bool(true) } [1]=> string(26) "SHOW TABLES LIKE 'omeka_%'" } } [2]=> array(6) { ["file"]=> string(87) "/homepages/18/d84696650/htdocs/Omeka/application/libraries/Zend/Db/Adapter/Abstract.php" ["line"]=> int(261) ["function"]=> string(7) "prepare" ["class"]=> string(22) "Zend_Db_Adapter_Mysqli" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> string(26) "SHOW TABLES LIKE 'omeka_%'" } } [3]=> array(6) { ["file"]=> string(71) "/homepages/18/d84696650/htdocs/Omeka/application/libraries/Omeka/Db.php" ["line"]=> int(255) ["function"]=> string(5) "query" ["class"]=> string(24) "Zend_Db_Adapter_Abstract" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(26) "SHOW TABLES LIKE 'omeka_%'" [1]=> array(0) { } } } [4]=> array(6) { ["file"]=> string(56) "/homepages/18/d84696650/htdocs/Omeka/install/install.php" ["line"]=> int(23) ["function"]=> string(5) "query" ["class"]=> string(8) "Omeka_Db" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> &string(26) "SHOW TABLES LIKE 'omeka_%'" } } [5]=> array(4) { ["file"]=> string(54) "/homepages/18/d84696650/htdocs/Omeka/install/index.php" ["line"]=> int(18) ["args"]=> array(1) { [0]=> string(56) "/homepages/18/d84696650/htdocs/Omeka/install/install.php" } ["function"]=> string(12) "require_once" } } }

Please refer to Omeka documentation for help.

AF: the statement
SHOW TABLES LIKE 'omeka_%'
works fine from within PhPMyAdmin

Post continued on another thread:

http://omeka.org/forums/topic/sql-error-executing-show-files-like?replies=2