Blog: 2025-08-15: Difference between revisions

From razwiki
Jump to navigation Jump to search
(Created page with "notes for running old php version on mac 11.7 vim /usr/local/etc/httpd/httpd.conf /usr/libexec/apache2/libphp7.so <pre> / $ vim /usr/local/etc/httpd/httpd.conf / $ httpd -k restart [Fri Aug 15 01:57:18.911732 2025] [so:warn] [pid 66139] AH01574: module alias_module is already loaded, skipping httpd: Syntax error on line 184 of /usr/local/etc/httpd/httpd.conf: Can't locate API module structure `php_module' in file /usr/libexec/apache2/libphp7.so: dlsym(0x7f999ac05ec0...")
 
No edit summary
 
Line 17: Line 17:


But loading the webpage http://localhost:5000/mypage.php I get "connection reset", huh. Maybe I still have to enable php files
But loading the webpage http://localhost:5000/mypage.php I get "connection reset", huh. Maybe I still have to enable php files

<pre>
LoadModule php7_module /usr/libexec/apache2/libphp7.so

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

did the trick

Latest revision as of 02:13, 15 August 2025

notes for running old php version on mac 11.7

vim /usr/local/etc/httpd/httpd.conf
/usr/libexec/apache2/libphp7.so
/ $ vim /usr/local/etc/httpd/httpd.conf
/ $ httpd -k restart
[Fri Aug 15 01:57:18.911732 2025] [so:warn] [pid 66139] AH01574: module alias_module is already loaded, skipping
httpd: Syntax error on line 184 of /usr/local/etc/httpd/httpd.conf: Can't locate API module structure `php_module' in file /usr/libexec/apache2/libphp7.so: dlsym(0x7f999ac05ec0, php_module): symbol not found

hmmmm

ok running nm on the .so showed it has a php7 module.

But loading the webpage http://localhost:5000/mypage.php I get "connection reset", huh. Maybe I still have to enable php files

LoadModule php7_module /usr/libexec/apache2/libphp7.so

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

did the trick