Posts Tagged ‘PHP’

PHP is able to communicate with PostgreSQL databases using some relatively simple calls. In a similar manner to other database systems, the script needs to do the following: connect to the database using pg_connect execute queries using pg_query and pg_free_result close the database connection using pg_close For example, consider the following script: <?PHP // database […]

If you’re writing a website in PHP, then by each PHP script will time out after a set time (usually 30 seconds by default). If this happen, you’ll see an error like the following: Fatal error: Maximum execution time of 30 seconds exceeded in <file> on line <line> This is a safety feature; if your […]

301 Redirects in PHP

Posted: 9th July 2010 by Tim in PHP
Tags: , , , , , , , , , ,

If you have a web page which has been moved to another URL, or if the page has been completely removed, chances are people will have that address saved in their bookmarks, or they will try to access the page via a search engine and get a 404 – Page Not Found error. Not only […]

Adding subdomains in Apache

Posted: 20th August 2009 by Tim in Apache, Ubuntu
Tags: , , , , , , , ,

There are a number of ways to add subdomains in apache, but here is the quickest and most basic way to get it done. This example is for Ubuntu 8.04, but may be used on other flavours of linux if you find the correct paths to the files. Let’s say you have a blog on […]