Jump to content

Right after install script: "Database unavailable."


johnstephens
 Share

Recommended Posts

Dear ProcessWire patrons,
 
I'm installing ProcessWire on my local development machine to try it out. I'm running Mac OS 10.9.2, running the default Apache and PHP (v5.4.24), and MySQL 5.6.13. I also have phpMyAdmin and several other LAMP applications running without any problems.
 
The ProcessWire install script ran without any apparent errors, prompting me for my database details, letting me create the admin user, writing the config file, and populating its database with new tables. Finally, it prompted me to log in or look at the site, and that's where my success streak ends. When I try to access the admin url "/processwire/", I'm greeted with the error: "Database unavailable." Likewise when I try to access any page on the "Basic Example Site"—all except for the homepage, which loads fine. No errors are logged by Apache.

I removed the ProcessWire directory and database, and database user, and installed it again from a fresh zip package and fresh database, and I hit the same wall after the install script runs. Again, the config file was created and the database was populated, so I can see that it actually connected to MySQL using the credentials I entered.

I don't know what steps to take to troubleshoot this. My other local LAMP applications, including phpMyAdmin, Textpattern, and others, continue to run fine. I'd appreciate any insight or suggestions.

Thanks in advance!

John
 
Link to comment
Share on other sites

Hi @johnstephens and welcome to PW. Sorry your first experience has been less than stellar. That error seems a little strange given everything else you have described, but if you can access the homepage, then obviously PW is being able to connect to the database to get that content. Typically if you can access the homepage, but no other pages, including the admin it is a mod rewrite issue. Have you tried uncommenting the first of the RewriteBase options in the .htaccess file - around line#103?

  • Like 3
Link to comment
Share on other sites

I am not sure about this either but I do recall having odd issues with database errors while running MAMP on my Mac during a new install of a CMS. I found that restarting my Mac and then launching MAMP, creating the database, and then running the CMS installer worked fine. As you might be grasping at straws at this stage you never know: give this a shot... 

  • Like 1
Link to comment
Share on other sites

Thank you both! Adrian, you identified the exact problem. Since I installed it to play rather than for a specific project, I hadn't set up a virtual host yet, and the PW directory was located at ~/Sites, with "http://localhost/~{username}/ prepended to the URL. Uncommenting line 84 of the .htaccess file and filling in my username and PW directory appears to have solved the problem entirely. Thanks again!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...