简体   繁体   中英

Unable to install phalcon 2.x on VPS from 1and1 hosting

I ran into a troublesome issue.

I'm using 1 and 1 virtual private server redhat linux. The server's default PHP version is PHP 5.3.

I do have installed PHP 5.5 on the server. I switch to PHP 5.5 using alias php='path to php' .

I run command php -v to see if the version has changed, indeed it has - the PHP version is now 5.5.

However I am still unable to install phalcon, when I run the command ./install -i I get this error message:

Php 5.3 is not supported.

Any ideas how to resolve this problem?

Alias will not work in your case because it changes php path only for your terminal, not globally.

I'm not a redhat user so can't give you exact steps but a kinda dirty solution is to find your php binary (on debian is in /usr/bin/ , /bin/ or /usr/local/bin ), rename it to for example php5.3 and in this place make a symbolic link to new php.

Remember that your php webserver (apache, nginx or whatever you use) should also have an updated php! What is more, to compile phalcon you'll need also an updated phpize and other dependencies. I'm not a linux expert so cannot tell you exactly which parts of php5-dev did changed between PHP 5.3 and 5.5 and which did not.

Alternatively you can just clone from github and install an old phalcon 2.x which is also great. The new 3.0 doesn't have that much breaking features. It's killing feature is PHP7 which it seems that you're not going to use. Phalcon 2.x requires PHP5.4+

I belive there are better ways how a php update should be performed but I don't know them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM