Change version php on OVH

爱⌒轻易说出口 提交于 2019-12-10 18:45:45

问题


My problem is that i need to change the version of php from 4.4.9 to 5.5 on an remote server on http://www.ovh.com/

But i can't seem to be able to achieve this goal!

I have tried the recommended steps http://www.ovh.com/fr/g1207.configurer-php-web

And included the following .ovhconfig file:

app.engine=php
app.engine.version=5.5
http.firewall=none
environment=production

But when i check by phpinfo() or the command php -v, it says that i am using the php version 4.4.9

![enter image description here][1]

I am trying to run a Symfony application, which is not possible with a php of version lower than 5.3

How do i fix this problem ?


回答1:


You have to create a .htaccess file in /www/ and write into :

SetEnv PHP_VER 5.5
SetEnv REGISTER_GLOBALS 0
Header set cache-control "no-cache"

There is a .ovhconfig file (or create it) in the root of your FTP (before /www/) and write into :

app.engine=phpcgi
app.engine.version=auto

http.firewall=none
environment=development

Then go to the manager (v3 preferably because I'm not sure the function is available in the new interface yet) > Hébergement > Gestion de l'Accélérateur Géocache > Appuyer sur Valider pour vider le cache. (More explications here)

If this doesn't work, you should contact the OVH technical service.




回答2:


OVH paths to different versions of PHP:

/usr/local/php5.3/bin/php  =>  PHP 5.3.29 (cli) (built: Dec 10 2014 16:59:41)
/usr/local/php5.4/bin/php  =>  PHP 5.4.38 (cli) (built: Feb 26 2015 09:53:00)
/usr/local/php5.5/bin/php  =>  PHP 5.5.22 (cli) (built: Feb 23 2015 13:12:45)
/usr/local/php5.6/bin/php  =>  PHP 5.6.6 (cli) (built: Feb 23 2015 13:13:02)
/usr/local/php7.0/bin/php  =>  PHP 7.0.2 (cli) (built: Feb  8 2016 10:58:42) ( NTS )

(from this gist)



来源:https://stackoverflow.com/questions/30445226/change-version-php-on-ovh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!