What do I do to add curl, gd2 support in php?

hariskhan

Well-Known Member
Apr 15, 2004
146
0
166
Hello,

I am running;

WHM 10.8.0 cPanel 10.8.1-R113
FreeBSD 5.4-RELEASE i386 - WHM X v3.1.0

I am trying to add curl, gd2 support to my php 4.4.1 with apache 1.3.34. I have installed curl through ports and gd2 is already installed;

# pkg_info|grep curl
curl-7.15.3 Non-interactive tool to get files from FTP, GOPHER, HTTP(S)

# pkg_info | grep gd
gd-2.0.33_4,1 A graphics library for fast creation of images

I am unable to successfully phpize under /home/installd/buildapache/php-4.4.1/ext/curl/. I get the following error message;

# phpize
Configuring for:
PHP Api Version: 20020918
Zend Module Api No: 20020429
Zend Extension Api No: 20050606
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

When I try;

# pkg_info |grep autoconf
autoconf-2.13.000227_5 Automatically configure source code on many Un*x platforms
autoconf-2.59_2 Automatically configure source code on many Un*x platforms

Also;

# find /usr/ports/ -name "autoconf*" | more
/usr/ports/devel/autoconf213
/usr/ports/devel/autoconf253
/usr/ports/devel/autoconf259
/usr/ports/distfiles/autoconf-2.59.tar.bz2

; ===================================

What am I missing? What do I need to do to add curl, gd2 support in php?

This is an urgent situation. Need a prompt reply.

Thankyou! in advance
 

avijit

Well-Known Member
Jul 26, 2004
116
0
166
India
Now you need to recompile apache with those in support. In shell you can use /scripts/easyapache or in the WHM use the Software >> Apache Update
 

hariskhan

Well-Known Member
Apr 15, 2004
146
0
166
ExecCGI problem after running /scripts/easyapache

Hello,

I had an immediette ExecCGI problem after running /scripts/easyapache. No php script would run, I got log alot of log entries like;

2763:[Mon May 8 10:49:20 2006] [error] [client xxx.xxx.xx.xxx] Options ExecCGI is off in this directory: /usr/local/apache/htdocs/phpinfo.php

I immediettly started getting similar complaints from customers. Their php scripts weren't working as well.

I ran /scripts/easyapache, it gave me 8 options. I chose #7, didn't work out well. The procedure was successful, but after apache/php were re-compiled, I started having problems with ExecCGI. apache wanted to me to add ExecCGI directives for everywhere I wanted scripts to run from. It the end, I had to use option #1 to return the default cpanel version of apache, without! curl and gd2 support.

I have 75 clients on this machine, I can't afford to manually poke into httpd.conf, every time I add up a new account or when one of my customers creates a new folder and puts a php file and they don't run/get executed. Having said that, I don't want to give cgi execution privileges to every user as well.

1) Why don't I have ExecCGI problems when apache is compiled with option #1 in /scripts/easyapache?

2) Why does apache need ExecCGI when apache is compiled with option #7 in /scripts/easyapache? (Could compiling in an extra mod with it, cause it?)

3) Is it possible with option #1 when using /scripts/easyapache, to add --with-curl or --with-gd2 to the list of compile options?

4) How do I go by to add curl, gd2 support through /scripts/easyapache now?
 

destr0yr

Well-Known Member
May 4, 2004
58
0
156
Kelowna, BC.
hariskhan said:
1) Why don't I have ExecCGI problems when apache is compiled with option #1 in /scripts/easyapache?

2) Why does apache need ExecCGI when apache is compiled with option #7 in /scripts/easyapache? (Could compiling in an extra mod with it, cause it?)

3) Is it possible with option #1 when using /scripts/easyapache, to add --with-curl or --with-gd2 to the list of compile options?

4) How do I go by to add curl, gd2 support through /scripts/easyapache now?
If you load up a standard phpinfo(); page, does the Server API say Apache or CGI? If Apache, you do not have phpsuexec, if CGI, you do. Depending on what you have, you should recompile again using that option.

I can't honestly answer all of your questions above, however, have you tried option #6? It will probably suit your needs. I would recommend (as well as the default list of modules selected), selecting the following in the Php Module section: Curl, Curl SSL, GD, GetText, Use System Mysql, Freetype, XML RPC and Zip. Of course, if you don't need these modules, don't select them. Also, from the output of your phpinfo, check the "Configure Command" section and make sure that you have those modules selected.