CakePHP Installation on Wampserver
Posted by: chriscopland (---.range86-182.btcentralplus.com)
Date: September 02, 2014 02:53PM

I cannot get CakePHP to connect to a database on Wamp. I have spent hours going over all the different possibilities on multiple searches on numerous sites. I know it is usually something that has been misspelled, overlooked or miss understood and I have not found a solution yet. since this is my first post here is the requested information to start things off.

OS: 32
Wamp=V: 32
APACHE=v: 2.4.4
Mysql=v: 5.6.12
PHP=v: 5.4.16
icon=: Green

Hosts file=: Yes
# entries

127.0.0.1 Localhost

What I have done already.

verified the database details are all correct in database.php using both(localhost) and (127.0.0.1)
verified mod_rewrite is on
verified tmp folder permissions
enabled and verified pdo is enabled
Security salt and cipher values changed.
verified that apache version is using port 80
php.ini file has been verified in both apache and php. and-
Short_open_tag - On (for version of Os ticket that was being tested)
Default port for Mysql Was 3306(changed to 3307) as test for mysql OK

In computer management Services I have checked:

wampmysqld is running
wampapache is running

Still I am getting this result on the cake page.

Your version of PHP is 5.2.8 or higher.
---------------------------------------
Your tmp directory is writable.
------------------------------------------
The FileEngine is being used for core caching. To change the config edit APP/Config/core.php
---------------------------------------------------------------------------------------
Your database configuration file is present.
---------------------------------------------------
X X - CakePHP is NOT able to connect to the database.
X -
X X - Database connection "Mysql" is missing, or could not be created.
-------------------------------------------------------------
DebugKit plugin is present.

What could I be missing here somebody please.

Options: ReplyQuote
Re: CakePHP Installation on Wampserver
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 02, 2014 04:56PM

Did you change the MySQL configuration to use port 3307, and if so ( just out of interest ) why? It may be relevant.

Does phpMyAdmin work? If so, in the 'DATABASE SERVER' box, does it report that it is connected to the correct version of the database
i.e.

Server: mysql wampserver (127.0.0.1 via TCP/IP)
Server type: MySQL
Server version: 5.6.12-log - MySQL Community Server (GPL)


Just wondering if you changed the port number because you have 2 MySQL servers running?

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: CakePHP Installation on Wampserver
Posted by: chriscopland (---.range86-182.btcentralplus.com)
Date: September 04, 2014 11:22AM

Reply appreciated:

In answer to you questions:

Yes I changed the port.
Port 3306 is the default I understand that. I changed it to 3307 to rectify a login failure I was getting ( #2002 Cannot log in to the MySQL server ) by changing to 3307 login was no problem.

If I change it back to 3307 I get the login failure.

Q2.
phpMyAdmin is working and Database server shows;

Server: 127.0.0.1 via TCP/IP
Server type: MySQL
Server version: 5.6.12-log - MySQL Community Server (GPL)
Protocol version: 10
User: ChrisAdmin@localhost
Server charset: UTF-8 Unicode (utf8)

Q3.
(2 servers running) good point but I did have xampp installed as well, however because of your suggestion I have fully uninstalled it, ran a registry clean, deleted all folders relating to it and restarted my computer. and retried to get into my cakephp...same problem.

Scratching my head a bit on this one I'm affraid.

Options: ReplyQuote
Re: CakePHP Installation on Wampserver
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 04, 2014 01:14PM

Ok so now you have removed the other MySQL Server which was probably getting you and the software all confused try moving WAMPS MySQL back to port 3306.

My Guess is that phpmyadmin was addressing the other ( default on 3306 XAMPP MySQL database ) so you created your DB on that.
But everything else was looking at your WAMP MySQL server on 3307 and not finding the DB you were sure you had created.

Or something like that

Running 2 MySQL servers on the same PC is quite possible but not advisable for the beginner.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.