Filin A.
2005-11-19 22:27:24 UTC
Hi all.
I'm trying to use Apache::Test module for testing my
php driven site
(Linux, Apache 2.0, PHP 4.3).
Everything works pretty good, but when I try to test a
php page which uses any
of mysql functions - the test fails and the error_log
contains these lines:
...
PHP Warning: Unknown(): Unable to load dynamic
library './mysql.so' - ./mysql.so: cannot open shared
object file: No such file or directory in Unknown on
line 0
PHP Warning: Unknown(): Unable to load dynamic
library './xmlrpc.so' - ./xmlrpc.so: cannot open
shared object file: No such file or directory in
Unknown on line 0
...
[Client 127.0.0.1] PHP Fatal error: Call to
undefined function: mysql_connect() in
/home/filin/work-varavka/staff/htdocs/_inc/dbconnect.inc.php
on line 8
...
I think a line in the t/conf/php.ini:
extension_dir = "./"
means that php seeks libraries in the current
directory, while those
libraries are in the /usr/lib/php4/. Thereby I have 2
questions:
1) Why it is necessary to have a special php.ini for
testing?
2) How can I test (in a sane manner) php code with
functions from
dynamic libraries?
I've tried to copy mysql.so in the "current
directory", in all
meanings of "current" which I could imagine but
without any success.
I've successfully tried to modify the
Apache::TestConfigPHP
so that it generates now
'extension_dir="/usr/lib/php4/"',
but I don't think it is a good solving...
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I'm trying to use Apache::Test module for testing my
php driven site
(Linux, Apache 2.0, PHP 4.3).
Everything works pretty good, but when I try to test a
php page which uses any
of mysql functions - the test fails and the error_log
contains these lines:
...
PHP Warning: Unknown(): Unable to load dynamic
library './mysql.so' - ./mysql.so: cannot open shared
object file: No such file or directory in Unknown on
line 0
PHP Warning: Unknown(): Unable to load dynamic
library './xmlrpc.so' - ./xmlrpc.so: cannot open
shared object file: No such file or directory in
Unknown on line 0
...
[Client 127.0.0.1] PHP Fatal error: Call to
undefined function: mysql_connect() in
/home/filin/work-varavka/staff/htdocs/_inc/dbconnect.inc.php
on line 8
...
I think a line in the t/conf/php.ini:
extension_dir = "./"
means that php seeks libraries in the current
directory, while those
libraries are in the /usr/lib/php4/. Thereby I have 2
questions:
1) Why it is necessary to have a special php.ini for
testing?
2) How can I test (in a sane manner) php code with
functions from
dynamic libraries?
I've tried to copy mysql.so in the "current
directory", in all
meanings of "current" which I could imagine but
without any success.
I've successfully tried to modify the
Apache::TestConfigPHP
so that it generates now
'extension_dir="/usr/lib/php4/"',
but I don't think it is a good solving...
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com