Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

ForkCMS + XAMPP + Virtual Host - SpoonDatabaseException (no connection)

Hi all, i'm trying now for days to get fork up and running locally in a subfolder. But it don't work. I know that fork is not created for subfolding, but i can't install it direct in my www_root cause i want to use more than one fork installation.

I have installed a fresh XAMPP for Windows (version 1.8.2-6), created a subfolder in htdocs for fork (fork.local), setting up my windows host file (127.0.0.1 fork.local) and the apache2 virtual host file. My routing works right (can access localhost and fork.local via browser).

After that i run the fork installer without a problem. I used the actual fork version (3.8.2). Fork created the needed tables in my database and there was no issue to install it.

But if i open "fork.local" in my browser, there is a "500 Internal Server Error". So i looked into the fork log and there i see this:

'[2014-10-30 12:23:15] request.CRITICAL: Uncaught PHP Exception SpoonDatabaseException: "A database connection could not be established." at D:\Programme\XAMPP\htdocs\fork.local\vendor\spoon\library\spoon\database\database.php line 159 {"exception":"[object] (SpoonDatabaseException: A database connection could not be established. at D:\Programme\XAMPP\htdocs\fork.local\vendor\spoon\library\spoon\database\database.php:159)"} [] '

Really, it sucks. My MySQL database is up and running, i can access it via phpmyadmin and MySQL Administrator without a problem. I have checked my database privileges and everything looks fine. I really don't know how to fix this issue.

I looked for hours to find a workaround for this but nothing helps me. Now i hope someone from the dev-team has a idea what i can do. Thanks alot.

If you want an easy to use server where you can run as much fork installs in parallel as you like, take a look at this

And you're sure that the info inside app/config/parameters.yml are correct? Is the port correct (default 3306)? Try 127.0.0.1 instead of localhost.

You can use fork cms in a subfolder of your www root folder, but you cannot use a subfolder in the domain name, for example www.sitename.com/forkcms. You should use www.sitenamewithfork.com or http://forkcms.sitename.com

I used Wamp instead of Xamp before. Now that I'm on Mac, I use MAMP. Vagrant/Sneakers/Chef is also a good option!

Hi Jesse Dobbelaere, yes my config is correct. I have tryed 127.0.0.1 and localhost and nothing changed. The port is correct too.

My fork folder is in htdocs/ like: D:\programs\xampp\htdocs\fork.local\

edit The crazy thing is, that i can install fork without a problem. It creates the database tables and has connection. But after the installation it wont work.

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/