Opened 15 years ago

Closed 11 years ago

#2750 closed defect (worksforme)

BUG: php4 and php5 produce "garbled" mod_php for Apache

Reported by: lukhnos@… Owned by: bchesneau@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: markd@…, ryandesign (Ryan Schmidt), unknown@…
Port: php4 php5

Description (last modified by ryandesign (Ryan Schmidt))

Tried both the ports for php4 and php5, and both yielded mod_php files that Apache refused to load. Consulted http://www.php.net/manual/en/install.macosx.php and found there is a CFLAG env variable that seems to be missing in the existing portfile (ie. -DEAPI that produces Apache DSO)

Also, both the portfiles for php4 and php5, when variant +apache is set, seem to refer to /usr/sbin/ httpd instead of /opt/local/bin/httpd in one of its configuration settings (which are then used in the linking stage).

After adding the required CFLAG and modified the portfiles a bit, now both php4 and php5 ports work fine now.

Diff for the Portfile of www/php4:

82c82,85
<                       configure.args-append   --with-apxs=/usr/sbin/apxs
---
> #                     configure.args-append   --with-apxs=/usr/sbin/apxs
>             configure.env CFLAGS="-DBIND_8_COMPAT=1 -DEAPI -O3"
>                       depends_lib-append      path:${prefix}/sbin/apxs:apache
>                       configure.args-append   --with-apxs=${prefix}/sbin/apxs

Whereas the diff for the Portfile of php5:

<                       configure.args-append   --with-apxs=/usr/sbin/apxs
---
> #                     configure.args-append   --with-apxs=/usr/sbin/apxs
>             configure.env CFLAGS="-DBIND_8_COMPAT=1 -DEAPI -O3"
>                       depends_lib-append      path:${prefix}/sbin/apxs:apache
>                       configure.args-append   --with-apxs=${prefix}/sbin/apxs

Change History (21)

comment:1 Changed 15 years ago by lukhnos@…

Oh, I should add that the Apache I'm using is also installed by port, it's 1.3.33_2+mod_perl.

comment:2 Changed 15 years ago by lukhnos@…

And I missed one line in the diff file for php5's Portfile, the beginning is also: 82c82,85

Sorry for so much blunder I've made.

comment:3 Changed 15 years ago by toby@…

severity: criticalnormal

comment:4 Changed 15 years ago by snu@…

Owner: changed from darwinports-bugs@… to bchesneau@…
Summary: portfiles for php4 and php5 produce "garbled" mod_php for Apache, and a tentative fixBUG: php4 and php5 produce "garbled" mod_php for Apache

I have assigned this to benoitc, but he seems to have gone AWOL. If you don't hear from him soonish, I'd suggest you take moves along the lines described in the port abandonment section of the DarwinPorts Guide.

comment:5 Changed 15 years ago by moondog@…

I tested the proposed fix from Lukhnos. At least for php4 it works fine. Could someone just check the fix in. In the current state the PHP Port(s) are not very useable.

Also I found that when attempting to activate PHP there seem to be some files in /opt/local/var/php. I just "rm -r"-ed this directory and did a activate again, after which it just seems to work.

(I could start the abandoned procedure, but I'm quite new to DarwinPorts, so maybe someone else who's more experienced could take on this task?)

comment:6 Changed 15 years ago by unknown@…

Cc: unknown@… added

comment:7 Changed 14 years ago by opendarwin-2006@…

If you mean /opt/local/lib/php then that happens to many people, as evidenced by several posts on the mailing list including this one:

http://www.opendarwin.org/pipermail/darwinports/2006-February/031978.html

In any case it has nothing to do with the rest of this bug report so a separate bug should be opened.

comment:8 Changed 14 years ago by opendarwin-2006@…

It appears this /opt/local/lib/php bug is possibly being handled in bug #6379.

comment:9 Changed 14 years ago by markd@…

Cc: markd@… added

Has the problem been verified to be solved by the current versions of PHP? 4.4.4 and 5.1.5?

comment:10 Changed 14 years ago by lukhnos@…

As far as my latest experience goes, I didn't encounter any problem installing apache2 and php5. Don't know if it's true for php4 though. As for me the problem no longer exists. Thanks!

comment:11 Changed 14 years ago by markd@…

Resolution: fixed
Status: newclosed

Thanks for the update. I'll close it.

comment:12 Changed 14 years ago by markd@…

Cc: markd@… added; markd@… removed
Resolution: fixed
Status: closedreopened

Looks like this may still be a problem.

comment:13 Changed 14 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added

comment:14 Changed 13 years ago by pipping@…

Milestone: Available Ports

comment:15 Changed 13 years ago by pipping@…

Milestone: Available PortsPort Bugs

comment:16 Changed 13 years ago by nox@…

Priority: ExpectedNormal
Version: 1.0

comment:17 Changed 12 years ago by dbevans (David B. Evans)

Description: modified (diff)
Port: php4 php5 added

comment:18 Changed 12 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)

comment:19 Changed 11 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:20 Changed 11 years ago by tobypeterson

Is this still an issue?

comment:21 Changed 11 years ago by tobypeterson

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.