Thank you for your answers. I understand that it's risible to see how much time
it takes for me to set up php. Yes, my OS is obsolete, but I can't update
it now - not until I am better at understanding the way computers work )
I am currently involved in free online CS course, and learning C, and have started
php. I am afraid to reinstall my OS now because if anything goes wrong
I will not be able to fix that. But I will reinstall it in a while. For now I have to work
with what I have at hand )
I have reinstalled php two times; have configured apache, php, mysql.
Please, take a look at the description of how I have set up the new php version.
A few days ago I have set up phpmyadmin; the set up required an update of
preinstalled php version, which was 5.3.28. I have downloaded the 5.5.37, and
installed it.
php –v command has revealed that the old 5.3.28 version was still active
and was in use; not the “new” 5.5.37 one.
- after searching and trying I finally got to the stage at which php -v
command shows a correct 5.5.37 version.
- but when I try to load
http://localhost/~user/phpmyadmin/ I get the following message:
PHP 5.5+ is required.
Currently installed version is: 5.3.28
Here is how I go to php -v showing the correct version:
- I have installed mysql-5.6.20-osx10.7-x86_64.dmg.
- went to:
cd ; nano .bach_profile
- put:
export PATH=/usr/local/php5/bin:$PATH
- and then:
source ~/.bash_profile
- checked php -v again, and it was still 5.3
- then I used another check, which revealed a correct version:
/usr/local/php5/bin/php --version
PHP 5.5.37 (cli) (built: Jun 26 2016 13:53:04)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
- I have restarted apache, still the same 5.3. version popped up:
sudo apachectl restart
Password:
php -v
PHP 5.3.28 with Suhosin-Patch (cli) (built: Jan 23 2014 20:55:45)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
- then:
cd /usr/libexec/apache2
ls
httpd.exp mod_dav.so mod_negotiation.so
libphp5.so mod_dav_fs.so mod_perl.so
mod_actions.so mod_dav_svn.so mod_proxy.so
mod_alias.so mod_dbd.so mod_proxy_ajp.so
mod_asis.so mod_deflate.so mod_proxy_balancer.so
mod_auth_basic.so mod_dir.so mod_proxy_connect.so
mod_auth_digest.so mod_disk_cache.so mod_proxy_ftp.so
……………….
- and then I have done the following, and got the correct version:
sudo mv /usr/bin/php /usr/bin/php5328
sudo ln -s /usr/local/php5/bin/php /usr/bin/php
which php
/usr/bin/php
/usr/bin/php --version
PHP 5.5.37 (cli) (built: Jun 26 2016 13:53:04)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
- tried to go to
http://localhost/~user/phpmyadmin/, and got the same message:
PHP 5.5+ is required.
Currently installed version is: 5.3.28
Here are steps I took to set up AMP:
php –v
PHP 5.5.37 (cli) (built: Jun 26 2016 13:53:04)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
httpd -v
Server version: Apache/2.2.26 (Unix)
Server built: Dec 15 2013 18:33:29
cd /etc/apache2
sudo nano httpd.conf
- checked if the following is uncommented, and it was:
LoadModule php5_module libexec/apache2/libphp5.so
- checked mysql version and got an error:
/usr/local/mysql/bin/mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
- uninstalled mysql and installed it again; now I see mysql version:
/usr/local/mysql/bin/mysql -v
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 5.6.20 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
- set a password and put Y everywhere required (I think it can't
effect php version, so I omit details):
sudo mysql_secure_installation
Password:
- next:
mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3784
Server version: 5.6.20 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \q
Bye
- sudo apachectl configtest
httpd: Could not reliably determine the server's fully qualified domain name, using Users-MacBook-Pro.local for ServerName
Syntax OK
-
http://localhost/~username/phpinfo.php
loads full php configuration page
- tried to get to
http://localhost/~username/phpmyadmin/setup page
and still get the same message
PHP 5.5+ is required.
Currently installed version is: 5.3.28
Is it possible to help me on this issue?
Thank you very much for your understanding and patience!