Jump to content
The Uniform Server Community

error 500 when using MySQL


podles
 Share

Recommended Posts

Dear All,

I'm experiencing such a problem with Uniserver. Tried on two different computers, one with Windows Vista Business 32bit, the other - Windows 7 (unfortunately did not check exact version).

The situation is as follows:

On Vista machine I've unzipped Uniserver 5.6.3 succesfully, copied my CakePHP site into it, imported data to local MySQL and everything worked fine.

Than I copied everything on my pendrive - and still everything was OK.

 

Than I put the pendrive into win 7 machine and I could not open any script using database: either my Cake site or phpmyadmin - I always got http error 500 (BTW - I cant get php to write what is the exact error. I turned apache into log mode debug and set up a log file in php.ini and have nothing meaningful in apache log and nothing at all in php log file).

MySQL was working for sure (tried query browser) and in addition - I also could not connect to remote database server (which also was working and is tested to accept remote connections).

After running it again on vista I had the same problem (but nothing was changed).

 

And now comes the most weird part:

After installing WAMP, turning it on an than off - all started working on win 7 (both phpmyadmin and my cake site).

 

On my vista machine the situation was a little worse: after installing and turning off WAMP phpmyadmin works but my cake app still gives 500.

 

I downloaded two different versions of Uniform Server (5.4 and 5.5) with exact same effect.

 

Does anyone have any idea what is the key?

Thanks and best regards,

podles

Link to comment
Share on other sites

On Vista machine I've unzipped Uniserver 5.6.3 succesfully, copied my CakePHP site into it, imported data to local MySQL and everything worked fine.

Than I copied everything on my pendrive - and still everything was OK.

The above indicates Cake and US are working fine. More importantly Cake is not setting absolute paths in its configuration file.

 

The above points to W7. Try editing file cake\app\config\database.php and substitute localhost with 127.0.0.1 for host.

 

All the best

Ric :)

Link to comment
Share on other sites

The above indicates Cake and US are working fine. More importantly Cake is not setting absolute paths in its configuration file.

 

The above points to W7. Try editing file cake\app\config\database.php and substitute localhost with 127.0.0.1 for host.

 

All the best

Ric :)

 

Hi Ric,

thanks for prompt reply.

Yes - now it is working fine in windows 7 (though I don't know why - it started to work after installing WAMP and turning it off) but I can't get it to work under vista again :/

Actually - the most important thing for me now is to know what is it all about and how to make it work. I have pretty good environment for researching it because nonw I have one computer with it working and one with error 500.

 

As far as the cake database conf - it already was 127.0.0.1 to avoid possible problems with resolving localhost.

 

Normally cake gives his own error msg when he can't connect to database - this situation is different. Now for test i turned off mysql and the effect was just the same (500 without any msg about not being able to connect to database).

I also change "host" parameter to a random, non-existent value and still the effect is just the same, no recognizable errors - only 500.

 

BTW - do you have any idea how to force apache/php to log more details about errors? I set log level to "debug" in apache conf (I get some more non-important lines in log) but cant get php to write his own log (I set it in php ini, tried setting filename and "syslog" but still get nothing).

 

I think it might be something with php's MySQL module - maybe it has some lockfile/local socket to communicate with MySQL or something (and this is why WAMP changed the situation) but have no idea what it might be. Any ideas?

 

Thanks and best regards,

podles

Link to comment
Share on other sites

  • 4 months later...

I am lucky I find the solution:

MySQL 5 supports only IPv4 unfortunately Windows 7 gives priority to IPv6 and returns an IPv6 address for localhost hence a connection fails.

 

Uniform Server’s solution is to replace localhost with port address 127.0.0.1 this forces an IPv4 connection.

 

When requested for a MySQL host name use 127.0.0.1

from http://wiki.uniformserver.com/index.php/5....o:_Known_Issues

 

It works for phpBB3, WordPress, Joomla15 and Drupal6 -- after I update host name from blank or "localhost" to "127.0.0.1" in configuration file, all of them begin to work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...