Wednesday, December 11, 2013

DateTime functions not working in new set-up PHP 5.3.27 or any other version

You may seem to find yourself in a predicament when you have a new server with a default set-up of PHP configuration. When you transfer your working website when it does not work as intended.

I was searching on the web how can this be? Does the new version, not accommodate the functions used previously.  You might assume that, but the simple solution to the problem is the Date Timezone settings in the config or PHP.ini file.  You just need to set it to your desired timezone.  Once you have specified this, the functions should work as it used to before.

At least that what solved my problem.

Wednesday, December 4, 2013

PHP PDO why the error message given has the computer name, and domain

I have been trying to connect to mySQL server locally and there is an error give with Password:NO.

After searching for a while there is a simple explaination the username and password I have given does not have rights to the database I have specified, hence the error message.

The solution and explination can be found here: http://stackoverflow.com/questions/13002409/why-php-pdo-uses-a-different-from-hostname-to-the-one-used-by-mysql-connect-wh

Hope this helps. Happy coding.

Monday, December 2, 2013

500 Internal Server Error Message

At work I have seen one of our site going down/offline and looking at it on the IIS the website is on and looking at the log files, there was no error.

I think this website could be the answer on why it has been down: https://kb.mediatemple.net/questions/1903/Why+am+I+getting+a+500+Internal+Server+Error+message%3F

Which is understandable, since out database is located somewhere else.  It could have been timeout that causes our website to show 500 error.

Another thing that could help in determining is the Timeout detection as a sample on this website: http://bytes.com/topic/php/answers/620062-how-handle-php-execution-timeouts-gracefully

What I don't understand is why we cannot connect at times on Remote Desktop, though.