mysql - Replace php 7 version with php 5.4 - Ask Ubuntu


i moving sites server new one. few sites not work after moving them. 1 of them said "mysql not supported php version". after searching, seems caused deprecated mysql extension. thought changing php version same old server resolve - old server php version 5.4.45

i tried following answers similar questions nothing worked. did 1 since mysql deprecated in php5.6, wouldn't fix problem: how can downgrade php 7 php 5.6 on ubuntu 16.04?

tried these ones also: how install different (upgrade or downgrade) php version in still supported ubuntu release?

how downgrade php 5.5.9 5.4 in ubuntu 14.04 (installed lamp)

i guess since these questions few years old already, resources might not available anymore.

can tell me way install php 5.4 work in present time?

additional info: - ubuntu 16.04

the short answer is, don't. 5.4 no longer supported , has known vulnerabilities not fixed.

the way it's possible find source , compile yourself.

however, naught. using sudo apt install php5.6-mysql explained in installing php 5.6 on xenial (16.04) need.

you need understand deprecated isn't same removed. mysql() still work in 5.5/5.6. it's not recommended continue using it, work, you'll need turn logging down rid of deprecation warnings.

php.ini

error_reporting = e_all & ~e_deprecated & ~e_notice 

if you're receiving error related undefined function, means it's unable call function you're trying use. in case, due missing php5.6-mysql module.

some basic modules you'll need, in addition php5.6-mysql included in following line.

sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User