Big Sur Macbook — I installed PHP v7.4 using Homebrew, and Apache gave an error message that PHP was not signed. So I followed the steps in this article explaining how to create a certificate authority and code signing certificate in Keychain Access. It worked once, but now I keep getting this error:
[Mon Oct 25 23:37:21.877634 2021] [so:error] [pid 3007] /usr/bin/codesign failed; unable to obtain code signature for module
[Mon Oct 25 23:37:21.877668 2021] [so:warn] [pid 3007] AH06663: Unable to find code signature authority on module at /usr/local/opt/php#7.4/lib/httpd/modules/libphp7.so that matches authority name "My Name" configured on LoadModule directive. Proceeding with loading process, but this will be an error condition in a future version of macOS.
Failed loading /usr/local/opt/php#7.4/lib/php/20190902/opcache.so: dlopen(/usr/local/opt/php#7.4/lib/php/20190902/opcache.so, 9): no suitable image found. Did find:
/usr/local/opt/php#7.4/lib/php/20190902/opcache.so: code signature in (/usr/local/opt/php#7.4/lib/php/20190902/opcache.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/opt/php#7.4/lib/php/20190902/opcache.so: stat() failed with errno=22
[Mon Oct 25 23:37:21.925733 2021] [mpm_prefork:notice] [pid 3007] AH00163: Apache/2.4.48 (Unix) PHP/7.4.25 configured -- resuming normal operations
[Mon Oct 25 23:37:21.925784 2021] [core:notice] [pid 3007] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Oct 25 23:45:01.160927 2021] [mpm_prefork:notice] [pid 3007] AH00169: caught SIGTERM, shutting down
Also, VS Code has started to demand all of my CPU power, but only when I'm looking at the root folder. If I start at the /etc or /var folder it's fine. What's going on? How can I troubleshoot and fix this?
You may need to codesign again like so:
codesign -s "My Name" --keychain ~/Library/Keychains/login.keychain-db /usr/local/opt/php#7.4/lib/httpd/modules/libphp7.so
And you may have to trust your own previous created "My Name" certificate again.
Sounds like an "after update" issue.
Please also refer to this answer i recently made around the same topic.
Related
Version:
OS lsb_release -a : Ubuntu 18.04.5 LTS
PHP php -v : 8.0.5 Apache
pache2 -v : 2.4.29 (Ubuntu)
mysql --version : mysql Ver 14.14
Distrib 5.7.32
Problem:
I'm trying to install LAMP Stack using following article. However, I was getting HTTP 500 Error while accessing phpmyadmin from browser.
And installed phpmyadmin using below command.
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl
Tried:
So, I checked with Error Log tail -f /var/log/apache2/error.log and found that Phpmyadmin was running on depreciated version of PHP.
[Sun May 16 21:11:57.057418 2021] [core:notice] [pid 2711] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 16 21:12:49.262658 2021] [mpm_prefork:notice] [pid 2711] AH00171: Graceful restart requested, doing restart
[Sun May 16 21:12:49.280421 2021] [alias:warn] [pid 2711] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
[Sun May 16 21:12:49.307986 2021] [mpm_prefork:notice] [pid 2711] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Sun May 16 21:12:49.308000 2021] [core:notice] [pid 2711] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 16 21:24:43.439480 2021] [mpm_prefork:notice] [pid 2711] AH00169: caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/lib/php/20200930/json.so (/usr/lib/php/20200930/json.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/json.so.so (/usr/lib/php/20200930/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[Sun May 16 21:24:43.547262 2021] [mpm_prefork:notice] [pid 2888] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Sun May 16 21:24:43.547290 2021] [core:notice] [pid 2888] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 16 21:24:47.635162 2021] [php:error] [pid 2895] [client 84.251.85.6:56332] PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /usr/share/phpmyadmin/libraries/url_generating.lib.php on line 231
If you have installed php mysql and apache directly on your system. Uninstall them and install only lamp. By so doing there will be no conflict and you stop having internal server error due too deprecated php version.
I have a recent problem in Ampps Software on Windows 10, Apache stopping automatically if PHP version is 7.1 but if I change back PHP Version to 5.6 it's working fine
and here's the error log for Apache
<pre>
[Mon Oct 22 10:28:12.413768 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00455: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/5.6.31 configured -- resuming normal operations
[Mon Oct 22 10:28:12.413768 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00456: Apache Lounge VC15 Server built: Jul 7 2017 11:43:51
[Mon Oct 22 10:28:12.413768 2018] [core:notice] [pid 12484:tid 684] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Mon Oct 22 10:28:12.417758 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00418: Parent: Created child process 5924
[Mon Oct 22 10:28:13.307885 2018] [mpm_winnt:notice] [pid 5924:tid 740] AH00354: Child: Starting 64 worker threads.
[Mon Oct 22 10:28:45.068164 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00455: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/7.1.8 configured -- resuming normal operations
[Mon Oct 22 10:28:45.068164 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00456: Apache Lounge VC15 Server built: Jul 7 2017 11:43:51
[Mon Oct 22 10:28:45.068164 2018] [core:notice] [pid 9816:tid 700] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Mon Oct 22 10:28:45.070158 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00418: Parent: Created child process 15180
[Mon Oct 22 10:28:47.563384 2018] [mpm_winnt:crit] [pid 9816:tid 700] AH00419: master_main: create child process failed. Exiting.
</pre>
I didn't change anything or install anything new, and I reinstalled it many times and tried XAMPP it's working fine
Thank you.
Its solved by disabling Ioncube loader extension for me, Thanks for all replies
Try changing the php version used by AMPPS by following their guide here ->
http://www.ampps.com/wiki/How_to_change_php_version
In the AMPPS control panel, select options and then select change php version. The changed version should now be displayed in the control panel.
Try run httpd.exe with as administrator and it worked.
C:\Program Files (x86)\Ampps\apache\bin
I know this is 4 months old, but I have had significant problems with PHP on windows and today I got this problem fixed.
AMPPS - It won’t run PHP 7.1 with out changing the executables to run as administrator mode. Apache will terminate without an error. I believe this is because even if AMPPS is running in admin priviledges these are not granted to the php.exe when it is run. Go to the file location of php.exe, right click and click on properties, click the compatibility tab and select the check box for ‘run as administrator’. Do the same for the httpd.exe under apache->bin->httpd.exe. (Not sure if the httpd priviledge change matters but I did it and it worked.)
Run AMPPS and hopefully like me, your php/apache problems are gone.
i solved mine following steps below:
i switched PHP version to 5.6 which everything works normally,
then went to this URL:
http://localhost/ampps/index.php?
there i found some updates available
notification on top of the page below url bar on the page
if you see updates available for your php 7.0 7.1 ...
90% you will resolve this issue like mine
i tried update all available updates
then restart the ampps app
now working with PHP 7.1 great.
i hope it works for you as well.
A bit late but since i've been using Ampps for 5 years , i provide similar solutions for my common errors maybe someone find it useful .
If you changed Document Root path in "httpd.conf" , make sure that folder still exists.
If you see the logs about InnoDB files, follow the path and delete that dump files and logs.
If you got this error "master_main: create child process failed" in log files :
Change PHP version to 7.1 and Try this:
Open AMPPS panel --> PHP --> Configuration.
Search for the following line and comment it by adding ';' at the beginning of the line: zend_extension="{$path}\php-7.1\ioncube_loader_win_7.1.dll"
I am having a strange error (system is Ubuntu 16.04):
[Mon Sep 04 13:07:17.219992 2017] [mpm_prefork:notice] [pid 27798] AH00169: caught SIGTERM, shutting down
[Mon Sep 04 13:07:17.302181 2017] [so:warn] [pid 27874] AH01574: module php7_module is already loaded, skipping
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_curl.dll' - /usr/lib/php/20151012/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
[Mon Sep 04 13:07:17.322006 2017] [mpm_prefork:notice] [pid 27875] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 04 13:07:17.322026 2017] [core:notice] [pid 27875] AH00094: Command line: '/usr/sbin/apache2'
PHP version is 7.1.19. I installed curl (apt-get install php7.1-curl), in the php.ini I added extension=curl.co (and commented out extension=php_curl.dll), restarted the apache service, and the error is still there (I tried commenting out extension=curl.co but the error is still there).
This is an error I am getting on the page (Laravel setup):
Call to undefined function App\curl_init()
Everything is installed and config files are as required and I don't know what could be wrong here.
The /etc/php/7.1/mods-available/curl.ini file content should be:
extension=curl.so
Please notice the extension is .so, and not .co.
Then you can enable the module in your PHP by running:
$ sudo phpenmod curl
Finally, you may need to restart your Apache:
$ sudo systemctl restart apache2
I am having issues adding the ZeroMQ PHP extension to XAMPP.
Setup: Windows 10, PHP7, XAMPP (7.0.9)
Steps I already took:
Added PHP (D:\xampp7\php) and PHP extensions (D:\xampp7\php\ext) directories to system variable (PATH)
Followed the instructions on zeromq.org. I downloaded x86ts version from the pecl repository as the listed snapshot link (http://snapshot.zero.mq/) was down.
Copied libzmq.dll into PHP directory and php_zmq.dll into the PHP extension directory
Updated php.ini (D:\xampp7\php\php.ini) by adding extension=php_zmq.dll and checked the extensions directory which is extension_dir="D:\xampp7\php\ext"
Restarted XAMPP via the control panel.
The Apache error log shows the following:
[Sat Nov 26 18:30:27.461679 2016] [ssl:warn] [pid 15280:tid 588] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 26 18:30:27.546320 2016] [core:warn] [pid 15280:tid 588] AH00098: pid file D:/xampp7/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Nov 26 18:30:27.630955 2016] [ssl:warn] [pid 15280:tid 588] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp7\\php\\ext\\php_zmq.dll' - Das angegebene Modul wurde nicht gefunden.\r\n in Unknown on line 0
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9 configured -- resuming normal operations
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:09:37
[Sat Nov 26 18:30:27.662208 2016] [core:notice] [pid 15280:tid 588] AH00094: Command line: 'd:\\xampp7\\apache\\bin\\httpd.exe -d D:/xampp7/apache'
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00418: Parent: Created child process 964
[Sat Nov 26 18:30:28.363210 2016] [ssl:warn] [pid 964:tid 616] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
Update:
It looks like the module cannot be found, but if I add the x64 Version the Apache error log indicates that the module is not a not a valid Win32 application.
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp7\\php\\ext\\php_zmq.dll' - %1 ist keine zul\xef\xbf\xbdssige Win32-Anwendung.\r\n in Unknown on line 0
Solution:
Adding LoadFile "D:/xampp7/php/libzmq.dll"to httpd.conf fixed my issue.
these steps worked for me (php 7.1.7 - xampp - window 10 x64)
Step 1
download x86 dll files from this site
Step 2
copy php_zmq.dll to C:\xampp\php\ext
Step 3
copy libsodium.dll and libzmq.dll to C:\xampp\php
Step 4
add extension=php_zmq.dll to php.ini file
Step 5
restart apache
I know this is an old question although I just spent 2 days trying to get ZeroMQ to load properly. If anyone still cant get it to work after following all the basic instructions, I have 2 more steps you can look into.
Got it working with php 7.3.12, Win10 x64
1st. Make sure you edit all php.ini files.
If you use wamp server, Apache will have it's own php.ini that is opened up when you click on the wamp icon in the bottom right of windows and go to php->php.ini. Then manually add the same extension=php_zmq.dll there as well as your php.ini under D:\xampp7\php\php.ini. To be honest, I'm not 100% sure that this is necessary but including it on both cant hurt.
2nd. Run deplister.exe on libzmq.dll
This is what got it working for me. Any php download from windows.php.net should have deplister.exe (it is included in wamp php versions too). Go to your php version library on your wamp server where libzmq.dll and deplister.exe are located. Then open up cmd and run the line: deplister php_zmq.dll This will show you a list of the dependencies that php_zmq.dll requires to run. You may notice that it requires a VERY specific version of libzmq.dll so go and rename your dll file to the requested file name. Then run php -m to see if zmq is displayed on the list of modules. If so, you should be able to run commands like composer update to get the required library versions imported into your project without error!
This is a common issue where the port is already in use by other applications. But I have corrected the issue from skype where it was using port 80 and 443. But I am not sure what else application might be preventing apache from running.
Here is the error log
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash or a shutdown by another method.
Press the Logs button to view error logs and check.
the Windows Event Viewer for more clues.
IF you need more help,
copy and post this entire log window in the forum
I have checked the error log file. It would be nice if anyone would kindly explain me the issue. I am new in using xampp
[Mon Jan 11 15:41:31.711045 2016] [ssl:warn] [pid 6344:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:33.542795 2016] [ssl:warn] [pid 6344:tid 768] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:37.708844 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00455: Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.15 configured -- resuming normal operations
[Mon Jan 11 15:41:37.709343 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00456: Apache Lounge VC11 Server built: Oct 13 2015 10:54:13
[Mon Jan 11 15:41:37.709343 2016] [core:notice] [pid 6344:tid 768] AH00094: Command line: 'D:\\xampp\\apache\\bin\\httpd.exe -d D:/xampp/apache'
[Mon Jan 11 15:41:37.963876 2016] [mpm_winnt:notice] [pid 6344:tid 768] AH00418: Parent: Created child process 5008
[Mon Jan 11 15:41:44.877326 2016] [ssl:warn] [pid 5008:tid 688] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:46.246564 2016] [ssl:warn] [pid 5008:tid 688] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Mon Jan 11 15:41:46.644423 2016] [mpm_winnt:notice] [pid 5008:tid 688] AH00354: Child: Starting 150 worker threads.
Well if you read the messages from Apache it is quite obvious you have tried to activate SSL and there is a problem with what you have done.
I think this part of the error message from XAMPP is most relevant a crash or a shutdown by another method.
Assuming you did this by uncommenting the Include conf/extra/httpd-ssl.conf line in httpd.conf then just comment that line out again and then try and fix your SSL config.
As suggested by the error message, look at the Windows Event Viewer. Apache writes there as well as its log file. SOmetimes the errors shown in Event Viewer are very descriptive and will identify a line number in a config file where the error exists
RE Your comment :
I had previous installation of xamp on my system. I had deleted the source folder of xampp and reinstalled xampp
Its possible that as you did not uninstall the old version of XAMPP something from the old version is still registered with your system and that is what is causing this odd situation.
I would uninstall this XAMPP (properly) and then check if you still have an Apache and/or MYSQL service registered, look using the services snapin.
If they are still there you can remove them like this (sc delete ) :-
Start command window using "Run as Administrator"
sc delete MYSQL
sc delete Apache
Make sure you have backed up any databases, although it may already be to late for this.
Then you can re-install the version of XAMPP you want to use.