New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #34373 (closed defect: invalid)

Opened 13 months ago

Last modified 13 months ago

Trouble installing/activating php5

Reported by: marzzed@… Owned by: ryandesign@…
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc:
Port: php5

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

Error: Target org.macports.checksum returned: apr-1.4.6.tar.bz2 does not exist in /opt/local/var/macports/distfiles/apr

command:

sudo port install php5-imap

latest xcode and macports installed.

Attachments

main.log (17.5 KB) - added by marzzed@… 13 months ago.
log for failing install php5

Change History

comment:1 Changed 13 months ago by ryandesign@…

  • Owner changed from macports-tickets@… to dluke@…
  • Cc ryandesign@… added
  • Description modified (diff)
  • Keywords php-imap, apr fail removed
  • Summary changed from apr failed install with php_imap install, mac OS 10.7.3 to apr: apr-1.4.6.tar.bz2 does not exist

Please use:

sudo port clean --all apr

Then try again.

comment:2 Changed 13 months ago by marzzed@…

I downloaded the right package from apache and then tried again. Now it fails on php5.

Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)
Error: Failed to install php5

from logfile:

:error:configure Failed to install php5
:debug:configure couldn't open "/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/tclIndex": no such file or directory
    while executing
"open [file join $dir tclIndex]"

comment:3 Changed 13 months ago by ryandesign@…

Please attach the entire main.log file so we can see what went wrong.

Changed 13 months ago by marzzed@…

log for failing install php5

comment:4 Changed 13 months ago by marzzed@…

cleaned php
ran update on dependencis
macports fetched php.
the "sudo port install php5-imap" finally stopped complaining.

I now have a functional webserver in another dir (wich is as it should) but no php.
Ran the suggested commands (from the install)

/opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so

wich gives me:

/opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
[activating module `php5' in /opt/local/apache2/conf/httpd.conf]
unable to open configuration file

I give up.

comment:5 Changed 13 months ago by cal@…

Did you use sudo for that? IIRC apxs needs to write the configuration file to enable a module and the file is probably only writable by root.

comment:6 Changed 13 months ago by marzzed@…

actually I didnt. But now I did. no errors but still no php.

comment:7 Changed 13 months ago by cal@…

Did you restart apache? How did you determine PHP doesn't work? Is your server properly configured to use mod_php?

comment:8 Changed 13 months ago by marzzed@…

I restarted the computer and ran the load apache command. If my server is configured to use mod_php I am not sure if I understand what you mean. I thought that the install and the following commands should take care of that.

I used php with my default apache with no problem. Now all I get is the php scripts written out in plain text on the webpage.

comment:9 Changed 13 months ago by dluke@…

  • Cc ryandesign@… removed
  • Owner changed from dluke@… to ryandesign@…
  • Port changed from apr to php5
  • Summary changed from apr: apr-1.4.6.tar.bz2 does not exist to Trouble installing/activating php5

You probably need to configure apache to process your php files with the php module.

php.net recommends:

<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>

comment:10 Changed 13 months ago by marzzed@…

well, thanks.

I gave it a try (much more time spent than I have).

I really have to let this one go. It will be a ubuntu story from here on.

to admin: delete this ticket if you want too.

comment:11 Changed 13 months ago by ryandesign@…

  • Status changed from new to closed
  • Resolution set to invalid

I'm sorry you had trouble getting MacPorts php to work. I'm closing this ticket since I don't see any MacPorts bug. Instructions for setting up MacPorts PHP are in wiki:howto/MAMP#php. If you need further help you should write to the macports-users mailing list. The issue tracker is for bug reports and feature requests, not for support issues.

I've fixed the WikiFormatting in the preceding comments. Remember to preview before submitting to ensure your formatting is right.

Note: See TracTickets for help on using tickets.