PHP and Http Extension
Recently I am testing the performance for PHP. I just saw a very ‘easy’ exceptions say http\Url class not found. I was thinking it is easy to fix this and it is just a typo or wrong name.
But I am wrong, it is related to this extension in PHP https://mdref.m6w6.name/ It is PECL/http
First of all, I am using CentOS7, I am using PHP5.6, I am using docker. That brings a lot of environment setting up issues for me.
Here is the Dockerfile, that is the most important things to build the ENV.
#Run a Simple REST API based on playframework
#Prepre the OS
FROM centos:7
MAINTAINER Carl Luo <luohuazju@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
ENV PERL_MM_USE_DEFAULT 1
ENV AWS_PHP_CACHE_DIR /tmp/awscache
RUN yum install -y gcc make wget
RUN yum install -y mysql-devel
RUN mkdir /install/
WORKDIR /install/
#install perl
RUN wget http://www.cpan.org/src/5.0/perl-5.16.3.tar.gz
RUN tar zxvf perl-5.16.3.tar.gz
WORKDIR /install/perl-5.16.3
RUN ./Configure -des -Dusethreads
RUN make && make install
RUN cpan -fi Log::Log4perl YAML::XS Data::Dumper DBI IOC Redis Time::Piece Path::Class
RUN cpan -fi autodie Thread::Queue threads
RUN cpan -fi DBIx::Connector
RUN cpan DBD::mysql
#install php5.6
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
RUN yum install -y php56w
RUN yum install -y php56w-mysqlnd
RUN yum install -y php56w-common
RUN yum install -y php56w-devel
RUN yum --enablerepo=remi,remi-php56 install -y php-pear
RUN yum install -y php56-php-raphf
#set up php
ADD conf/php.ini /etc/php.ini
RUN echo "usr/\n" | pecl install pecl_http-2.5.6
#Install the Application
RUN mkdir /share/
WORKDIR /share/
ADD dist/jobs-consumerphp-1.0.tgz /share/
RUN mkdir -p /share/jobs-consumerphp-1.0/logs
#Start the Application
RUN mkdir -p /app/
RUN mkdir -p /tmp/awscache
ADD start.sh /app/
WORKDIR /app
CMD [ "./start.sh" ]
And remember that I have these lines in order in php.ini to make it working.
extension=iconv.so
extension=raphf.so
extension=propro.so
extension=http.so
References:
http://stackoverflow.com/questions/21077976/pecl-http-failed-to-load
http://stackoverflow.com/questions/19517095/struggling-to-install-php-pecl-on-centos
https://support.rackspace.com/how-to/install-epel-and-additional-repositories-on-centos-and-red-hat/
https://webtatic.com/packages/php56/
http://rpms.famillecollet.com/enterprise/7/
http://monoclechronicles.net/unable-to-load-http-so/
分享到:
相关推荐
Furthermore, this book explains the PHP functionality in detail, including the vastly improved object-oriented capabilities and the new MySQL database extension. PHP and MySQL Recipes will be a useful...
【PHP扩展写作Part I:PHP和Zend简介】 在本文中,我们将探讨PHP扩展的基本概念以及为何要编写PHP扩展。PHP扩展是PHP语言的核心组成部分,它们提供了额外的功能,使得PHP能够与操作系统更紧密地交互,或者实现特定...
php-beanstalk is a extension of php and now support for php5 and php7. This extension has double performance than native php client, and the extension has implement most of the beanstalk protocol....
linux到Windows通用Mac OS X全部php4.3到php8.0版本 win安装到\ext目录中修改php.ini添加extension=ixed.7.4.win【对应的】 linux原理一样
标题 "php_mongo-1.3.1( PHP 5.2, 5.3 and 5.4) builds for Windows VC9 (32bit and 64bit)" 描述了一个针对PHP 5.2、5.3和5.4版本的MongoDB扩展的Windows构建,适用于Visual C++ 9编译器(32位和64位)。...
Furthermore, this book explains the PHP functionality in detail, including the vastly improved object-oriented capabilities and the new MySQL database extension. PHP and MySQL Recipes will be a useful...
This edition introduces new object relevant features such as traits, reflection extension additions, callable type hinting, improvements to exception handling, and many smaller language enhancements....
我安装laravel的一个扩展时,提示没有ZipArchive 我根据国外的一个网站的提示进行操作,任然不成功,后重新修改...Restart apache with sudo apachectl restart and you'll see the zip extension being loaded now.
在 Windows 2003 + IIS 6.0 环境下,以 FastCGI 方式配置 PHP 5.3.3 需要经过四个步骤:IIS 6.0 环境配置、下载 PHP 5.3.3、配置 PHP 和下载安装 Microsoft FastCGI Extension for IIS 5.1 and 6.0。 首先,需要在 ...
dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line that loads the extension. ;;;;;;;;;;;;;;;;;;; ; About this file ; ;;;;;...
标题 "php_igbinary-2.0.1-v11 and php5.3到71所有redis_dll文件" 涉及的是PHP扩展模块igbinary和Redis的相关内容,适用于PHP 5.3到7.1版本。igbinary是一个用于序列化和反序列化数据的PHP扩展,它能够显著提升性能...
在PHP扩展编写的过程中,理解参数处理、数组以及ZVALs的工作原理至关重要。这部分内容将深入探讨这些主题,帮助你更好地构建和优化PHP内部函数。 首先,我们来看如何接受传递给内部函数的值。不同于用户空间代码中...
1.5 Extension Development》不仅适合于想要深入了解Joomla! 扩展开发的开发者,也适合那些希望通过了解基本原理来更好地管理自己网站的非技术人员。通过本书的学习,读者可以掌握创建高效、可靠的Joomla! 扩展所需...
It offers a collection of well documented and easy-to-use classes that can be used and extended to build native extensions for PHP. The full documentation can be found on http://www.php-cpp.com. ...
在PHP扩展编写中,参数、数组和ZVAL是核心概念,尤其在理解PHP内部机制时至关重要。本篇文章将继续深入探讨这些主题。 首先,当我们谈论“Accepting Values”时,这通常指的是扩展函数如何接收和处理从用户空间传递...
Windows+IIS 环境下以 Fastcgi 方式配置 ...因此,在 IIS 6.0 环境下配置 PHP 5.3.3 使用 Fastcgi 方式配置,需要下载 PHP 5.3.3、Microsoft FastCGI Extension for IIS 5.1 and 6.0,并配置 PHP.ini 和 FastCGI 扩展。
主要介绍了PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法,是在进行PHP数据库程序开发中常会遇到的错误,需要的朋友可以参考下
压缩包内包含了如"go-pear.bat"这样的工具,它是PEAR(PHP Extension and Application Repository)的安装脚本,用于管理PHP扩展和应用程序。"php5ts.dll"是PHP的多线程安全版本的核心动态链接库,对于某些特定的PHP...
PHP - Delphi interface and PHP extensions development framework { $Id: readme.txt,v 7.2 10/2009 delphi32 Exp $ } PHP4Delphi is a Delphi interface to PHP for Delphi 5, 6, 7, Delphi 2005 - Delphi ...