Edit the apache2 hosts configuration files (per user)
# cd /private/etc/apache2/users/ # ls Guest.conf username.conf
# cat username.conf NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot /Users/username/Sites <Directory "/Users/username/Sites/"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName myDomain DocumentRoot /Users/username/Sites/.../myDir <Directory "/Users/sbolay/Sites/.../myDir/"> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
Add the hostname to resolve $sudo -e /private/etc/hosts 127.0.0.1 localhost 127.0.0.1 myHost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost
Uncomment both lines below
$sudo -e /usr/local/etc/httpd/httpd.conf LoadModule userdir_module libexec/apache2/mod_userdir.so
# User home directories
Include /private/etc/apache2/extra/httpd-userdir.conf
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so LoadModule rewrite_module libexec/apache2/mod_rewrite.so
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
/var/log/apache2/error_log
Only for version 5 of php, uncomment this line
LoadModule php5_module libexec/apache2/libphp5.so
Uncomment in /private/etc/apache2/extra/httpd-userdir.conf
Add in /usr/local/etc/httpd/httpd.conf
Include /private/etc/apache2/users/*.conf
Install php for mac from https://php-osx.liip.ch/
curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6 curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2
Install MySQL from http://dev.mysql.com/downloads/mysql/ (e.g. mysql-5.6.12-osx10.7-x86_64) and start it
$sudo installer -pkg /Users/"user"/Downloads/mysql-5.7.14-osx10.11-x86_64.pkg -target /Volumes/Macintosh\ SSD $sudo /Library/StartupItems/MySQLCOM/MySQLCOM start $/usr/local/mysql/bin/mysqladmin -u root -p password NEWPASSWORD export PATH="/usr/local/mysql/bin:$PATH"
mkdir /private/var/mysql/ ln -s /tmp/mysql.sock /private/var/mysql/
mysql -u root -p alter user 'root'@'localhost' identified by 'totem' password expire never;
Start by intalling the autotools, thanks to this. You can then try those instructions at first http://mansion.im/2011/php-with-intl-and-gettext-on-osx-lion/.
Download gettext from https://www.gnu.org/software/gettext/
curl http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.1.tar.gz > gettext-0.19.8.1.tar.gz tar -xzf gettext-0.19.8.1.tar.gz cd gettext-0.19.8.1
./configure
Si il y a cette error,
export PATH=“/usr/bin:$PATH”
Relancer de nouveau
./configure
make all
Edit gettext-tools/gnulib-lib/stpncpy.c line 34
(stpncpy) (char *dest, const char *src, size_t n)
and modify it to
(stpcpy) (char *dest, const char *src, size_t n)
Recompile
make sudo make install
Add in php.ini the support for gettext
$sudo -e /private/etc/php.ini error_reporting = E_ALL extension=intl.so extension=gettext.so
Restart Apache
$sudo apachectl restart