User Tools

Site Tools


operating_systems:apple:apache_-_php_-_mysql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
operating_systems:apple:apache_-_php_-_mysql [2017/02/09 14:15] – [MySQL] kroduitoperating_systems:apple:apache_-_php_-_mysql [2021/11/18 14:23] – [HTTPD.CONF] ateixeira
Line 44: Line 44:
 ==== HTTPD.CONF ==== ==== HTTPD.CONF ====
 Uncomment both lines below Uncomment both lines below
-  $sudo -e /private/etc/apache2/httpd.conf+  $sudo -e /usr/local/etc/httpd/httpd.conf
     LoadModule userdir_module libexec/apache2/mod_userdir.so     LoadModule userdir_module libexec/apache2/mod_userdir.so
-    # User home directories +<del># User home directories 
-    Include /private/etc/apache2/extra/httpd-userdir.conf+    Include /private/etc/apache2/extra/httpd-userdir.conf</del>
          
  
Line 55: Line 55:
   LoadModule rewrite_module libexec/apache2/mod_rewrite.so   LoadModule rewrite_module libexec/apache2/mod_rewrite.so
  
-  # Virtual hosts +<del># Virtual hosts 
-  Include /private/etc/apache2/extra/httpd-vhosts.conf+  Include /private/etc/apache2/extra/httpd-vhosts.conf</del>
  
 == error_log problem == == error_log problem ==
 /var/log/apache2/error_log /var/log/apache2/error_log
 <note tip>[Fri Jul 22 11:41:43.182364 2016] [core:alert] [pid 737] [client 127.0.0.1:49399] /Users/mferreira/Sites/GIT/easyaccess-web/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration</note> <note tip>[Fri Jul 22 11:41:43.182364 2016] [core:alert] [pid 737] [client 127.0.0.1:49399] /Users/mferreira/Sites/GIT/easyaccess-web/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration</note>
-For version 5 of php, uncomment this line+Only for version 5 of php, uncomment this line
   LoadModule php5_module libexec/apache2/libphp5.so   LoadModule php5_module libexec/apache2/libphp5.so
  
 === httpd-userdir.conf === === httpd-userdir.conf ===
- Uncomment in /private/etc/apache2/extra/httpd-userdir.conf+ <del>Uncomment in /private/etc/apache2/extra/httpd-userdir.conf</del> 
 + Add in /usr/local/etc/httpd/httpd.conf
   Include /private/etc/apache2/users/*.conf   Include /private/etc/apache2/users/*.conf
  
Line 71: Line 72:
 <note tip>PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so, 9): image not found in Unknown on line 0</note> <note tip>PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/gettext.so, 9): image not found in Unknown on line 0</note>
  
-Install php for mac from http://php-osx.liip.ch +Install php for mac from https://php-osx.liip.ch/ 
-  curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6 +  curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6 
-  curl -s http://php-osx.liip.ch/install.sh | bash -s 7.+  curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2
-   +
-Copy the php.ini file +
-  $sudo cp /private/etc/php.ini.default /private/etc/php.ini+
 ===== MySQL ===== ===== MySQL =====
 Install MySQL from http://dev.mysql.com/downloads/mysql/ (e.g. mysql-5.6.12-osx10.7-x86_64) Install MySQL from http://dev.mysql.com/downloads/mysql/ (e.g. mysql-5.6.12-osx10.7-x86_64)
Line 88: Line 86:
 <note tip>Warning: mysqli_connect(): (HY000/2002): No such file or directory in /Users/bfavre/Sites/git/easyaccess-web/lib/lib_dbconnection.php on line 27 <note tip>Warning: mysqli_connect(): (HY000/2002): No such file or directory in /Users/bfavre/Sites/git/easyaccess-web/lib/lib_dbconnection.php on line 27
 Could not connect to server (2002) No such file or directory</note> Could not connect to server (2002) No such file or directory</note>
 +<note tip>If after the installation you don't know the root password you must launch mysql in safe mode (sudo mysqld_safe --skip-grant-tables) and know you can access mysql (mysql -u root) then you have to refresh the privileges (FLUSH PRIVILEGES;) and to finish you change the password (ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';)</note>
   mkdir /private/var/mysql/   mkdir /private/var/mysql/
   ln -s /tmp/mysql.sock /private/var/mysql/   ln -s /tmp/mysql.sock /private/var/mysql/
      
-  <note tip>If you have the error "ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement."</note>+<note tip>If you have the error "ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. You can use these commands:"</note> 
 +  mysql -u root -p 
 +  alter user 'root'@'localhost' identified by 'totem' password expire never;
      
 ===== gettext ===== ===== gettext =====
 +
 +<note tip>If you have installed a php7+ version, you don't need to install gettext (it is installed by the https://php-osx.liip.ch/install.sh script).</note>
 +
 +Start by intalling the autotools, thanks to [[https://gist.github.com/anunay/7698181|this]].
 +You can then try those instructions at first [[http://mansion.im/2011/php-with-intl-and-gettext-on-osx-lion/]].
 +
 <note tip>[Wed Jun 26 19:21:19 2013] [error] [client ::1] PHP Fatal error:  Call to undefined function bindtextdomain() in /Users/sbolay/Sites/GIT/easyaccess-web/lib/lib_language.php on line 66</note> <note tip>[Wed Jun 26 19:21:19 2013] [error] [client ::1] PHP Fatal error:  Call to undefined function bindtextdomain() in /Users/sbolay/Sites/GIT/easyaccess-web/lib/lib_language.php on line 66</note>
  
 Download gettext from https://www.gnu.org/software/gettext/ Download gettext from https://www.gnu.org/software/gettext/
-  wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz +  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.18.3.1.tar.gz +  tar -xzf gettext-0.19.8.1.tar.gz 
-  cd gettext-0.18.3.1+  cd gettext-0.19.8.1
  
   ./configure   ./configure
-  + 
 <note error> <note error>
-configure: error: in `/Users/mferreira/gettext-0.18.1.1/gettext-runtime':\\+<del>configure: error: in `/Users/mferreira/gettext-0.18.1.1/gettext-runtime':\\
 configure: error: C compiler cannot create executables\\ configure: error: C compiler cannot create executables\\
 See `config.log' for more details.\\ See `config.log' for more details.\\
-configure: error: ./configure failed for gettext-runtime+configure: error: ./configure failed for gettext-runtime</del>
 </note> </note>
  
-Si il y a cette error, +<del>Si il y a cette error,</del>
      
 +<del>
   export PATH="/usr/bin:$PATH"   export PATH="/usr/bin:$PATH"
 +</del>
  
-Relancer de nouveau  +<del>Relancer de nouveau</del> 
-  + 
 +<del>
   ./configure   ./configure
 +</del>
  
-  make all-am+<del> 
 +  make all 
 +</del>
  
-<note tip>/bin/sh ../libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I..  -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1  -I../intl   -I///usr/include/libxml2 -I./libcroco    -g -O2 -c -o stpncpy.lo stpncpy.c\\+<note tip><del>/bin/sh ../libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I..  -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1  -I../intl   -I///usr/include/libxml2 -I./libcroco    -g -O2 -c -o stpncpy.lo stpncpy.c\\
 libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -I../intl -I///usr/include/libxml2 -I./libcroco -g -O2 -c stpncpy.c  -fno-common -DPIC -o .libs/stpncpy.o\\ libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -I../intl -I///usr/include/libxml2 -I./libcroco -g -O2 -c stpncpy.c  -fno-common -DPIC -o .libs/stpncpy.o\\
 stpncpy.c:34: error: expected declaration specifiers or '...' before numeric constant\\ stpncpy.c:34: error: expected declaration specifiers or '...' before numeric constant\\
Line 129: Line 143:
 make[2]: *** [all-recursive] Error 1\\ make[2]: *** [all-recursive] Error 1\\
 make[1]: *** [all] Error 2\\ make[1]: *** [all] Error 2\\
-make: *** [all-recursive] Error 1</note> +make: *** [all-recursive] Error 1</del></note>
  
 +<del>
 Edit gettext-tools/gnulib-lib/stpncpy.c line 34 Edit gettext-tools/gnulib-lib/stpncpy.c line 34
   (__stpncpy) (char *dest, const char *src, size_t n)   (__stpncpy) (char *dest, const char *src, size_t n)
 +
 and modify it to and modify it to
   (__stpcpy) (char *dest, const char *src, size_t n)   (__stpcpy) (char *dest, const char *src, size_t n)
 +</del>
  
 +<del>
 Recompile Recompile
 +</del>
   make   make
-  make install+  sudo make install
      
 Add in php.ini the support for gettext Add in php.ini the support for gettext
operating_systems/apple/apache_-_php_-_mysql.txt · Last modified: 2021/11/18 14:24 by ateixeira