1756286 Members
2520 Online
108843 Solutions
New Discussion юеВ

Re: PHP error blocks

 
SOLVED
Go to solution
Willem Grooters
Honored Contributor

PHP error blocks

After upgrade SWS from 1.3 to 2.1-1, I encounter the following error when executing some commands:

RBS02323@VAGB21> httpd -t
Syntax error on line 5 of /apache$root/conf/mod_php.conf:
Can't locate API module structure `php4_module' in file /apache$root/000000/modules/mod_php_apache-2_0.exe: function not implemented

I checked apache$root:[modules]mod_php_apache-2_0.exe and it _does_ contain this entrypoint, abeit in uppercase.

The problem occurs on the next options:
-k (used for flushing or cycle of logfiles, for instance)
-S (show virtual hosts)
-t syntax check for config files

making it impossible to flush or renew the logfiles of check the configuration.

Of course, PHP doesn't work either, although all is prepared: the configuration file contains the line to include php.conf (added by the installation program)

Where to look for clues? There is nothing in ERROR_LOG or ACCESS_LOG, nor is a PHP-logfile created.

(this is a 2-node, clustered environment, it happens on both nodes)
Willem Grooters
OpenVMS Developer & System Manager
2 REPLIES 2
H.Becker
Honored Contributor
Solution

Re: PHP error blocks

>>> Can't locate API module structure `php4_module' ...

... is likely the result of a dlsym() aka lib$fis. Unfortunately it doesn't give you much detail. It can be that it didn't find the lowercase name. Unkikely, lib$fis by default is case insensitive. It can be that a required shareable image for mod_php_apache-2_0. can't be found. For example PHPSHR.

I would check if I can activate MOD_PHP_APACHE-2_0, like

$ r APACHE$COMMON:[MODULES]MOD_PHP_APACHE-2_0
%DCL-W-ACTIMAGE, error activating image PHPSHR
-CLI-E-IMAGEFNF, image file not found $1$DKA500:[SYS0.SYSCOMMON.][SYSLIB]PHPSHR.
EXE;
$
Willem Grooters
Honored Contributor

Re: PHP error blocks

H. Becker's example revealed the same output:

$ r APACHE$COMMON:[MODULES]MOD_PHP_APACHE-2_0
%DCL-W-ACTIMAGE, error activating image PHPSHR
-CLI-E-IMAGEFNF, image file not found DSA1:[SYS2.SYSCOMMON.][SYSLIB]PHPSHR.EXE;

Solved by:

$ DEFINE/SYSTEM/EXEC PHPSHR APACHE$ROOT:[PHP.BIN]PHPSHR.EXE

After that:


$ r APACHE$COMMON:[MODULES]MOD_PHP_APACHE-2_0
%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000000000
2204, PC=00000000002B09D0, PS=0000001B
...

and httpd -k flush now works.
Willem Grooters
OpenVMS Developer & System Manager