Open sdavara opened 8 years ago
I have that instruction as below:
Install php 5.4 and MySQL through homebrew. Follow instructions from homebrew-php for specific installation instructions on your OS.
brew tap homebrew/dupes brew tap josegonzalez/homebrew-php
brew update xcode-select --install brew install php55 --with-thread-safety --with-mysql brew install php55-mcrypt mysql
PATH=/usr/local/bin:$PATH
Set timezone in php.ini. It should be located at /usr/local/etc/php/5.4/php.ini.
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer
I'll see, If I can create a PR with PHP and composer(it's package manager)
@sdavara thanks for taking this on, would love to help with the PR whenever you create it.
@sdavara ping^
Is it necesssry to have php 5.5 guide?
What OS X version should this be for? (I am still on Yosemite)
Anyone who wanders here and have not seen stack overflow question on this topic here is a link: https://stackoverflow.com/questions/26493762/yosemite-el-capitan-php-gd-mcrypt-installation
In case you need only one version (5.6 or 7.x..) just install it using guide linked above (stackoverflow). In case you need 2 versions simultaneously you have multiple options: https://medium.com/@wvervuurt/how-to-run-multiple-php-versions-simultaneously-under-os-x-el-capitan-using-standard-apache-98351f4cec67 or https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions or (advanced, since guide is not for macOS but for Linux, but gives you the idea) https://pehapkari.cz/blog/2017/03/27/multiple-php-versions-the-easy-way/
New suggestions if you develop using some kind of framework/library... use Valet
Laravel, Lumen, Bedrock, CakePHP 3, Concrete5, Contao, Craft, Drupal, Jigsaw, Joomla , Katana, Kirby, Magento, OctoberCMS, Sculpin, Slim, Statamic, Static HTML, Symfony, WordPress, Zend
I do not really know how to proceed here; I just use Valet and it does all the stuff behind the scenes for me (for my use case). Using Valet is easy, but it does not support development with no frameworks (see list in https://github.com/sb2nov/mac-setup/issues/56#issuecomment-348523220).
I also use brew pin
ing for PHP so it does not upgrade to PHP 7.3.
Also PHP 7.2 comes with these modules, and the trouble ones (intl
, mcrypt
) are either built-in statically or depreciated:
➜ ~ php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
phpdbg_webhelper
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
@Kyslik want to just turn your guidelines into a Php page? Since I think you've enough experience with this as well as there is not much we can do beyond this on the issue.
@Kyslik Not knowing much about PHP and the ecosystem of the language I think anything would be useful, like how do I install PHP and manage versions? And if you think Valet is a good choice then I'd say include that!
@sdavara do you want to make a PR to take this on ?