![]() ![]() Die hier beschriebenen Schritte habe ich auf meinem eigenen Computer erfolgreich durchgeführt. Im Folgenden gebe ich eine kurze Anleitung, wie der Umstieg gelingt. Die Vorgehensweise, die ich in meinem Seminar zur Einrichtung eines Mac beschreibe, funktioniert nicht mehr. Das bedeutet, ein neue Web-Entwicklungsumgebung einrichten zu müssen. Das gilt vor allem dann, wenn man die bisher in macOS gebündelte Software Apache2 und PHP genutzt hat, um damit auf der lokalen Maschine WordPress- oder andere Websites zu entwickeln, die PHP nutzen.ĭer Apache-Webserver ist zwar nach wie vor in macOS Monterey enthalten, PHP wurde jedoch eliminiert. Define httpd_root "$/logs/demo.local/error.Das Update auf macOS Monterey, die neue Version 12 des Apple-Betriebssystems, kann sich etwas holprig gestalten. htaccess), and specify directory for vhost conf and files. This will make apache2 listen to 127.0.1.1:8000, enabling mpm_event and rewrite (most php frameworks / cms have extensive use of. In $PREFIX/conf/nf, make sure the following is applied. Make backup of the default configuration mv $PREFIX/conf/nf $PREFIX/conf/ configure -prefix=$PREFIX -enable-mods-shared='few rewrite proxy proxy_fcgi' -enable-mpms-shared='prefork event' -enable-nonportable-atomics=yesĪnd then, rebuild php using configuration above, with new flag: -with-apxs2=$HOME/package/httpd-2.4.46/bin/apxs Apache2 Configuration Then simply follow the, using this configure script, with only minimal mods required, and using mpm_prefork (because mod_php is not thread safe). to avoid messing up with system files.ĭependencies for apache2: sudo apt install libapr1-dev libaprutil1-dev libpcre3-dev I'd like to make it installed on non-root directory. Unfortunately, when doing make install, it tried to put mod_php into the apache2 dir which requires root access, which failed. with-apxs2 flag configure successfully detect the libs. Previously i tried to use the apache2 from Ubuntu repo. Your system is ready to run Symfony projects home/rizalp/package/php-8.2.4/lib/php.ini > PHP is using the following php.ini file: Then, add the $HOME/package/php-8.2.4/bin to your PATH # for specific test only make TEST_PHP_ARGS=-j$(sysctl -n hw.logicalcpu) TESTS=ext/pdo_sqlite/ test ![]() Make TEST_PHP_ARGS=-j$(sysctl -n hw.logicalcpu) test with-readline=$(brew -prefix readline) \ This macos guide kind of outdated, since I rarely use Mac, please check the following for more updated approach:įinally, install php-8.2.4, adjusting the sqlite pkg-config and ldflags as needed export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/icu4c/lib/pkgconfig"Įxport PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOME/package/sqlite-3.41.1/lib/pkgconfig"Įxport PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig"Įxport PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libpng/lib/pkgconfig"Įxport PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libwebp/lib/pkgconfig"Įxport PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libzip/lib/pkgconfig" Php-fpm can be started by executing $HOME/package/php-8.2.4/sbin/php-fpm Macos To test mysql connection, don't forget to create schema mysql -u root -e 'CREATE SCHEMA test 'Ĭopy default php-fpm config, otherwise php-fpm cannot be started cp $HOME/package/php-8.2.4/etc/ $HOME/package/php-8.2.4/etc/nfĬp $HOME/package/php-8.2.4/etc/php-fpm.d/$HOME/package/php-8.2.4/etc/php-fpm.d/Edit $HOME/package/php-8.2.4/etc/nf daemonize = noĬonfigure it to listen to unix socket, edit $HOME/package/php-8.2.4/etc/php-fpm.d/also, uncomment out the listen.owner, oup, & listen.mode variables Optionally, you could test the binary using make TEST_PHP_ARGS=-j$(nproc) test or make TEST_PHP_ARGS=-j$(nproc) TESTS=ext/pdo_sqlite/ test to test only specific extension. ![]() ![]() libtool -finish $HOME/source/php-8.2.4/libs # for specific test only make TEST_PHP_ARGS=-j$(nproc) TESTS=ext/pdo_sqlite/ test configure -prefix=$HOME/package/sqlite-3.41.1ĭownload PHP, then adjusting the sqlite pkg-config and ldflags as needed PKG_CONFIG_PATH="$HOME/package/sqlite-3.41.1/lib/pkgconfig" \ Extract and cd into the extracted directory. Download the source code with -autoconf file which contains the configure scripts. Install build tools & PHP Core dependencies Ubuntu sudo apt-get install build-essential \ĭownload sqlite3 from. Newer sqlite support, like window functions and JSON1 extension.Better understanding of PHP configurations.Minimal PHP system needed to run CRUD symfony app. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |