Ich lasse das folgende Skript in einem Cronjob laufen...
cd /etc/parselog/
php run_all.php >/dev/null
und erhalte die folgenden Fehler:
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './mysql.so' - ./mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './mysql.so' - ./mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './mysqli.so' - ./mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './odbc.so' - ./odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo.so' - ./pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo_mysql.so' - ./pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo_odbc.so' - ./pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Warning: PHP Startup: Unable to load dynamic library './pdo_sqlite.so' - ./pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[05-May-2009 20:30:12] PHP Fatal error: Call to undefined function mysql_connect() in /etc/parselog/stats_downloads.php on line 5
Wenn ich jedoch dasselbe Skript von der Befehlszeile aus ausführe und mich anmelde, funktioniert es einwandfrei und ohne Fehler.
Dies ist meine $PATH-Zeichenfolge an der Eingabeaufforderung:
$PATH = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
Irgendwelche Ideen oder Vorschläge? Ich bin mir sicher, dass beim Ausführen des Cronjobs kein Lib-Pfad oder ähnliches enthalten ist. Ich habe sogar versucht, den genauen Pfad hinzuzufügen