Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#58454 closed defect (worksforme)

After 2 years userdirs and php stll not function correctly [El Capitan]

Reported by: Behinder (behinder) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Schamschula (Marius Schamschula)
Port: apache2

Description (last modified by Behinder (behinder))

Maybe nobody maintains this port anymore or maybe nobody notice because internet is full of tutorials using HomeBrew. After some problems with my MAMP I decided to give Apache2.4 a try after several months. And the problems are still the same:

  1. Why in 2.4 userdir settings are for /~username syntax? it should be /username since it's preffered behaviour nowadays. In 2.2 it worked without problems.
  1. With php7.35 and apache2handler and module properly added in httpd.conf php files are still not properly read from my /~sebastian directory (i have there only index.php file with phpinfo() function and get error empty response)

I am attaching relevant files. APache2 and Php 7.3.5 was fresh install. This makes me nuts and literally I am now without development environment (since MAMP has unresolved problems with caching)

And again why the hell which httpd shows the one built-in with system? the same as which php gives me path to macports php, so for httpd it should ALWAYS give precedence for those binary that is default to run

Attachments (3)

httpd.conf (20.4 KB) - added by Behinder (behinder) 6 years ago.
httpd-userdir.conf (683 bytes) - added by Behinder (behinder) 6 years ago.
Zrzut Ekranu 2019-05-07 o 23.48.36.png (38.6 KB) - added by Behinder (behinder) 6 years ago.

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by Behinder (behinder)

Attachment: httpd.conf added

Changed 6 years ago by Behinder (behinder)

Attachment: httpd-userdir.conf added

Changed 6 years ago by Behinder (behinder)

comment:1 Changed 6 years ago by Behinder (behinder)

Description: modified (diff)

comment:2 Changed 6 years ago by Schamschula (Marius Schamschula)

1) Maybe because that's the way Apache's mod_userdir works by default?

See https://httpd.apache.org/docs/2.4/mod/mod_userdir.html and "User Directories" in https://httpd.apache.org/docs/2.4/urlmapping.html

2) You'll need to edit /opt/local/etc/apache2/extra/httpd-userdir.conf and add

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

comment:3 Changed 6 years ago by jmroot (Joshua Root)

Cc: Schamschula added
Owner: set to ryandesign
Status: newassigned

comment:4 Changed 6 years ago by kencu (Ken)

So -- I don't see us changing Apache's default installation options.

The other thing -- about which httpd -- has to do with how you would like to set your path, and you can set that up however you want.

Is there anything to actually fix in this ticket? It does not seem that there is. Shall we close?

comment:5 Changed 6 years ago by Schamschula (Marius Schamschula)

The only thing I can think of is updating/expanding wiki:howto/PHP

Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 6 years ago by Schamschula (Marius Schamschula)

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