Forum
Database connection problems
Hi there,
I have a Perch site that is running perfectly locally and was also running fine on the live server until the client carried out a server migration (without telling me!). Now on the new server there are what appear to be some database connection issues and I would really appreciate any help with this or any advice as to what I can tell the admins of the new server and hosting.
When I try to login to the Perch admin as I get the following errors:
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perch/core/lib/PerchDB_MySQLi.class.php on line 27
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/perch/core/lib/PerchDB_MySQLi.class.php:27) in /var/www/html/perch/core/lib/PerchUtil.class.php on line 194
Warning: mysqli::ping(): Couldn't fetch mysqli in /var/www/html/perch/core/lib/PerchDB_MySQLi.class.php on line 62
On a page within the site I get the following output from debug:
Debug Message
Could not create DB link!
SELECT * FROM perch2_pages WHERE pagePath='' LIMIT 1
Could not create DB link!
Invalid query:
Could not create DB link!
Could not create DB link!
SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='' OR regionPage='' ORDER BY regionPage DESC
Could not create DB link!
Invalid query:
Could not create DB link!
SELECT pageID FROM perch2_pages WHERE pagePath='' LIMIT 1
Could not create DB link!
Invalid query:
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
INSERT INTO perch2_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '' AS pagePath,'' AS pageTitle,'' AS pageNavText,1 AS pageNew,0 AS pageDepth,'' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch2_pages WHERE pagePath='' )=0 LIMIT 1
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='' AND (regionPage='' OR regionPage='')
Could not create DB link!
Invalid query:
No matching content regions found. Check region name (Landing Hero) and page path options.
Could not create DB link!
SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='' WHERE idx.regionID IS NULL AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
Could not create DB link!
Invalid query:
Using template: /templates/content/landing/landing-campaign.html
Could not create DB link!
No matching content regions found. Check region name (Landing Hero) and page path options.
Could not create DB link!
SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='' WHERE idx.regionID IS NULL AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
Could not create DB link!
Invalid query:
Using template: /templates/content/landing/landing-redirect.html
Could not create DB link!
SELECT pageID FROM perch2_pages WHERE pagePath='' LIMIT 1
Could not create DB link!
Invalid query:
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
INSERT INTO perch2_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '' AS pagePath,'' AS pageTitle,'' AS pageNavText,1 AS pageNew,0 AS pageDepth,'' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch2_pages WHERE pagePath='' )=0 LIMIT 1
Could not create DB link!
SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Could not create DB link!
Invalid query:
Using template: /templates/forms/landing-form-upper.html
Using sub-template: /templates/content/_country-selects/_en.html
Could not create DB link!
SELECT pageID FROM perch2_pages WHERE pagePath='' LIMIT 1
Could not create DB link!
Invalid query:
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
INSERT INTO perch2_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '' AS pagePath,'' AS pageTitle,'' AS pageNavText,1 AS pageNew,0 AS pageDepth,'' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch2_pages WHERE pagePath='' )=0 LIMIT 1
Could not create DB link!
Could not create DB link!
SELECT pageID FROM perch2_pages WHERE pagePath='' LIMIT 1
Could not create DB link!
Invalid query:
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
INSERT INTO perch2_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '' AS pagePath,'' AS pageTitle,'' AS pageNavText,1 AS pageNew,0 AS pageDepth,'' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch2_pages WHERE pagePath='' )=0 LIMIT 1
Could not create DB link!
Using template: /templates/forms/landing-form-lower.html
Using sub-template: /templates/content/_country-selects/_en.html
Could not create DB link!
SELECT pageID FROM perch2_pages WHERE pagePath='' LIMIT 1
Could not create DB link!
Invalid query:
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
Could not create DB link!
INSERT INTO perch2_pages(pagePath,pageTitle,pageNavText,pageNew,pageDepth,pageModified,pageAttributes) SELECT '' AS pagePath,'' AS pageTitle,'' AS pageNavText,1 AS pageNew,0 AS pageDepth,'' AS pageModified,'' AS pageAttributes FROM (SELECT 1) AS ptable WHERE ( SELECT COUNT(*) FROM perch2_pages WHERE pagePath='' )=0 LIMIT 1
Could not create DB link!
Array
(
[type] => 2
[message] => PerchDB_MySQLi::execute(): Property access is not allowed yet
[file] => /var/www/html/perch/core/lib/PerchDB_MySQLi.class.php
[line] => 105
)
I've also run the Perch compatibility test on this new server and I get the following errors on screen:
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 27
Warning: mysqli::ping(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 70
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 27
Warning: mysqli::query(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 89
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 92
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 98
Warning: PerchDB_MySQLi::execute(): Property access is not allowed yet in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 102
Warning: mysqli::ping(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 70
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 27
Warning: mysqli::query(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 89
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 92
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 98
Warning: PerchDB_MySQLi::execute(): Property access is not allowed yet in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 102
Warning: mysqli::ping(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 70
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 27
Warning: mysqli::query(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 89
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 92
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 98
Warning: PerchDB_MySQLi::execute(): Property access is not allowed yet in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 102
Warning: mysqli::ping(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 70
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 27
Warning: mysqli::query(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 89
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 92
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 98
Warning: PerchDB_MySQLi::execute(): Property access is not allowed yet in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 102
Warning: mysqli::ping(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 70
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 27
Warning: mysqli::query(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 89
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 92
Warning: PerchDB_MySQLi::execute(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 98
Warning: PerchDB_MySQLi::execute(): Property access is not allowed yet in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 102
Warning: mysqli::ping(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 70
Warning: mysqli::mysqli(): (HY000/2002): No such file or directory in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 27
Warning: PerchDB_MySQLi::get_server_info(): Couldn't fetch mysqli in /var/www/html/perchtest/lib/PerchDB_MySQLi.class.php on line 149
This is then followed by a Perch compatibility notice saying that the test has been unsuccessful with the reason that "Perch needs at least MySQL version 5.0 for new installations. You have ."
The new server is running MySQL 5.6.30 though.
If any of the above makes sense and you can give me some advice, it would be very much appreciated!
Thanks,
Simon
Have you put the new connection details in your
config.php
file?Hi Drew,
Yes, the DB info is correct for the new server.
Simon
Ok, then I'm not sure how I can help. You should speak to the hosting company.
Ok, will do. Thanks for your help.