[SOLVED] Problem Executing PHP in the Command Line on SC Windows Machine (OCI.dll is missing)

I have some PHP scripts that need to be executed in the background. They will be accessing data from a MySQL database which is also updated by a SC application. Thus, I wanted to test the PHP Command Line Interface on the Windows machine on which SC is installed.

If I open a command prompt and type “PHP” + Enter, I get the following error message two times in dialogue boxes:

“The program can’t start becuase OCI.dll is missing from your computer.
Try reinstalling the program to fix this problem.”

After that the command line then displays the following:

“PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/Program Files/NetMake/v8\components\ph
p\ext\php_oci8.dll’ - The specified module could not be found.
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/Program Files/NetMake/v8\components\ph
p\ext\php_oci8_11g.dll’ - The specified module could not be found.
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/Program Files/NetMake/v8\components\ph
p\ext\php_pdo_informix.dll’ - The specified module could not be found.
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/Program Files/NetMake/v8\components\ph
p\ext\php_sqlite.dll’ - The specified module could not be found.
in Unknown on line 0”

After that the command line is in a sort of limbo state where I can type, but there is no prompt and no response to anything typed. The only way to break out of it is Ctrl-C, which returns the normal command line prompt.

Besides SC I use the RapidPHP editor, which includes a “Preview” pane showing the result of the execution of the PHP code in the editor. The first time I use the “Preview” pane I get the same dialogue message twice as shown above. But, the preview function works after that, so it has not been a stumbling block until now. Testing my PHP scripts will be a problem though, so I would like to have it solved.

Since SC installs both Apache and PHP, I would imagine that making a new installation of PHP is not the way to go as one might even spoil the SC installation.

Perhaps someone from ScriptCase knows how to fix it, so that the PHP Command Line Interface can work, since it seems to be installed.

PHP is just an executable, so yes, if you start it up it will work. But the question is which instance you are running and if the executable is loading all the required modules. It depends on php.ini and you have to see which one is used. Then enable the necessary modules to allow it to run. But this is a php config issue, not a scriptcase issue.

Hello,

Just like Albert told you. If you do not want the error to be displayed just disable the extensions in your php.ini.

Noting that the error appears due to the absence module for extensions for Oracle Database, Informix and SQLite, if you want to connect to some of these you must enable the extension. For this you can follow all the steps of our documentation.

As PHP is so like C and C# I felt right at home with it programming wise and so have not really given much thought to any set up of the interpreter.
Thanks to Albert and John for the pointer to the php.ini file.

I have commented out the references and the error messages are now gone. I will look more into the settings of the ini file.