alain34
asked on
Php_oci8 module not working with php when invoked from the command line
I'm trying to connect to Oracle from a php script.
I would like to use the php_oci8 module.
I have change php.ini to load php_oci8.dll extension but I get the following error
PHP Warning: PHP Startup: oci8: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
Where can I find a php_oci8.dll that has a thread-safety=0
I have already downloaded the latest nts version on this page http://www.php.net/downloads.php and I still get the same error.
Can somebody help?
Regards,
Alain
I would like to use the php_oci8 module.
I have change php.ini to load php_oci8.dll extension but I get the following error
PHP Warning: PHP Startup: oci8: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
Where can I find a php_oci8.dll that has a thread-safety=0
I have already downloaded the latest nts version on this page http://www.php.net/downloads.php and I still get the same error.
Can somebody help?
Regards,
Alain
ASKER
Thanks,
I have tried to do that in the past and I failed.
I knew about somebody compiling it and it still didn't work.....
http://perisama.net/downloads/PHP/
Any other options?
Cheers,
Alain
I have tried to do that in the past and I failed.
I knew about somebody compiling it and it still didn't work.....
http://perisama.net/downloads/PHP/
Any other options?
Cheers,
Alain
Did the oci module come with the PHP version that you downloaded (the ZIP file is the one that contains all the extensions)?
ASKER
yes, the php_oci8 come from http://www.php.net/get/php-5.2.9-nts-Win32.zip/from/a/mirror
If the PHP module came from the nts package, then I would double-check to make sure there are no other PHP versions being loaded accidentally. The message you originally posted seems to indicate that it's loading the correct OCI8 module, but it's loading a version of PHP that has thread_safety turned on, which shouldn't be the case (I'm guessing) for an NTS package.
Are you running PHP from the command line (unpacking the ZIP into a new directory, going to the command line, cd-ing into the directory and running the php.exe binary) or are you accessing PHP from Apache or a web server?
Are you running PHP from the command line (unpacking the ZIP into a new directory, going to the command line, cd-ing into the directory and running the php.exe binary) or are you accessing PHP from Apache or a web server?
ASKER
I'm running it from the command line doing
c:\php5.nts\php.exe scriptname.php
c:\php5.nts\php.exe scriptname.php
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Were you able to figure out what was happening?
ASKER
I have many installation of php (ts and nts) and the php.exe for nts was using extension from the apache ts implementation
If you're doing all the compiling of PHP and its modules, then everything should work together. It's not exactly simple stuff, but it's possible.