[Wolves] PHP/MySQL help please

Simon Morris simon.morris at cmtww.com
Mon Jul 25 13:47:09 BST 2005


On Mon, 2005-07-25 at 13:34 +0100, Peter Cannon wrote:
[snip]
> 
> The book I have gave a walkthrough on creating a mysql_connect.inc
> file, if I
> run this in my browser nothing happens, no errors or anything the
> browser
> says done but the display is blank there should be a login screen to
> the
> Accounts database.
> 
Hello Peter,

I'm no expert in LAMP (Linux, Apache, MySQL, PHP) either but...

mysql_connect.inc is normally a small file containing your SQL
connection information e.g. host, username, password, database.

The reason this is in a separate file and not in your main PHP code is
that you can keep this information securely out of the way of your web
root.

You may find sometimes that Apache serves up the PHP raw code rather
than process the PHP script so browsers see the PHP statements. This
happens rarely if Apache is misconfigured but you wouldn't like your
database connection parameters to be shown to clients.

Where is the rest of the PHP code for the accounts database? do you have
a index.php file anywhere?



> I tried running PHPmyAdmin but I get an error page saying "Unable to
> load
> MySQL_Module" the link to the help file does not list this error.

That sounds like you don't have the php4-mysql package installed

When troubleshooting PHP it is a good idea to create a new file with the
following statement in

<?php
phpinfo();
?>

and then call that from a browser. Should tell you more about your PHP
installation and if you have the correct MySQL module loaded.

Oh, and restart your Apache server after installing new PHP modules

Good luck!

~sm



More information about the Wolves mailing list