Multiple Versions of PHP RUN ON SERVER

有这个需求是测试服务器要上一套老的ecshop;

于是版本不能太高;

方案:

通过nginx把请求传递给不同版本的cgi处理;然而遇到了一些麻烦;编译安装的时候根本就走不通。(现在走通了,但是我觉得肯定还存在问题,就是说扩展是有作用范围的。通过yum install 的扩展支持,是不是全局的?全局的肯定影响性能)

step 1:下载源码包

sep  2:准备编译的参数

参考:

./configure --prefix=/usr/local/php.5.3 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql=/usr/local/mysql--with-pdo-mysql --with-mysqli --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=nginx --with-fpm-group=nginx --with-libdir=lib64 --enable-ftp --with-jpeg-dir=/usr/lib/
--enable-fpm

然后make && make install

step 3 复制ini文件到指定目录下;

Installing PHP SAPI module: cgi
Installing PHP CGI binary: /usr/local/php.5.3/bin/
Installing PHP CLI binary: /usr/local/php.5.3/bin/
Installing PHP CLI man page: /usr/local/php.5.3/man/man1/
Installing build environment: /usr/local/php.5.3/lib/php/build/
Installing header files: /usr/local/php.5.3/include/php/
Installing helper programs: /usr/local/php.5.3/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php.5.3/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php.5.3/lib/php/
[PEAR] Archive_Tar - installed: 1.3.12
[PEAR] Console_Getopt - installed: 1.3.1
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util - installed: 1.2.3
[PEAR] PEAR - installed: 1.9.5
Wrote PEAR system config file at: /usr/local/php.5.3/etc/pear.conf
You may want to add: /usr/local/php.5.3/lib/php to your php.ini include_path
/usr/local/php5.2.5/php-5.3.29/build/shtool install -c ext/phar/phar.phar /usr/local/php.5.3/bin
ln -s -f /usr/local/php.5.3/bin/phar.phar /usr/local/php.5.3/bin/phar
Installing PDO headers: /usr/local/php.5.3/include/php/ext/pdo/

step 4 启动一个cgi 进程

/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 9001 -C 5 -f /usr/local/php.5.3/bin/php-cgi(这里定了9001端口,当然你也可以通过修改config文件 指定端口)

step 5 前提你有spawn-fcgi 没有的话编译安装;

step 6 配置nginx 虚拟机  fastcgi_pass   127.0.0.1:9001;端口请注意

时间: 2024-10-23 02:35:08

Multiple Versions of PHP RUN ON SERVER的相关文章

PHPFarm - How to run multiple versions of PHP on the same computer

How to Run Multiple Versions of PHP on One Server 转载:http://www.sitepoint.com/run-multiple-versions-php-one-server/ PHPFarm - How to run multiple versions of PHP on the same computer 转载:http://thejibe.com/blog/14/02/phpfarm

Installing Multiple Versions of MySQL

Installing Multiple Versions of MySQL As with any RDBMS, there are circumstances in which you need to run multiple, differing versions on the same server. This posts reviews my preferred way of accomplishing this for MySQL on Linux. The server in que

Hive的Metastore contains multiple versions

hive 客户端报错:Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient 咋一看以为是Mysql连接不上,结果发现Mysql正常 错误日志: 1 Exception in thread "main" jav

启动hive命令报错 “Metastore contains multiple versions”

错误日志:  Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient       at org.apache.hadoop.hive.ql.session.SessionState.start(SessionSt

Spark Sql数仓报-Metastore contains multiple versions

Spark版本为2.1.0,Hadoop版本为2.7.1,元数据存储在mysql中,异常信息如下: Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient at org.apache.hadoop.hive.ql.session.

Encountered multiple versions of the assembly with GUID Try pre-importing one of these assemblies 错误 解决方法

vs2008 开发的 winform程序  迁移到 vs2010后编译发生错误. “Encountered multiple versions of the assembly with GUID ******************  Try pre-importing one of these assemblies” vs2008中最高用framework3.5,升级后引用的dll.com组件可能已经是针对4.0的了. 在2012用将framework改为4.0即可.

Eclipse运行Maven的SpringMVC项目Run on Server时出现错误:Error configuring application listener of class org.springframework.web.context.ContextLoaderListener的问题解决

错误: 严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoaderBase.

web项目没有run on server时..

文章转载至:http://blog.csdn.net/hongchangfirst/article/details/7722703 web项目没有run on server 1.首先确保正确安装Tomcat和JDK.(eclipse要确保eclipse是javaee版本的,或者已经安装看wtp插件 ) Tomcat安装参考:http://jingyan.baidu.com/article/4853e1e53465271909f72690.html 2.找到对于web项目的文件夹,打开文件夹下.p

eclipse Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Sertomcat

eclipse Run On Server 异常:could not load the Tomcat Server configuration at Servers\tomcat V5.0 Sertomcat无法运行 servce运行不了的问题解决 :first-child { margin-top: 0; } blockquote > :last-child { margin-bottom: 0; } img { border: 0; max-width: 100%; height: auto