1

I've been trying to use CakePHP on Server2Go portable server - but for some reason, I'm unable to connect to DB. Moreover, cake flashes some warnings about mod-rewrite.

I have no problems with setting up the same app on XAMPP or WAMPP, also I'm SURE that I'm using the right db details: localhost, root, (no password), and db_name.

Wordpress, drupal, joomla, CI - there are no problems with setting them up to run on Server2Go, but CakePHP is unable to establish DB connection...

What am I doing wrong????

Keval Domadia
  • 4,768
  • 1
  • 37
  • 64
  • Is the DB you're trying to use a part of the Server2Go package, or does it run separately? And what type of db is it? – Stian Dec 13 '11 at 12:57
  • it's mysql, I tried to use S2G's DB (the default table that was already there) and when I changed the s2g's ini file, I set up a new DB called "test" –  Dec 13 '11 at 14:27
  • pls try to download Cake 2.0 and put it into htdocs. Change Cake's config and see what happens... I have no idea how to fix it... –  Dec 13 '11 at 14:29

2 Answers2

1

You need to enable php_pdo_mysql.dll extension first.

To do that, edit php.ini (into config_tpl dir for Server2Go) and uncomment (remove ; from the start of the line).

Then, restart Server2Go, done!

Be carefull when using old auth method for MySQL users, PDO and/or CakePHP dosent like this anymore!

Then, check the MySQL Port and set CakePHP Database config file to use "localhost:XXXX" where XXX is the MySQL port of Server2Go MySQL Server.

Sucess!

1

I had to do this:

In the server2go folder there is a file called pms_config. Open it and look for [database]. Below there should be an entry like this
MySQLPort=xxxx

In the Cake db config set host as 127.0.0.1:xxxx where xxxx is the port number from pms_config.

Hope this helps.

Stian
  • 886
  • 2
  • 9
  • 17