Hot answers tagged

31

It's now possible to install composer running brew install composer Previous answer (for older versions): It seems the solution was running: brew tap homebrew/homebrew-php and then brew install composer After that composer seems to be installed: composer --version Composer version 1.5.5 2017-12-01 14:42:57


20

Removing system macOS binaries is not a good idea, they will be reinstalled during a next system upgrade and they could be needed by some system scripts. To enable the homebrew php from the command line, read the output of brew info php70: If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc, ~/.zshrc, ~/....


15

/etc/php.ini.default serves only as a reference and is not read out by PHP at all. The built-in PHP installation will look for the file /etc/php.ini instead. This file is not present by default, but you can copy /etc/php.ini.default to /etc/php.ini and make your modifications in there. You could also just create an empty file and only add any directives you ...


15

Instead of guessing which php.ini you need to alter, run this command to locate the file: php -r 'phpinfo();' | grep 'php.ini' Even though I use MAMP PRO, by default my command-line PHP commands are not executed using their copy of PHP. In my case it says the file is found at /etc/php.ini Once you have located the file, follow the instructions on all of ...


15

You are trying to install in /usr which is protected by SIP (System Integrity Protection), a feature introduced with 10.11 (see What is the "rootless" feature in El Capitan, really? for details). Use /usr/local instead, which is the location intended for user-side installations.


10

I had the same problem - it's based on mod_userdir exclusion after updating to Mac OS X Mojave. There are a few steps to repair that: Load the module mod_userdir in /etc/apache2/httpd.conf At the end of the httpd.conf make sure to load httpd-userdir.conf In httpd-userdir.conf include a local file in /etc/apache2/users/<username>.conf Put a directory ...


8

Yes, you can, as long as you install the command line tools. You can then install the command line tools with xcode-select --install For more information (from the iOS Dev Library, but applicable in this case), see Technical Note TN2339


7

Export your PATH with some like this (check your php version): export PATH=/usr/local/Cellar/php71/7.1.14_25/bin:$PATH


7

As the documentation suggests, you need to locate and edit the file: /opt/lampp/etc/extra/httpd-xampp.conf The hard part for me was locating this file. The solution I found was to ensure the stack volume was mounted: From there, you can click the explore button, which will open /opt/lampp/. You can then navigate to etc/extra/httpd-xampp.conf from the ...


6

The brew commands look ok. You have all the taps you need. First of all since you're working with homebrew, I'd suggest the following two commands (let's start clean): brew update && brew cleanup So we're sure that we're using the latest homebrew release and we cleanup all old formulas and leftovers. From your PATH it looks like usr/bin (which is ...


6

The $ is just an example for the shell prompt in whatever instruction guide you are reading (used to indicate that you should run the command from your standard user account. A # would indicate that you should run the command as an admin/root user). Just run php -v instead.


6

Now as time passed, this works for me: $ brew install composer


5

The Mojave update (or re-install) overwrites the apache directory but left my old configs with the ~previous suffix left. I did edit a lot of previous files in my apache path /private/etc/apache2. These files were renamed to like httpd.conf~previous and a new httpd.conf has taken place. I just renamed files, restart my apache and everything is working ...


4

I'm assuming that the deployment/install script was put at /usr/local/packager/packager.py when it was installed. Apparently, you can use this script to list the packages that are installed: /usr/local/packager/packager.py list Unfortunately, the script that you used to install PHP doesn't appear to have an uninstall feature. However, you should be able to ...


4

It seems as you did not add the new path to your $PATH. Citing the FAQ of the website that you have posted: Why does php -v on the command line still show my old version? php-osx doesn't overwrite the php binaries installed by Apple, but installs everyting in /usr/local/php5. The new php binary is therefore in /usr/local/php5/bin/php. You can ...


4

On OS X you'll have following : The base PATH used is located in /etc/paths. It is used to set $PATH. By default, the file contains : /usr/bin /bin /usr/sbin /sbin /usr/local/bin It will also load the paths located in /etc/path.d/. When opening the terminal I will load : ~/.bash_profile ~/.bash_login, (if .bash_profile doesn't exist) ~/.profile (...


4

Since upgrade to Yosemite updated your Apache, you have to update phpMyAdmin.conf to use new Access control syntax. Have a look at: http://httpd.apache.org/docs/2.4/upgrading.html In my case I need changed /etc/apache2/other/phpMyAdmin.conf Order allow,deny Allow from all to Require all granted More info here: http://www.zoubi.me/blog/you-dont-have-...


4

Don't uninstall the old php as it is /usr/bin and so supplied by Apple and so might affect the OS and Apple might reinstall it as part od an OS upgrade. The binary install of php puts php in /usr/local/bin/php To use it either use the full path or alter your PATH environment variable to have /usr/local/bin before /usr/bin


4

Here an (old) 3rd party PHP probably from entropy.ch was installed to /local/usr/bin/. The Sierra httpd.conf was modified to work with the different PHP (and virtual hosts). While updating to macOS to High Sierra, the Sierra httpd.conf was backed up to httpd.conf.sierra, a new High Sierra httpd.conf was installed and gained control, but won't work with the ...


4

I faced a similar issue on Mojave update, I was able to fix it by updating /etc/hosts file with ::1 localhost YouMacName.local 127.0.0.1 localhost YouMacName.local You can get YourMacName.local by running in terminal: $ hostname I hope it helps you


4

This should do it! System Preferences -> Security & Privacy -> Developer Tools White-listing one-by-one While launching your non-verified app keep your System Preferences -> Security & Privacy -> General open. You can whitelist executables and libraries along the way. They will pop up in the general tab. A signing tool https://github.com/...


4

Found an answer that worked: # added this to made php render <IfModule php7_module> AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> </IfModule>


3

Probably you added one or more bin directories (containing mysql and php) to your $PATH. Remove them. The three php* files in /usr/bin belong to the default OS X system and are completely legit.


3

In my opinion, the right way is to set your path to prefer your installation of PHP. Apple restricts PHP so you can't delete it without bypassing the system integrity protection Apple will update those files any time it pleases, so you're always needing to re-do whatever steps you take to modify the system If you make a virtual environment like docker or ...


3

Your Mac's built in webserver is turned on. To Turn On: sudo apachectl start To Turn Off: sudo apachectl stop The process you are actually looking for is httpd, the Apache server. $ ps -ef | grep httpd 0 76078 1 0 3:56am ?? 0:00.32 /usr/sbin/httpd -D FOREGROUND 70 76084 76078 0 3:56am ?? 0:00.00 /usr/sbin/httpd -D ...


2

For me, I did the following: Edit the /Applications/MAMP/conf/php5.4.4/php.ini and php.ini.temp to be: memory_limit = 128M ; Maximum amount of memory a script may consume (8MB) Then in finder simply make the php.ini and php.ini.temp read only for all users. This way, MAMP cannot overwrite it with default files. Restart the server and check your ...


2

Not sure if you solved this, but you need to make sure the PEAR Mail extension is installed. Open your Terminal and enter: pear install Mail


2

You can do what you ask, but it requires a Mailbox > Rebuild operation. That asks Mail to scan the ~/Library/Mail directory you found and rebuild its email header database from the files it finds there. I doubt you'd find that acceptable. I'm afraid Gerry's comment above is the right way to go about this: set up a test email account somewhere, use one of ...


2

Have you modified the post_max_size too ? post_max_size = 20M upload_max_filesize = 20M Check "PHP post_max_size overrides upload_max_filesize" here : https://stackoverflow.com/questions/7754133/php-post-max-size-overrides-upload-max-filesize


Only top voted, non community-wiki answers of a minimum length are eligible