|
Posted by Andy Baxter on 10/24/31 11:34
hello,
I'm using the php4-mysql module with php4 under debian linux (sarge). I
have a script, schedule.php, which runs fine when I invoke it from the
command line, but fails with the error:
Fatal error: Call to undefined function: mysql_connect() in
/local/rivulet/interface/db.php on line 4
when I try to invoke it as a web page (using apache2). As far as I know,
php itself is set up correctly.
The error is in the following insert:
<?php
$db = mysql_connect(SQL_HOST, SQL_USER, SQL_PASSWD);
mysql_select_db(SQL_DATABASE,$db);
?>
The capitalised constants are defined in config.php:
<?php
define('SQL_HOST', 'localhost');
define('SQL_USER', 'rivulet');
define('SQL_PASSWD', '******');
define('SQL_DATABASE', 'rivulet');
define('TMP_DIR','/tmp');
define('NO_PROGRAMME_MESSAGE','To be confirmed');
define('DISPLAY_EMPTY_SLOTS',TRUE);
define('INSTALL_ROOT','/local/radio/');
?>
which is include (require_once) in the script I'm invoking.
does anyone have any clue what might be wrong?
thanks, andy.
--
http://www.niftybits.ukfsn.org/
remove 'n-u-l-l' to email me. html mail or attachments will go in the spam
bin unless notified with [html] or [attachment] in the subject line.
[Back to original message]
|