[MacPorts] #20527: PHP 5 not loading extensions properly
#20527: PHP 5 not loading extensions properly ----------------------------------+----------------------------------------- Reporter: tobias@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: php5, mcrypt | Port: php5 ----------------------------------+----------------------------------------- Hello, I just did a fresh install of PHP 5.3 and php5-mcrypt. However, PHP refrains from loading the extension. Here's the output of php -v: PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with build ID=API20090626,NTS PHP compiled with build ID=API20090626,TS These options need to match in Unknown on line 0 Variant used for PHP5: +mysql5 If somebody can point me to the right direction, I'd greatly appreciate it! I addition, it'd be nice if the variants found in the php5 port could be distinguished from the ones found in the php5 extension ports. For example, the php5 port includes the same mysql variants as the php5-mysql extension port. My understanding is that you can have built-in MySQL support (e.g., mysql5 variant in php5 port), or have MySQL support as an extension (mysql5 variant in php5-mysql port). Still, it's a bit confusing, but it's only my 2 cents. Thanks, Tobias -- Ticket URL: <http://trac.macports.org/ticket/20527> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: PHP 5 not loading extensions properly ----------------------------------+----------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: php5, mcrypt | Port: php5 ----------------------------------+----------------------------------------- Changes (by blb@…): * cc: jwa@… (added) * owner: macports-tickets@… => ryandesign@… -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: PHP 5 not loading extensions properly ----------------------------------+----------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: php5, mcrypt | Port: php5 ----------------------------------+----------------------------------------- Old description:
Hello,
I just did a fresh install of PHP 5.3 and php5-mcrypt. However, PHP refrains from loading the extension. Here's the output of php -v:
PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with build ID=API20090626,NTS PHP compiled with build ID=API20090626,TS These options need to match in Unknown on line 0
Variant used for PHP5: +mysql5
If somebody can point me to the right direction, I'd greatly appreciate it!
I addition, it'd be nice if the variants found in the php5 port could be distinguished from the ones found in the php5 extension ports. For example, the php5 port includes the same mysql variants as the php5-mysql extension port. My understanding is that you can have built-in MySQL support (e.g., mysql5 variant in php5 port), or have MySQL support as an extension (mysql5 variant in php5-mysql port). Still, it's a bit confusing, but it's only my 2 cents.
Thanks, Tobias
New description: Hello, I just did a fresh install of PHP 5.3 and php5-mcrypt. However, PHP refrains from loading the extension. Here's the output of php -v: {{{ PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with build ID=API20090626,NTS PHP compiled with build ID=API20090626,TS These options need to match in Unknown on line 0 }}} Variant used for PHP5: +mysql5 If somebody can point me to the right direction, I'd greatly appreciate it! I addition, it'd be nice if the variants found in the php5 port could be distinguished from the ones found in the php5 extension ports. For example, the php5 port includes the same mysql variants as the php5-mysql extension port. My understanding is that you can have built-in MySQL support (e.g., mysql5 variant in php5 port), or have MySQL support as an extension (mysql5 variant in php5-mysql port). Still, it's a bit confusing, but it's only my 2 cents. Thanks, Tobias -- Comment(by ryandesign@…): Replying to [ticket:20527 tobias@…]:
I just did a fresh install of PHP 5.3 and php5-mcrypt. However, PHP refrains from loading the extension. Here's the output of php -v:[[br]] [[br]] PHP Warning: PHP Startup: mcrypt: Unable to initialize module[[br]] Module compiled with build ID=API20090626,NTS[[br]] PHP compiled with build ID=API20090626,TS[[br]] These options need to match[[br]] in Unknown on line 0[[br]] [[br]] Variant used for PHP5: +mysql5
If somebody can point me to the right direction, I'd greatly appreciate it!
"NTS" means "not thread safe"; "TS" means "thread safe". Did something change about your php or apache between the time that you installed php5 and the time that you installed php5-mcrypt? Maybe try rebuilding php5 (sudo port -nf upgrade php5); see if PHP is then "NTS" as well.
I addition, it'd be nice if the variants found in the php5 port could be distinguished from the ones found in the php5 extension ports. For example, the php5 port includes the same mysql variants as the php5-mysql extension port. My understanding is that you can have built-in MySQL support (e.g., mysql5 variant in php5 port), or have MySQL support as an extension (mysql5 variant in php5-mysql port). Still, it's a bit confusing, but it's only my 2 cents.
The variants [ticket:19091 are being moved] from the php5 port into separate ports. There are many variants so it is taking some time to do, and as you've discovered, I am in the middle of this transition. The variants will be removed from the php5 port as soon as the separate ports are working correctly. (The php5-mysql port, for example, [ticket:20530 is not working] the way I want.) -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: PHP 5 not loading extensions properly ----------------------------------+----------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: php5, mcrypt | Port: php5 ----------------------------------+----------------------------------------- Comment(by tobias@…): Hi Ryan, thanks for clarification. I'll give it another shot when I'm at home again. Could the issue depend on the fact that I've compiled Apache 2 using the workermpm option? -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: PHP 5 not loading extensions properly ----------------------------------+----------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Keywords: php5, mcrypt | Port: php5 ----------------------------------+----------------------------------------- Comment(by tobias@…): Back again. After rebuilding PHP 5 a few times, I finally found the solution: You must not build Apache 2 using the workermpm variant. Here's my approach: 1) sudo port -f uninstall apache 2 (uninstall apache2+workermpm) 2) sudo port install apache2 (install Apache 2 with +workermpm disabled in /opt/local/etc/macports/variants.conf) 3) sudo port -fn upgrade php5 4) sudo port -fn upgrade php5-mcrypt For some reason, port -fn upgrade apache2 ignored that I already unset workermpm in my variants.conf and still built apache2 with the workermpm variant, so I had to to apply the two steps described in 1) and 2). -Tobias -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: php5 +apache2 not loading extensions with apache2 +workermpm -----------------------------------+---------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: invalid | Keywords: php5, mcrypt Port: php5 | -----------------------------------+---------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => invalid Comment: Ok, thanks for finding that out. So it was a problem of mismatched parts, some being thread-safe and some being non-thread-safe. If you want to use Apache with the worker mpm and thus use PHP thread-safe, please ask in a PHP support venue (their mailing list, newsgroup, etc.) how to also compile the modules thread-safe. I'm going to close this as "invalid" for now but if there is something we need to change in the MacPorts PHP module ports related to making them work with thread-safe PHP, please let me know. -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: php5 +apache2 not loading extensions with apache2 +workermpm -----------------------------------+---------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: invalid | Keywords: php5, mcrypt Port: php5 | -----------------------------------+---------------------------------------- Comment(by ryandesign@…): See also #21281. I believe I'm going to require that apache2 be compiled using its default +preforkmpm variant if you want to use the php5 apache module. -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: php5 +apache2 not loading extensions with apache2 +workermpm -----------------------------------+---------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: invalid | Keywords: php5, mcrypt Port: php5 | -----------------------------------+---------------------------------------- Comment(by tobias@…): Thanks. Right now, I'm staying with my custom PHP 5.2 port, as some apps are still not compatible with PHP 5.3. However, I'll give it a try once this is the case. -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20527: php5 +apache2 not loading extensions with apache2 +workermpm -----------------------------------+---------------------------------------- Reporter: tobias@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.7.1 Resolution: invalid | Keywords: php5, mcrypt Port: php5 | -----------------------------------+---------------------------------------- Comment(by blb@…): Note that there is now a php52 port if you don't want php5 (at 5.3). -- Ticket URL: <http://trac.macports.org/ticket/20527#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts