views:

208

answers:

3

I am trying to implement a little 'intranet' on my home network, but I am an apache/mysql configuration noob...

Running fedora 10, and have apache, mysql, and php set up as well as i know how. However, when I try using a standard form with POST, the php script seems to error out on the mysql_connect(...); line. I don't get an error message, in fact the browser page is blank, even in the view source window. Here is what I have:

$conn = mysql_connect("localhost:1186", "user", "password");

...

I have added the username and password in the mysqladmin tool, and i've tried "localhost" and "localhost:1186", as I saw the 1186 port referenced in my my.cnf file.

Obviously I have something configured wrong, any ideas?

+1  A: 

The resulting page is blank when there's an error. One of the more common errors to make in your setup is to forget to install either the php-mysql or mysql-server packages. Verify that they're installed, and if not install either or both and then restart the httpd service, and start the mysql service if not running.

Ignacio Vazquez-Abrams
*DOH*....yea it was the php-mysql package, thanks a lot!
W_P
A: 

the default for a fresh mysql install would be

$conn = mysql_connect("localhost:3306", "root", "");

or just

$conn = mysql_connect("localhost", "root", "");

This is good for testing purposes but leaving the root account unprotected is a bad habit.

Anonymous
A: 

You could give us some more information what kind of error are you getting a php error? This could be any number of things please help us narrow it down.

MrHus