![]() Mavericks comes with PHP 5.4.17, so now we need to turn it on: Now we want to enable PHP, so you can actually develop something. Press CTRL+ O and then CTRL+ X to save and exit. Options Indexes MultiViews FollowSymLinks Paste the following config into the Terminal editor: Then we need to create a new user config for Apache (substitute your own user account short name): We want to create a user level web root for our own projects, and we’ll do it all from the Terminal: ![]() ![]() The document you are seeing is served from the system level web root, located in /Library/WebServer/Documents. Now you can test that Apache is running by opening in a browser. This will show you the installed version of Apache, which is Apache/2.2.24 on Mavericks. ApacheĪs I said everything you need should already be installed on your new Mavericks machine, so go ahead and and write the following in a Terminal window: how to start it).Īfter this tutorial you will have a working local Apache server with PHP, and I will show you how to create sub sites for each of your web projects directly from Dropbox. Some familiarity with the Terminal is presumed (e.g. Everything you need is preinstalled, and just needs to be configured. This a quick writeup of how to get a local web development server up and running on your Mac. Update : I have created an updated article on how to setup Apache and PHP in OS X Yosemite. This section describes on how to install Xdebug.Article by Ole Michelsen posted on Decem, updated November 25, 2014 How you install Xdebug depends on your system.Linux without an Xdebug package with PECL.Unix-like operating systems, from source.Depending on your distribution, run the following command: Installing Xdebug with a package manager is often the fastest way.Alpinelinux: sudo apk add php7-pecl-xdebug, or sudo apk add php8-pecl-xdebug.Php 81-php-xdebug3, you can substitute the PHP Ubuntu ( Ondřej Surý's PPA): sudo apt-get install php7.4-xdebug, or sudo apt-get install php8.0-xdebug, or sudo apt-get install php8.1-xdebugįor packages that have the PHP version in the package name, such as in.Ubuntu (18.04 LTS/Bionic, 20.04 LTS/Focal): sudo apt-get install php-xdebug.SUSE (openSUSE, Enterprise): sudo zypper in php7-xdebug, or sudo zypper in php8-xdebug.RHEL (Remi Repo): sudo yum install php74-php-xdebug3.Manjaro (20.1/Mikah): sudo pacman -S xdebug.Fedora (Remi Repo): sudo yum install php74-php-xdebug3.Fedora (32): sudo yum install php-xdebug.Debian (9/stretch, testing/buster/bullseye/sid): sudo apt-get install php-xdebug.CentOS (Remi Repo): sudo yum install php74-php-xdebug3, or sudo yum install php80-php-xdebug3, or sudo yum install php81-php-xdebug3. ![]() Version with the one that matches the PHP version that you are running. Installs a version that is no longer supported (see Supported Versions), please install Linux distributions might be providing an old and/or outdated version. PHP development headers (see Compile below).Xcode's command line tools (run: xcode-select.You can install Xdebug through PECL on Linux & macOS with Homebrew. Mismatch with the default and PECL will fail, or Xdebug won't load with a On Apple M1 hardware, programs can either be compiled for the native M1/ARM64Īrchitecture, or for the emulated x86_64 architecure. Opt/homebrew/lib/php/pecl/20190902/xdebug.so: mach-o, but wrong architecture PHP Warning: Failed loading Zend extension 'xdebug.so' (tried: /opt/homebrew/lib/php/pecl/20190902/xdebug.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so, 9): no suitable image found. If that says arm64e, then you need to run:Īnd if it's x86_64, then you need to run: You can verify what your PHP's architecture is with: opt/homebrew/lib/php/pecl/20190902/xdebug.so: stat() failed with errno=22), /opt/homebrew/lib/php/pecl/20190902/xdebug.so.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/xdebug.so.so, 9): image not found)) in Unknown on line 0 You're all set and you can configure Xdebug's other functions, such as If Xdebug shows up with a version number, than In some cases pecl will change the php.ini file toĪdd a configuration line to load Xdebug. ![]()
0 Comments
Leave a Reply. |