Apache can't load PHP unsigned extensions on Mac OS Mojave
up vote
3
down vote
favorite
After upgrading to MacOS Mojave, Apache can't load PHP extensions anymore. With any extension I get the error below on the Apache log; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache.
Is there any workaround that would not involve to disable MacOS's SIP?
Failed loading //usr/local/php/extensions/xdebug.so: dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found. Did find:
//usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.so)
not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned?
Code has to be at least ad-hoc signed.
//usr/local/php/extensions/xdebug.so: stat() failed with errno=22
macos apache-http-server
|
show 4 more comments
up vote
3
down vote
favorite
After upgrading to MacOS Mojave, Apache can't load PHP extensions anymore. With any extension I get the error below on the Apache log; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache.
Is there any workaround that would not involve to disable MacOS's SIP?
Failed loading //usr/local/php/extensions/xdebug.so: dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found. Did find:
//usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.so)
not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned?
Code has to be at least ad-hoc signed.
//usr/local/php/extensions/xdebug.so: stat() failed with errno=22
macos apache-http-server
1
See this thread for workarounds: (1) Install apache and php from homebrew (answer by suneet64), (2) Add to/etc/apache2/httpd.conf
the lineLoadModule php7_module libexec/apache2/libphp7.so
at the end, (3) Still in/etc/apache2/httpd.conf
uncomment line 545 that saysInclude /private/etc/apache2/other/*.conf
. Let me know if one or more of them solved the problem and I will add a more detailed answer.
– harrymc
Oct 1 at 20:22
same problem here withdispatcher-apache2.4-4.2.0.so
– daVe
Oct 2 at 8:39
@harrymc Thanks for the suggestion, but is there any other workaround that does not involve having to install a new instance of apache / php ?
– delphirules
Oct 2 at 13:46
The above workarounds are independent. Try number (2) and (3) and wait with (1) until you decide to try it.
– harrymc
Oct 2 at 14:15
@harrymc Should i do 2 AND 3, or only 2 or 3 ?
– delphirules
Oct 2 at 15:42
|
show 4 more comments
up vote
3
down vote
favorite
up vote
3
down vote
favorite
After upgrading to MacOS Mojave, Apache can't load PHP extensions anymore. With any extension I get the error below on the Apache log; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache.
Is there any workaround that would not involve to disable MacOS's SIP?
Failed loading //usr/local/php/extensions/xdebug.so: dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found. Did find:
//usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.so)
not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned?
Code has to be at least ad-hoc signed.
//usr/local/php/extensions/xdebug.so: stat() failed with errno=22
macos apache-http-server
After upgrading to MacOS Mojave, Apache can't load PHP extensions anymore. With any extension I get the error below on the Apache log; it seems that Apple implemented Library Validation through Apache on MacOS Mojave. That makes it apparently impossible to load unsigned binaries with Apache.
Is there any workaround that would not involve to disable MacOS's SIP?
Failed loading //usr/local/php/extensions/xdebug.so: dlopen(//usr/local/php/extensions/xdebug.so, 9): no suitable image found. Did find:
//usr/local/php/extensions/xdebug.so: code signature in =(//usr/local/php/extensions/xdebug.so)
not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned?
Code has to be at least ad-hoc signed.
//usr/local/php/extensions/xdebug.so: stat() failed with errno=22
macos apache-http-server
macos apache-http-server
edited Nov 28 at 0:12
CJ Dennis
413516
413516
asked Oct 1 at 18:50
delphirules
2371415
2371415
1
See this thread for workarounds: (1) Install apache and php from homebrew (answer by suneet64), (2) Add to/etc/apache2/httpd.conf
the lineLoadModule php7_module libexec/apache2/libphp7.so
at the end, (3) Still in/etc/apache2/httpd.conf
uncomment line 545 that saysInclude /private/etc/apache2/other/*.conf
. Let me know if one or more of them solved the problem and I will add a more detailed answer.
– harrymc
Oct 1 at 20:22
same problem here withdispatcher-apache2.4-4.2.0.so
– daVe
Oct 2 at 8:39
@harrymc Thanks for the suggestion, but is there any other workaround that does not involve having to install a new instance of apache / php ?
– delphirules
Oct 2 at 13:46
The above workarounds are independent. Try number (2) and (3) and wait with (1) until you decide to try it.
– harrymc
Oct 2 at 14:15
@harrymc Should i do 2 AND 3, or only 2 or 3 ?
– delphirules
Oct 2 at 15:42
|
show 4 more comments
1
See this thread for workarounds: (1) Install apache and php from homebrew (answer by suneet64), (2) Add to/etc/apache2/httpd.conf
the lineLoadModule php7_module libexec/apache2/libphp7.so
at the end, (3) Still in/etc/apache2/httpd.conf
uncomment line 545 that saysInclude /private/etc/apache2/other/*.conf
. Let me know if one or more of them solved the problem and I will add a more detailed answer.
– harrymc
Oct 1 at 20:22
same problem here withdispatcher-apache2.4-4.2.0.so
– daVe
Oct 2 at 8:39
@harrymc Thanks for the suggestion, but is there any other workaround that does not involve having to install a new instance of apache / php ?
– delphirules
Oct 2 at 13:46
The above workarounds are independent. Try number (2) and (3) and wait with (1) until you decide to try it.
– harrymc
Oct 2 at 14:15
@harrymc Should i do 2 AND 3, or only 2 or 3 ?
– delphirules
Oct 2 at 15:42
1
1
See this thread for workarounds: (1) Install apache and php from homebrew (answer by suneet64), (2) Add to
/etc/apache2/httpd.conf
the line LoadModule php7_module libexec/apache2/libphp7.so
at the end, (3) Still in /etc/apache2/httpd.conf
uncomment line 545 that says Include /private/etc/apache2/other/*.conf
. Let me know if one or more of them solved the problem and I will add a more detailed answer.– harrymc
Oct 1 at 20:22
See this thread for workarounds: (1) Install apache and php from homebrew (answer by suneet64), (2) Add to
/etc/apache2/httpd.conf
the line LoadModule php7_module libexec/apache2/libphp7.so
at the end, (3) Still in /etc/apache2/httpd.conf
uncomment line 545 that says Include /private/etc/apache2/other/*.conf
. Let me know if one or more of them solved the problem and I will add a more detailed answer.– harrymc
Oct 1 at 20:22
same problem here with
dispatcher-apache2.4-4.2.0.so
– daVe
Oct 2 at 8:39
same problem here with
dispatcher-apache2.4-4.2.0.so
– daVe
Oct 2 at 8:39
@harrymc Thanks for the suggestion, but is there any other workaround that does not involve having to install a new instance of apache / php ?
– delphirules
Oct 2 at 13:46
@harrymc Thanks for the suggestion, but is there any other workaround that does not involve having to install a new instance of apache / php ?
– delphirules
Oct 2 at 13:46
The above workarounds are independent. Try number (2) and (3) and wait with (1) until you decide to try it.
– harrymc
Oct 2 at 14:15
The above workarounds are independent. Try number (2) and (3) and wait with (1) until you decide to try it.
– harrymc
Oct 2 at 14:15
@harrymc Should i do 2 AND 3, or only 2 or 3 ?
– delphirules
Oct 2 at 15:42
@harrymc Should i do 2 AND 3, or only 2 or 3 ?
– delphirules
Oct 2 at 15:42
|
show 4 more comments
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
The thread Installing on Mojave
lists several independent workarounds:
- Uninstall apache and php from your computer and clean up all leftovers
- Install apache and php from homebrew (answer by suneet64)
Add at the end of
/etc/apache2/httpd.conf
the line
LoadModule php7_module libexec/apache2/libphp7.so
Still in
/etc/apache2/httpd.conf
uncomment line 545 that says
Include /private/etc/apache2/other/*.conf
For cleaning up see this answer. You might at the last just search the file system for*httpd*
to find leftovers, but be very careful to uninstall them correctly.
– harrymc
Oct 2 at 18:05
Thank you, i could remove one of them. But now i can't find where is the correct Apache's access / error log ; how can i know where are them ? The ones on '/private/var/log/apache2' are not being updated.
– delphirules
Oct 2 at 18:17
I don't know your setup, so all I can say is that for a clean state you should ensure first that there are no leftovers on the computer. Search for known file names to be sure that you got all of them etc. There is only so much that I can do from far away.
– harrymc
Oct 2 at 18:20
I found it, i'm almost there. Now when i add the line 'LoadModule php7_module libexec/apache2/libphp7.so', i get this error : httpd: Syntax error on line 535 of /usr/local/etc/httpd/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/httpd/libexec/apache2/libphp7.so, 10): image not found
– delphirules
Oct 2 at 18:25
"image not found" : you need to find where is libphp7.so. But did you test without it?
– harrymc
Oct 2 at 19:12
|
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
The thread Installing on Mojave
lists several independent workarounds:
- Uninstall apache and php from your computer and clean up all leftovers
- Install apache and php from homebrew (answer by suneet64)
Add at the end of
/etc/apache2/httpd.conf
the line
LoadModule php7_module libexec/apache2/libphp7.so
Still in
/etc/apache2/httpd.conf
uncomment line 545 that says
Include /private/etc/apache2/other/*.conf
For cleaning up see this answer. You might at the last just search the file system for*httpd*
to find leftovers, but be very careful to uninstall them correctly.
– harrymc
Oct 2 at 18:05
Thank you, i could remove one of them. But now i can't find where is the correct Apache's access / error log ; how can i know where are them ? The ones on '/private/var/log/apache2' are not being updated.
– delphirules
Oct 2 at 18:17
I don't know your setup, so all I can say is that for a clean state you should ensure first that there are no leftovers on the computer. Search for known file names to be sure that you got all of them etc. There is only so much that I can do from far away.
– harrymc
Oct 2 at 18:20
I found it, i'm almost there. Now when i add the line 'LoadModule php7_module libexec/apache2/libphp7.so', i get this error : httpd: Syntax error on line 535 of /usr/local/etc/httpd/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/httpd/libexec/apache2/libphp7.so, 10): image not found
– delphirules
Oct 2 at 18:25
"image not found" : you need to find where is libphp7.so. But did you test without it?
– harrymc
Oct 2 at 19:12
|
show 1 more comment
up vote
2
down vote
accepted
The thread Installing on Mojave
lists several independent workarounds:
- Uninstall apache and php from your computer and clean up all leftovers
- Install apache and php from homebrew (answer by suneet64)
Add at the end of
/etc/apache2/httpd.conf
the line
LoadModule php7_module libexec/apache2/libphp7.so
Still in
/etc/apache2/httpd.conf
uncomment line 545 that says
Include /private/etc/apache2/other/*.conf
For cleaning up see this answer. You might at the last just search the file system for*httpd*
to find leftovers, but be very careful to uninstall them correctly.
– harrymc
Oct 2 at 18:05
Thank you, i could remove one of them. But now i can't find where is the correct Apache's access / error log ; how can i know where are them ? The ones on '/private/var/log/apache2' are not being updated.
– delphirules
Oct 2 at 18:17
I don't know your setup, so all I can say is that for a clean state you should ensure first that there are no leftovers on the computer. Search for known file names to be sure that you got all of them etc. There is only so much that I can do from far away.
– harrymc
Oct 2 at 18:20
I found it, i'm almost there. Now when i add the line 'LoadModule php7_module libexec/apache2/libphp7.so', i get this error : httpd: Syntax error on line 535 of /usr/local/etc/httpd/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/httpd/libexec/apache2/libphp7.so, 10): image not found
– delphirules
Oct 2 at 18:25
"image not found" : you need to find where is libphp7.so. But did you test without it?
– harrymc
Oct 2 at 19:12
|
show 1 more comment
up vote
2
down vote
accepted
up vote
2
down vote
accepted
The thread Installing on Mojave
lists several independent workarounds:
- Uninstall apache and php from your computer and clean up all leftovers
- Install apache and php from homebrew (answer by suneet64)
Add at the end of
/etc/apache2/httpd.conf
the line
LoadModule php7_module libexec/apache2/libphp7.so
Still in
/etc/apache2/httpd.conf
uncomment line 545 that says
Include /private/etc/apache2/other/*.conf
The thread Installing on Mojave
lists several independent workarounds:
- Uninstall apache and php from your computer and clean up all leftovers
- Install apache and php from homebrew (answer by suneet64)
Add at the end of
/etc/apache2/httpd.conf
the line
LoadModule php7_module libexec/apache2/libphp7.so
Still in
/etc/apache2/httpd.conf
uncomment line 545 that says
Include /private/etc/apache2/other/*.conf
answered Oct 2 at 18:02
harrymc
250k10258554
250k10258554
For cleaning up see this answer. You might at the last just search the file system for*httpd*
to find leftovers, but be very careful to uninstall them correctly.
– harrymc
Oct 2 at 18:05
Thank you, i could remove one of them. But now i can't find where is the correct Apache's access / error log ; how can i know where are them ? The ones on '/private/var/log/apache2' are not being updated.
– delphirules
Oct 2 at 18:17
I don't know your setup, so all I can say is that for a clean state you should ensure first that there are no leftovers on the computer. Search for known file names to be sure that you got all of them etc. There is only so much that I can do from far away.
– harrymc
Oct 2 at 18:20
I found it, i'm almost there. Now when i add the line 'LoadModule php7_module libexec/apache2/libphp7.so', i get this error : httpd: Syntax error on line 535 of /usr/local/etc/httpd/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/httpd/libexec/apache2/libphp7.so, 10): image not found
– delphirules
Oct 2 at 18:25
"image not found" : you need to find where is libphp7.so. But did you test without it?
– harrymc
Oct 2 at 19:12
|
show 1 more comment
For cleaning up see this answer. You might at the last just search the file system for*httpd*
to find leftovers, but be very careful to uninstall them correctly.
– harrymc
Oct 2 at 18:05
Thank you, i could remove one of them. But now i can't find where is the correct Apache's access / error log ; how can i know where are them ? The ones on '/private/var/log/apache2' are not being updated.
– delphirules
Oct 2 at 18:17
I don't know your setup, so all I can say is that for a clean state you should ensure first that there are no leftovers on the computer. Search for known file names to be sure that you got all of them etc. There is only so much that I can do from far away.
– harrymc
Oct 2 at 18:20
I found it, i'm almost there. Now when i add the line 'LoadModule php7_module libexec/apache2/libphp7.so', i get this error : httpd: Syntax error on line 535 of /usr/local/etc/httpd/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/httpd/libexec/apache2/libphp7.so, 10): image not found
– delphirules
Oct 2 at 18:25
"image not found" : you need to find where is libphp7.so. But did you test without it?
– harrymc
Oct 2 at 19:12
For cleaning up see this answer. You might at the last just search the file system for
*httpd*
to find leftovers, but be very careful to uninstall them correctly.– harrymc
Oct 2 at 18:05
For cleaning up see this answer. You might at the last just search the file system for
*httpd*
to find leftovers, but be very careful to uninstall them correctly.– harrymc
Oct 2 at 18:05
Thank you, i could remove one of them. But now i can't find where is the correct Apache's access / error log ; how can i know where are them ? The ones on '/private/var/log/apache2' are not being updated.
– delphirules
Oct 2 at 18:17
Thank you, i could remove one of them. But now i can't find where is the correct Apache's access / error log ; how can i know where are them ? The ones on '/private/var/log/apache2' are not being updated.
– delphirules
Oct 2 at 18:17
I don't know your setup, so all I can say is that for a clean state you should ensure first that there are no leftovers on the computer. Search for known file names to be sure that you got all of them etc. There is only so much that I can do from far away.
– harrymc
Oct 2 at 18:20
I don't know your setup, so all I can say is that for a clean state you should ensure first that there are no leftovers on the computer. Search for known file names to be sure that you got all of them etc. There is only so much that I can do from far away.
– harrymc
Oct 2 at 18:20
I found it, i'm almost there. Now when i add the line 'LoadModule php7_module libexec/apache2/libphp7.so', i get this error : httpd: Syntax error on line 535 of /usr/local/etc/httpd/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/httpd/libexec/apache2/libphp7.so, 10): image not found
– delphirules
Oct 2 at 18:25
I found it, i'm almost there. Now when i add the line 'LoadModule php7_module libexec/apache2/libphp7.so', i get this error : httpd: Syntax error on line 535 of /usr/local/etc/httpd/httpd.conf: Cannot load libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/httpd/libexec/apache2/libphp7.so, 10): image not found
– delphirules
Oct 2 at 18:25
"image not found" : you need to find where is libphp7.so. But did you test without it?
– harrymc
Oct 2 at 19:12
"image not found" : you need to find where is libphp7.so. But did you test without it?
– harrymc
Oct 2 at 19:12
|
show 1 more comment
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1363013%2fapache-cant-load-php-unsigned-extensions-on-mac-os-mojave%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
See this thread for workarounds: (1) Install apache and php from homebrew (answer by suneet64), (2) Add to
/etc/apache2/httpd.conf
the lineLoadModule php7_module libexec/apache2/libphp7.so
at the end, (3) Still in/etc/apache2/httpd.conf
uncomment line 545 that saysInclude /private/etc/apache2/other/*.conf
. Let me know if one or more of them solved the problem and I will add a more detailed answer.– harrymc
Oct 1 at 20:22
same problem here with
dispatcher-apache2.4-4.2.0.so
– daVe
Oct 2 at 8:39
@harrymc Thanks for the suggestion, but is there any other workaround that does not involve having to install a new instance of apache / php ?
– delphirules
Oct 2 at 13:46
The above workarounds are independent. Try number (2) and (3) and wait with (1) until you decide to try it.
– harrymc
Oct 2 at 14:15
@harrymc Should i do 2 AND 3, or only 2 or 3 ?
– delphirules
Oct 2 at 15:42