![]() ![]() With Zend OPcache v8.0.3, Copyright (c), by Zend Technologies Zend Engine v4.0.3, Copyright (c) Zend Technologies version 8.0.3, like in the example below: ➜ ~ php -v This is most likely that there is an update version of PHP installed in your system. So, in case you receive an error like: httpd: Syntax error on line 186 of /usr/local/etc/httpd/nf: Cannot load /usr/local/opt/php/lib/httpd/modules/libphp7.so into server Here, we’ve used the libphp7.so file, but this could not be the correct version after PHP update to a newer version. NB: Please be aware that you have to keep updating this line with correct libphp.so file. So, again, go to /usr/local/etc/httpd/nffile, open it for editing, find the section containing LoadModule directives, and add the line we saw above: LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so Or, if you don’t want/need a background service you can just run: To have launchd start php now and restart at login: The php.ini and php-fpm.ini file can be found in: LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.soįinally, check DirectoryIndex includes index.php To enable PHP in Apache add the following to nf and restart Apache: So, if you have already done it, you probably might have noticed some ‘Caveats’: It is supposed that you have also already installed the PHP via HomeBrew. So, go to / usr/local/etc/httpd/nf file, open it for editing, find the line ‘Listen 8080’ and change it to ‘Listen 80’.Ĭheck configuration and restart: $ apachectl restart To 8443 so that httpd can run without sudo”. “ The default ports have been set in /usr/local/etc/httpd/nf This means, that for Homebrew installations, the default configuration file is: The new Apache version installed via brew is Apache/2.4.46 (Unix) and the layout of the installation is located at: Now we can use the following brew commands: ![]() Fundamental httpd / apache server commandsīesides the known commands we have previously seen: Now you can check whether the new Apache server works OK by using a browser and the default l8080 port at localhost: Start it and make it starting automatically: $ brew services start httpdĪlternatively, you can start it by: $ apachectl start Now we can check the latest Apache server version at:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |