Opened 6 years ago

Closed 6 years ago

#26 closed defect (fixed)

oci8 extension issues with PHPMapScript

Reported by: Jeff McKenna Owned by: Jeff McKenna
Priority: major Milestone: 3.1.2 release
Component: MS4W - PHP Version: 3.1.0
Keywords: Cc: Bjorn1234
Blocked By: Blocking:


  • reported by Björn Danielsson:
I commented php_oci8_11g.dll in the ini-file as you said and ran phpinfo twice, once with the libmap.dll for Oracle and once with the standard libmap.dll.
With the standard libmap.dll MapScript is loaded, but with the libmap.dll for Oracle neither oci8 nor MapScript is loaded.
The only uncommented modules in my ini-file now are php_curl, php_fileinfo, php_gd2, php_intl and php_mapscript. The error messages in Apaches error.log disappeared when php_mbstring and php_exif were commented.
So it seems to be a php/oracle problem.
I use oracle instantclient_11_2 while in 3.1.0 the name is oracle12. Is that an issue? Oracle versions?

Change History (9)

comment:2 by Jeff McKenna, 6 years ago

Cc: Bjorn1234 added

comment:3 by Jeff McKenna, 6 years ago

comment:4 by Jeff McKenna, 6 years ago

Milestone: 3.1.1 release3.1.2 release

comment:5 by Bjorn1234, 6 years ago


I have tried version 3.1.1.

Both oci8 and php_mapscript are loaded.
However, there is a problem with environment variable PATH. oci_pconnect to Oracle returns: oci_pconnect(): OCIEnvNlsCreate() failed.'....please check that PATH includes the directory with Oracle Instant Client libraries ...'.

phpinfo's environmental variable PATH just contains /ms4w/Apache/cgi-bin, which is the content of Apache's conf-file SetEnv PATH. After having commented SetEnv in the conf-file and restarted Apache phpinfo now shows all items in the registry PATH, just like version 3.0.6 does. Unfortunately this does not solve the PATH problem with oci_pconnect(), which still can't find the Oracle Instant Client libraries. I have not tried to copy all the contains from /Oracle/instantclient_11_2 to /Apache/cgi-bin which perhaps might work. It seems a bit too rough a measure.

I have no idea what to try next.

Björn D

comment:6 by Bjorn1234, 6 years ago


Got it working!

After some thinking I remembered that I after getting errors moved oci.dll from oracle instant client to apache/cgi-bin as a test. When I just now deleted oci.dll from cgi-bin and commented PATH in the conf file it all worked.

So the remaining problem seems to be that SetEnv PATH in the conf file blocks PATH from the registry.

Björn D

comment:7 by Jeff McKenna, 6 years ago

Thank you for this research. This will help for the next build. I'll leave this ticket open until it is resolved.

comment:8 by Jeff McKenna, 6 years ago

This Apache PATH change is available in today's MS4W 3.1.2 release. Please download and test:

comment:9 by Jeff McKenna, 6 years ago

Resolution: fixed
Status: newclosed

Closing. Please re-open if issue still occurs with MS4W 3.1.2 release

Note: See TracTickets for help on using tickets.