View Issue Details

IDProjectCategoryView StatusLast Update
0000756PHP for OS/2, ArcaOS & eComStation (PHP versions v8.x v7.x v5.x)Feature Requestpublic2022-05-19 03:31
ReporterSteven Levine Assigned ToSteven Levine  
Status resolvedResolutionfixed 
PlatformOS2/eCSOSOS/2 or eComstationOS Version1.x 2.x or 4.5
Fixed in Version8.1.6 
Summary0000756: Avoid need to add the php extensions directory to LIBPATH or BEGINLIBPATH.
Descriptionphp requires that extensions directories must be in LIBPATH, BEGINLIBPATH or ENDLIBPATH or the extensions will fail to load. A typical solution is that add the extensions directory to BEGINLIBPATH before starting httpd or php.
Adding the directory to the LIBPATH, can work but if there is a need to work with multiple php installations.

The proposed solution is to modify ext\standard\dl.c so that if the extension directory is not already in BEGINLIBPATH, invoke DosSetExtLIBPATH to add the directory.
TagsNo tags attached.


Steven Levine

2022-05-12 09:29

manager   ~0004226

This feature will be implemented by and friends.


2022-05-13 18:45

administrator   ~0004229 has this PR included. I forgot to modify makefile for debug, so debug symbols will have to wait :/


2022-05-13 19:28

administrator   ~0004230 should be a debug build :)

Steven Levine

2022-05-14 05:44

manager   ~0004233

This looks good.

Not in environment "BEGINLIBPATH"

>php -c. -f mysql_shl.php

Notice: PHP Startup: update_beginlibpath set BEGINLIBPATH to modules\;%BEGINLIBPATH% in Unknown on line 0
Connected successfully
Select returned 271 rows

.\php.ini, which is set up for local testing, contains

extension_dir = "modules/"


>php -f mysql_shl.php

Notice: PHP Startup: update_beginlibpath set BEGINLIBPATH to d:\internet\php7\modules\;%BEGINLIBPATH% in Unknown on line 0
Connected successfully
Select returned 271 rows

The production php.ini contains:

extension_dir = "d:/internet/php7/modules/"

Let me know if anything shows up in your testing.

Steven Levine

2022-05-14 05:59

manager   ~0004235

This patch does not avoid the need for BEGINLIBPATH when php is invoked via modphp7.dll which statically links to php7.dll. I'm not sure yet what a generic should might look like. It will probably take a new httpd directive.

Steven Levine

2022-05-14 06:19

manager   ~0004236

I'm thinking that OS2LibPath would be a good name for the directive. I have to figure out where the code should live. Probably mod_so.c, along with the other BEGINLIBPATH patches.


2022-05-14 06:41

administrator   ~0004238

I plan to try and test today,I've been focussing on getting the php-8.1 branch building, and merged to the 8.1.6 code :)

Steven Levine

2022-05-19 03:31

manager   ~0004316

Implemented for both 7.4.28 and 8.1.6.

Will need additional BEGINLIBPATH support in httpd to allow modphp.dll to find and load php.dll. This will a separate ticket.

Issue History

Date Modified Username Field Change
2022-05-10 13:23 Steven Levine New Issue
2022-05-10 13:23 Steven Levine Status new => assigned
2022-05-10 13:23 Steven Levine Assigned To => Steven Levine
2022-05-12 09:29 Steven Levine Note Added: 0004226
2022-05-13 18:45 psmedley Note Added: 0004229
2022-05-13 19:28 psmedley Note Added: 0004230
2022-05-14 05:44 Steven Levine Note Added: 0004233
2022-05-14 05:59 Steven Levine Note Added: 0004235
2022-05-14 06:19 Steven Levine Note Added: 0004236
2022-05-14 06:41 psmedley Note Added: 0004238
2022-05-19 03:31 Steven Levine Status assigned => resolved
2022-05-19 03:31 Steven Levine Resolution open => fixed
2022-05-19 03:31 Steven Levine Fixed in Version => 8.1.6
2022-05-19 03:31 Steven Levine Note Added: 0004316