Opened 7 years ago

Last modified 4 years ago

#56029 assigned defect

ERR_EMPTY_RESPONSE on Userdirs

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

Description

I did clean install Apache 2.4 PHP 7.2 For now I don't even know if PHP works. On Apache 2.2 I didnt have any problems now I got error trying to access localhost/~sebastian. Looks there is some error with Userdirs. I am on El Capitan.

Google from last year shows only 2 pages of result and nothing relevant to solve the problem.

Attachments (3)

Zrzut Ekranu 2018-03-13 o 13.20.18.png (23.1 KB) - added by Behinder (behinder) 7 years ago.
httpd.conf (20.3 KB) - added by Behinder (behinder) 7 years ago.
httpd-userdir.conf (683 bytes) - added by Behinder (behinder) 7 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 7 years ago by Schamschula (Marius Schamschula)

Have you looked at wiki:howto/Apache2 ? or, for that matter https://httpd.apache.org/docs/2.4/upgrading.html ?

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

comment:2 Changed 7 years ago by neverpanic (Clemens Lang)

Cc: ryandesign added
Milestone: MacPorts 2.4.3
Owner: set to Schamschula
Status: newassigned

Please do not set the milestone field for port tickets.

comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Definitely going to need more information from you. Can you show us the exact error messages you got?

Changed 7 years ago by Behinder (behinder)

comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Oh. Ok. Is there anything in the server's log file when that happens?

comment:5 Changed 7 years ago by Behinder (behinder)

I attached screenshot from Chrome. it said server didnt get any data. On Safari it states connection was broke up and sometimes it happend because of huge overload of server (but there is no work on my localhost doing at the moment) so error message is confusing.

I deleted 2.2 and install 2.4 from scratch and configured it manually with only small edits regarding php.

I have PHP 7.2 on another machine on Sierra installed with HomeBrew and it works and on another machine with Ubuntu NgINX with PHP 7.2 and it works as expected. So not sure what is goin on here :( Do you want my configuration files?

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

I'm seeing it first time the only things that logged (I set errorlevel as "error") are:


2018-03-13 13:29:01.654 httpd[56917:9747753] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:01.710 httpd[56918:9747754] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:01.771 httpd[56919:9747758] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:02.216 httpd[56920:9747759] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:02.295 httpd[56921:9747760] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:02.360 httpd[56939:9748985] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:07.452 httpd[56940:9749018] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:07.504 httpd[56941:9749019] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:07.561 httpd[56942:9749214] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:22.232 httpd[56943:9749215] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:22.301 httpd[56944:9749216] The application with bundle ID (null) is running setugid(), which is not allowed. 2018-03-13 13:29:22.363 httpd[56945:9749217] The application with bundle ID (null) is running setugid(), which is not allowed.


Version 0, edited 7 years ago by Behinder (behinder) (next)

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

How did you start apache? It seems that your error is connected with running apache on a privileged (port < 1024) without sufficient privileges.

Usually sudo port load apache2 should work.

comment:8 Changed 7 years ago by Behinder (behinder)

sudo /opt/local/sbin/apachectl -k start
Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 in reply to:  8 Changed 7 years ago by Schamschula (Marius Schamschula)

Replying to Behinder:

sudo /opt/local/sbin/apachectl -k start

I'm not sure what the -k option is doing here. According to the httpd man page its a Windows only option. I'm assuming it is being ignored.

At this point your httpd.conf file might help shed some light on any configuration issues.

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

Changed 7 years ago by Behinder (behinder)

Attachment: httpd.conf added

Changed 7 years ago by Behinder (behinder)

Attachment: httpd-userdir.conf added

comment:10 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

This could be caused by an incompatible PHP extension, or maybe even an interaction between two extensions. Try disabling (using sudo port deactivate) all the extensions you have installed for this PHP version, then restart the web server and see if basic PHP scripts work now. If so, you'll need to isolate which extension is causing the problem, for example by reactivating extensions one at a time, restarting the web server after each one and retesting your basic PHP script until it stops working again.

comment:11 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Well I see this error too now, on macOS 10.13.6 with apache2 @2.4.46_0+preforkmpm and php80-apache2handler @8.0.0, with no other extensions active, when I try to access a script that calls phpinfo(); regardless of whether the script is in a userdir or elsewhere. A simple php script that calls echo works however.

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

And now I've fixed it but I'm not exactly sure what I did. It may have been that I had not included the correct conf file, which I see from your httpd.conf you haven't either. Make sure you have this line at the end of httpd.conf:

Include etc/apache2/extra/mod_php72.conf

or whatever php version matches your LoadModule statement earlier in the file.

Note: See TracTickets for help on using tickets.