I’ve on many occasions in past worked with PHP and upon starting this blog realised I’d forgotten almost everything I ever knew about the language/technology. So I’m going to add a few PHP items as and when I have to look them up or remember them.
The first is the phpinfo() method. Simply place this method into a .php file in the following way
<? phpinfo(); ?>
and when this file placed on your web site, simply load the page in your web browser to see loads of PHP information for your webserver/configuration, such as any php.ini file path…
Talking of the which. I was having problems with this blog (assuming I’m still using a PHP based blog when you read this) when it was on godaddy. Iwas getting various timeouts when loading pages. So using the previous code I can check where the php.ini file is located (if indeed there is one) and either edit (or replace it with a file) with the following lines
max_execution_time = 360 ; Maximum execution time of each script, in seconds
Note: the php.ini might have a version number such as php5.ini, obviously this is the file name that should be used to replace the file, add a new one or to be edited.
Oh and this blog is no longer on godaddy due to it being horrendously slow.