I uploaded the files to the hosting server /drupal-4.3.0

then I created the tables with no problems

I edited the conf.php file with the assumptions that the:
$db_url = "mysql://username:password@localhost/drupal"; means the localhost server for the MySQL database.... and:

$base_url = "http://localhost"; means the website's url like http://www.whatever.com

after all this, when I point my browser to my site's base url I get the index of folders (supplied by the server, nothing that drupal does)

I click on the /drupal-4.3.0 folder I get this error message.

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /hsphere/local/home/brooks/artalyst.com/drupal-4.3.0/includes/database.mysql.inc on line 12
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Anyone know what I did wrong?
Thanks

Comments

trailerparkopera’s picture

I'm getting a similar error. Followed the conf.ini instructions exactly; get this as a response:

Fatal error: Call to undefined function: mysql_connect() in /var/www/html/drupal-4.3.2/includes/database.mysql.inc on line 12

It looks like line 12 in database.mysql.inc is supposed to have the parsed version of HOST, USER and PASSWORD, but somehow that data isn't being parsed correctly from the:

$db_url mysql://user:password@localhost/drupal

line in conf.ini

Substituting hard values in database.mysql.inc produces a different set of errors, but seems to back up the assumption that database.mysql.inc isn't parsing $db_url correctly.

Is this a PHP version issue? I noticed in the notes on the installation page in the documentation that someone had reversed username:password in the $db_url reference. (I tried that too).

Stumped.

bob

trailerparkopera’s picture

It had nothing to do with how I setup the config files: it was an apparent mis-match between my version of PHP (4.2.something) and Drupal 4.3.2 build. Switched everything over to a machine with up-to-date Apache/PHP/MySQL and it works like a charm.

sigh.

tbrown’s picture

I resolved the "Call to undefined function: mysql_connect() in..." by tweaking php.ini. I am running Slackware. Your disto may call for different locations.

Add the following to /etc/apache/php.ini. The first directive belongs in the Paths and Directories section, the second in the Dynamic Extensions section.

extension_dir = /usr/lib/php/extensions
extension=mysql.so

mikegull’s picture

On target, except slightly different for Debian.
There's two php.ini files. Depending on your setup, either /etc/php or /etc/php4 contains a apache/ and cgi/ directory. apache/ has the php.ini for php when run from apache, cgi/ has the php.ini for php when run as a cgi or from the command line. I found that the apache version had
extension=mysql.so
while the cgi version did not, and this was causing the mysql_connect error.

matt westgate’s picture

$base_url should point to the Drupal installation folder. So

$base_url = http://www.whatever.com;

should be

$base_url = http://www.whatever.com/drupal-4.3.0;

boytroy88’s picture

I tried that and I'm still getting the same error.....I'm trying to install 4.4.0 and I'm a n00b :)