Hi list,

My config is XAMPP 1.7.2 with PHP 5.3.0

I'm trying to run a php script as a cron job. The same script works
perfectly from the browser, but fails when I try it from the command line
(not yet set it up as cron).

I get the following error:
PHP Fatal error:  Call to undefined function mysql_connect() in
/opt/lampp/htdocs/CS/weekly_email_report.php on line 3

I tried using dl('mysql.so') before the mysql_connect, but to no avail, I
get:

PHP Warning:  dl(): Unable to load dynamic library
'/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: cannot open
shared object file: No such file or directory in
/opt/lampp/htdocs/CS/weekly_email_report.php on line 2
PHP Fatal error:  Call to undefined function mysql_connect() in
/opt/lampp/htdocs/CS/weekly_email_report.php on line 3

In general many functions that work when the page is accessed from the
browser, fail on the command line. I tried setting extension=mysql.so in
both the php.ini files (the one used by the web server and the one used by
the command line (/etc/php.ini, correct??), though not simultaneously)

Any pointers??

TIA
Ferdi

Reply via email to