Broken PHP upgrade?

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I recently upgraded PHP through Homebrew. When using terminal command PHP -i I'm getting PHP Version => 7.2.2 as expected. However, when running phpinfo(); on localhost I get PHP Version 5.6.30 instead.

I have already restarted Apache ($ sudo apachectl -k restart), unlinked php56 ($ brew unlink php56) and tried ports :80 and :8080.

What am I missing? How can I locate and completely uninstall php56?

edit: @PatrickMevzek From localhost/phpinfo...

Apache Version  Apache/2.4.28 (Unix) PHP/5.6.30
Apache API Version  20120211
Hostname:Port   127.0.0.1:0
User/Group  _www(70)/70
Max Requests    Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts    Connection: 60 - Keep-Alive: 5
Virtual Server  No
Server Root /usr
Loaded Modules  core mod_so http_core prefork mod_authn_file 
mod_authn_core mod_authz_host mod_authz_groupfile mod_authz_user 
mod_authz_core mod_access_compat mod_auth_basic mod_reqtimeout 
mod_include mod_filter mod_mime mod_log_config mod_env mod_headers 
mod_setenvif mod_version mod_slotmem_shm mod_unixd mod_status 
mod_autoindex mod_negotiation mod_dir mod_userdir mod_alias mod_rewrite 
mod_php5 mod_hfs_apple2

From Terminal php -i

PHP Version => 7.2.2

System => Darwin zJorgeMBP.local 16.7.0 Darwin Kernel Version 16.7.0: 
    Thu Jan 11 22:59:40 PST 2018; 
    root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64
Build Date => Feb  1 2018 11:46:13
Configure Command =>  
  './configure' '--prefix=/usr/local/Cellar/php72/7.2.2_13' 
  '--localstatedir=/usr/local/var' 
  '--sysconfdir=/usr/local/etc/php/7.2' 
  '--with-config-file-path=/usr/local/etc/php/7.2' 
  '--with-config-file-scan-dir=/usr/local/etc/php/7.2/conf.d' 
  '--mandir=/usr/local/Cellar/php72/7.2.2_13/share/man' 
  '--enable-bcmath''--enable-calendar' '--enable-dba' '--enable-exif' 
  '--enable-ftp' '--enable-gd-native-ttf' '--enable-mbregex' 
  '--enable-mbstring' '--enable-shmop' '--enable-soap' 
  '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' 
  '--enable-sysvshm' '--enable-wddx' '--enable-zip' 
  '--with-freetype-dir=/usr/local/opt/freetype' '--with-gd' 
  '--with-gettext=/usr/local/opt/gettext' '--with-iconv-dir=/usr' 
  '--with-icu-dir=/usr/local/opt/icu4c' 
  '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-kerberos=/usr' 
  '--with-mhash' '--with-ndbm=/usr' 
  '--with-png-dir=/usr/local/opt/libpng' '--with-xmlrpc' 
  '--with-zlib=/usr' '--with-readline=/usr/local/opt/readline' 
  '--without-gmp' '--without-snmp' 
  '--with-libxml-dir=/usr/local/opt/libxml2' 
  '--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc' 
  '--with-unixODBC=/usr/local/opt/unixodbc' '--with-bz2=/usr' 
  '--with-openssl=/usr/local/opt/openssl' '--enable-fpm' 
  '--with-fpm-user=_www' '--with-fpm-group=_www' '--with-curl' 
  '--with-xsl=/usr' '--with-ldap' '--with-ldap-sasl=/usr' 
  '--with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' 
  '--with-pdo-mysql=mysqlnd' '--disable-opcache' '--enable-pcntl' 
  '--without-pear' '--enable-dtrace' '--disable-phpdbg' 
  '--enable-zend-signals' '--with-sodium=/usr/local/opt/libsodium'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/etc/php/7.2
Loaded Configuration File => /usr/local/etc/php/7.2/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php/7.2/conf.d
Additional .ini files parsed => (none)
PHP API => 20170718
PHP Extension => 20170718
Zend Extension => 320170718
Zend Extension Build => API320170718,NTS
PHP Extension Build => API20170718,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => available, disabled

and from httpd -t -D DUMP_RUN_CFG

ServerRoot: "/usr/local/opt/httpd"
Main DocumentRoot: "/usr/local/var/www"
Main ErrorLog: "/usr/local/var/log/httpd/error_log"
Mutex default: dir="/usr/local/var/run/httpd/" mechanism=default 
Mutex mpm-accept: using_defaults
PidFile: "/usr/local/var/run/httpd/httpd.pid"
Define: DUMP_RUN_CFG
User: name="_www" id=70 not_used
Group: name="_www" id=70 not_used

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community