Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Extensions with PHP module API 1020041030?



3:04 pm on Feb 11, 2005 (gmt 0)

10+ Year Member

I recently reinstalled PHP 5.03 as FastCGI and with the hardened patch (under FreeBSD 4.10 using the www/php5-cgi port). Ever since then, I've been unable to add/reinstall extensions, as they fail with the following error:

PHP Warning: PHP Startup: session: Unable to initialize module
Module compiled with module API=20041030, debug=0, thread-safety=0
PHP compiled with module API=1020041030, debug=0, thread-safety=0
These options need to match
in Unknown on line 0

I have no clue as to why PHP says it is using module API 1020041030 instead of 20041030 or as to how make php-extensions using API 20041030 :-?

Clue's anyone?


4:57 pm on Feb 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

maybe you need to compile the modules explicitly for the hardened php version. or: the hardened php version works only with a selection of all modules to ensure being safe.


12:05 am on Feb 13, 2005 (gmt 0)

10+ Year Member

It seems to be the first. However, how do I do that? (or better, how do I do that using freeBSD ports?)


1:59 pm on Feb 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

i'm sorry, but i never haved compiled any module for php. maybe the installation instructions for the haredened php version have some tips/hints/more infos about that. i think you're not the only one who has that problem, but i can't give you a shoort therefore.


2:24 pm on Feb 13, 2005 (gmt 0)

10+ Year Member

From the Hardened PHP documentation:

Hardened-PHP is not binary compatible to normal PHP anymore.
If you want to use closed source extension with it, you
must ask your vendor, to provide some linked against H-PHP.
Open Source extensions will work like before, but need a

Tried that, but it keeps compiling against non-hardened php.

Checked the FreeBSD ports history and some provided a patch (http://www.freebsd.org/cgi/query-pr.cgi?pr=74919) for hardened PHP, but it was dismissed:

This patch breaks lang/php4-extensions - it tries to repatch the source
for every extension installed.

But at least I have a direction to search for a sollution.

Thanks for your feedback!


Featured Threads

Hot Threads This Week

Hot Threads This Month