Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / PHP / General PHP Topics / March 2010



Tip: Looking for answers? Try searching our database.

missing http_post_fields() in CentOS 5.4

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Russell - 09 Mar 2010 20:54 GMT
Fatal error: Call to undefined function http_post_fields() ...

http://php.net/manual/en/function.http-post-fields.php indicates "(PECL
pecl_http >= 0.10.0)".

We have php-pecl-session_mysql-1.9-1.el5.rf.i386.rpm installed but are
still unable to parse that function.

Will someone tell me please what CentOS or rpmforge package is needed?
Greg Russell - 09 Mar 2010 21:13 GMT
> Fatal error: Call to undefined function http_post_fields() ...
>
[quoted text clipped - 5 lines]
>
> Will someone tell me please what CentOS or rpmforge package is needed?

We also have:
# yum list | grep php-pear | grep installed
php-pear.noarch                     1:1.4.9-6.el5             installed
php-pear-Auth-SASL.noarch           1.0.2-4.el5.centos        installed
php-pear-MDB2.noarch                2.4.1-2.el5.centos        installed
php-pear-MDB2-Driver-mysql.noarch   1.4.1-3.el5.centos        installed
php-pear-Net-SMTP.noarch            1.2.10-1.el5.centos       installed
php-pear-Net-Socket.noarch          1.0.8-1.el5.centos        installed
php-pear-Net-URL.noarch             1.0.15-1.el5.centos       installed
php-pear-db.noarch                  1.7.13-2.el5.rf           installed
Adam Harvey - 10 Mar 2010 04:06 GMT
> Fatal error: Call to undefined function http_post_fields() ...
>
[quoted text clipped - 3 lines]
> We have php-pecl-session_mysql-1.9-1.el5.rf.i386.rpm installed but are
> still unable to parse that function.

That would presumably be the package for the PECL session_mysql
extension, not http.

> Will someone tell me please what CentOS or rpmforge package is needed?

I don't use CentOS, but it looks like RPMforge's php-pecl-http would be
the package you need.

Adam
Greg Russell - 10 Mar 2010 05:52 GMT
>> Fatal error: Call to undefined function http_post_fields() ...
...
>> Will someone tell me please what CentOS or rpmforge package is needed?
>
> I don't use CentOS, but it looks like RPMforge's php-pecl-http would be
> the package you need.

Thanks for your considerations.

There's no such php-pecl-http package at rpmforge, so I downloaded,
compiled and installed http://pecl.php.net/package/pecl_http/1.6.6

...
# make install
Installing shared extensions:     /usr/lib/php/modules/
Installing header files:          /usr/include/php/

"/etc/init.d/httpd restart" was given, yet the same problem persists:

Fatal error: Call to undefined function http_post_fields() ...
Greg Russell - 10 Mar 2010 06:05 GMT
>>> Fatal error: Call to undefined function http_post_fields() ...
> ...
[quoted text clipped - 16 lines]
>
> Fatal error: Call to undefined function http_post_fields() ...

I'll add:
# strings - /usr/lib/php/modules/http.so | grep http_post_fields
zif_http_post_fields
http_post_fields
zif_http_post_fields
zif_http_post_fields
zif_http_post_fields
Álvaro G. Vicario - 10 Mar 2010 08:23 GMT
El 10/03/2010 6:52, Greg Russell escribió/wrote:

>>> Fatal error: Call to undefined function http_post_fields() ...
> ...
[quoted text clipped - 16 lines]
>
> Fatal error: Call to undefined function http_post_fields() ...

Are you calling pecl_http from your php.ini file?

Signature

-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Greg Russell - 10 Mar 2010 18:39 GMT
>> Fatal error: Call to undefined function http_post_fields() ...
>
> Are you calling pecl_http from your php.ini file?

Thank you for your considerations. Apparently, the answer is "no":

$ grep pecl /etc/php.ini
$
Álvaro G. Vicario - 11 Mar 2010 08:53 GMT
El 10/03/2010 19:39, Greg Russell escribió/wrote:

>>> Fatal error: Call to undefined function http_post_fields() ...
>>
[quoted text clipped - 3 lines]
>
> $ grep pecl /etc/php.ini

You have to instruct PHP to load the *.so file you compiled. It must be
something like:

extension=http.so

... according to this article:

http://www.host.co.in/forums/f37/how-install-pecl_http-php-extension-853/

Be aware that you may have an /etc/php.d/ directory with several
configuration files. If so, it can be a good idea to add a new file.

Signature

-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Greg Russell - 11 Mar 2010 09:01 GMT
>> $ grep pecl /etc/php.ini
>
[quoted text clipped - 9 lines]
> Be aware that you may have an /etc/php.d/ directory with several
> configuration files. If so, it can be a good idea to add a new file.

Excellent, thank you, the problem is solved.

$ cat /etc/php.d/http.ini
extension=http.so
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.