Local Apache server will sot serve PHP files

Steve Jacobs steve at itx.ie
Sun Jan 1 17:54:31 UTC 2006

Dave M G wrote:

>Thank you for the advice. I have two follow up questions.
>	1. By installing libapache2-mod-php4, it seems PHP is now being
>interpreted by Apache. So as a next step, I copied one of my web sites
>from my web hosting service to my local machine.
>	When I attempted to run index.php of my web site, I got the error
>"Fatal error: Call to undefined function: mysql_pconnect()".
>	I checked Synaptic again, and I have the php4-mysql module installed.
>	Is this an indicator of a missing component or configuration problem?
Configuration problem - you are trying to connect to a mysql database 
that at the very least is not in the same path from your local machine 
as it was from your web server. Normal web server configuration doesn't 
allow external access to MySql, so you may have to set up a mysql 
locally and change your configuration file(s)

What I do  is run  MySql on my local Ubuntu machine, and copy the 
databases (usually using PhpMyAdmin Export). I then edit the 
configuration file on the local copy of the web site to connect to the 
local copy of the database.

>	2. I thought that there was a configuration for Apache which would make
>it so that PHP script would be parsed within an HTML file. Is that not
>	Thank you for any advice.
>Dave M G

More information about the ubuntu-users mailing list