Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #2750 (reopened defect)

Opened 4 years ago

Last modified 4 weeks ago

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

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

Description (last modified by ryandesign@…) (diff)

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

Changed 4 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.

Changed 4 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.

Changed 4 years ago by toby@…

  • severity changed from critical to normal

Changed 4 years ago by snu@…

  • owner changed from darwinports-bugs@… to bchesneau@…
  • summary changed from portfiles for php4 and php5 produce "garbled" mod_php for Apache, and a tentative fix to BUG: 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.

Changed 3 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?)

Changed 3 years ago by unknown@…

  • cc unknown@… added

Changed 3 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.

Changed 3 years ago by opendarwin-2006@…

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

Changed 2 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?

Changed 2 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!

Changed 2 years ago by markd@…

  • status changed from new to closed
  • resolution set to fixed

Thanks for the update. I'll close it.

Changed 2 years ago by markd@…

  • cc markd@… added; markd@… removed
  • status changed from closed to reopened
  • resolution fixed deleted

Looks like this may still be a problem.

Changed 2 years ago by ryandesign@…

  • cc ryandesign@… added

Changed 21 months ago by pipping@…

  • milestone set to Available Ports

Changed 21 months ago by pipping@…

  • milestone changed from Available Ports to Port Bugs

Changed 16 months ago by nox@…

  • priority changed from Expected to Normal
  • version 1.0 deleted

Changed 4 weeks ago by devans@…

  • description modified (diff)
  • port set to php4 php5

Changed 4 weeks ago by ryandesign@…

  • description modified (diff)
Note: See TracTickets for help on using tickets.