Error: Could not connect to the database after install
Hello,
I'm having troubles installing Perch.
I have an blank page at the final step after creating the user. When I refresh the page I have "Error: Could not connect to the database" . When I check phpMyAdmin, all Perch tables have been created but "perch3_users" is empty so I can't login in /perch/ and neither ask for password recovery.
I've tried to reinstall Perch by deleting files et tables and restart total install process, but I still have the same problem.
I'm on OVH standard hosting with PHP 7.0.
How can I fix it ?
Have you checked your error log?
I don't have access to PHP error logs. Is there a location for Perch error logs?
I've asked for having access to server error log and there is nothing... The latest error is:
My only guess would be to manually set up a user in the database, if you have access.
I've tried it by adding a user via phpMyAdmin and asked for password recovery but I didn't received any mail...
I do not recommend trying to fix it directly in the database. That will probably just mask an underlying problem that could cause you much bigger issues.
Did you successfully install in your dev environment? If so, you shouldn't need to install again on the production server, just move the site as it stands.
For this project I work directly on live server, because it's a new website closed to public for the moment. There is no dev environment. It's a static website. Only news section is dynamic and will use Perch.
It looks like you also have WordPress installed. Did you need to do anything special to get that working?
No, there is no WordPress. The error log shows a 404 on a non-existing file (perhaps a hacking bot trying to find WordPress on the server).
Ah yes, I see.
Does your hosting meet the requirements listed on the Download page?
Hello,
It's a standard LAMP hosting on OVH, a major hoster in France. It's MySQL 5.5 and here is the phpinfo : https://micronique.fr/phpinfo.php
This error is very strange, as Perch has obviously connected to the database successfully in order to create the tables. It doesn't make sense that it then would start failing unless the details or the database server were to change.
I'd recommend removing the existing tables and trying from the start.
I've tried many times to remove tables, re-upload perch files, re-download from perch website, etc. I can't explain why the first steps on install work but failed at final stage.
It's an old hosting plan at OVH. I'll upgrade and come back to you if there is still the error.
Has anyone calculated how much time is lost every month with this problem?
From our point of view? Almost none. I can't remember ever seeing this problem before.
Quick search https://forum.grabaperch.com/forum/06-25-2018-fix-for-local-installation-bug-bug-report
https://forum.grabaperch.com/forum/12-23-2015-install-error?page=1#reply-29013
https://forum.grabaperch.com/forum/10-18-2015-problem-after-install
https://forum.grabaperch.com/forum/03-29-2018-first-time-setup-without-database-password
Maybe a bit exaggerated. However it does seem recurrent
These are all different problems aren't they?
Well. Personally had the same problem and luckily am capable enough to fix it. It does seem that db configuration is a bit broken after install.
Lexi, I agree with Clive. What you've listed doesn't seem relevant to this thread: two of the linked posts about setting up Perch with a DB user without a password (not the case here) and in one of these posts Drew explained how they intentionally don't support that as a security measure to protect you. The other two linked posts are over 2 years old (i.e. outdated) and they don't seem to be about the same issue listed in this post anyway.
Let's keep this thread about solving Christophe's issue; you would be wasting their time and Drew's otherwise - and you are clearly against wasting time.
If you had the same problem and know how to fix it, perhaps you're nice enough to help Christophe?
The point was that there is something inherently broken with the install process on certain platforms or configurations. More specifically the database install. Sometimes it's the connection credentials failing and sometimes it's one critical table like perch3_users being empty at the end of the installation process. It has happened to me before.
Haven't debugged it because it only makes me 1. grunt 2. fix 3. carry on