Hi, I have an error with database after upgraded from 3.0.5.3 to 3.0.5.4p1. When I click 'Add new database' or click an existing database, the error comes up as below. I am doubting that it's because of MySQL or PHP version as it happens with mysql 5.0.95 with PHP 5.2 but is ok with mysql 5.5. with PHP5.3. Please advise. #0 db->query(SELECT web_domain.domain_id, CONCAT(web_domain.domain, ' :: ', server.server_name) AS parent_domain FROM web_domain, server WHERE web_domain.type = 'vhost' AND web_domain.server_id = server.server_id AND {AUTHSQL::web_domain} ORDER BY web_domain.domain) called at [/usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php:158] #1 db->queryAllRecords(SELECT web_domain.domain_id, CONCAT(web_domain.domain, ' :: ', server.server_name) AS parent_domain FROM web_domain, server WHERE web_domain.type = 'vhost' AND web_domain.server_id = server.server_id AND {AUTHSQL::web_domain} ORDER BY web_domain.domain) called at [/usr/local/ispconfig/interface/lib/classes/tform.inc.php:258] #2 tform->getDatasourceData(Array ([datatype] => INTEGER,[formtype] => SELECT,[default] => ,[datasource] => Array ([type] => SQL,[querystring] => SELECT web_domain.domain_id, CONCAT(web_domain.domain, ' :: ', server.server_name) AS parent_domain FROM web_domain, server WHERE web_domain.type = 'vhost' AND web_domain.server_id = server.server_id AND {AUTHSQL::web_domain} ORDER BY web_domain.domain,[keyfield] => domain_id,[valuefield] => parent_domain),[value] => Array ([0] => select_site_txt)), Array ([database_id] => 8,[server_id] => 1,[parent_domain_id] => 4,[type] => mysql,[database_name] => c1egolf,[database_name_prefix] => c1,[database_user_id] => 8,[database_ro_user_id] => 0,[database_charset] => ,[remote_access] => n,[active] => y,[remote_ips] => )) called at [/usr/local/ispconfig/interface/lib/classes/tform.inc.php:400] #3 tform->getHTML(Array ([database_id] => 8,[sys_userid] => 1,[sys_groupid] => 2,[sys_perm_user] => riud,[sys_perm_group] => ru,[sys_perm_other] => ,[server_id] => 1,[parent_domain_id] => 4,[type] => mysql,[database_name] => c1egolf,[database_name_prefix] => c1,[database_quota] => ,[last_quota_notification] => ,[database_user_id] => 8,[database_ro_user_id] => 0,[database_charset] => ,[remote_access] => n,[remote_ips] => ,[backup_copies] => 4,[active] => y,[backup_interval] => weekly), database, EDIT) called at [/usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php:576] #4 tform_actions->onShowEdit() called at [/usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php:490] #5 tform_actions->onShow() called at [/usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php:70] #6 tform_actions->onLoad() called at [/usr/local/ispconfig/interface/web/sites/database_edit.php:452] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '::web_domain} ORDER BY web_domain.domain' at line 1
Is it caused by PHP Scope Resolution Operator which does not support PHP5.2? Does ISPConfig no longer support PHP5.2? I have several servers and some of them still need PHP5.2 for existing customers.
We do not test current versions with versions < 5.3. You can install php 5.2 as additional php version in ispconfig (see tutorials on ispconfig.org), if you need it for some old websites.
I confirm ISPConfig 3.0.5.4 does not support PHP5.2. I have one master with several slaves. Unfortunately, master server has PHP5.2 and hundred websites are running on it. I do not know which websites are incompatible with PHP5.3 and it's live.. that's the problem.
Another option is this: 1) compile a additional php version with php 5.3 or later (fast-cgi) in /opt, as described in the multi php version guides. 2) edit the php fcgi starter file of the ispconfig vhost manually so that it uses the newer php version.
The mySQL error above that you get doesn't seem to be related to the php version but to a not updated tform file, I think. The error is caused by {AUTHSQL::web_domain} not being replaced before the query is executed. Please check if the ISPConfig update really succeeded.
Thank you for your advice. I believe the problem is that 3.0.5.4 uses PHP Scope Resolution Operator '::' which does not support PHP5.2.
Thanks Croydon However, it was the PHP version issue and now it's been fixed with Till's suggestion. I installed PHP5.3 as an additional PHP version and edited the php fcgi starter file of the ispconfig vhost manually. Update the file below. /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter And changed as below. #!/bin/sh PHPRC="/opt/phpfcgi-5.3.28/lib/" export PHPRC export PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_CHILDREN=1 exec /opt/phpfcgi-5.3.28/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/server/temp