You are here: Error using mysql with php4 « PHP Programming Language « IT news, forums, messages
Error using mysql with php4

Posted by Andy Baxter on 10/02/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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация