Jump to content


Photo

Configure Extensions for PHP


  • Please log in to reply
17 replies to this topic

#1 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 06 June 2006 - 02:53 PM

We're using a Sun server at work for our intranet and I need to configure it so it has all the typical PHP stuff you would get from a web host for PHP5.0.4. We successfully have PHP running, but it's missing some things I need such my PHP pages can't authenticate against our LDAP server now, but it works on a different server. This is what is currently under the configure command section that shows when using the phpinfo() function.

'./configure' '--prefix=/usr/local/php' '--with-mysql=/usr/local/mysql' '--with-apxs2=/usr/local/apache2/bin/apxs'

So I need to be able to run XML, XSL, XSLT (all the stuff Dreamweaver needs to process RSS feeds), LDAP authentication and image manipulation if it's done here. I have scoured the internet finding various ways to set up the ./configure, but I would like to try to get everything a web host would typically supply and can't seem to find anything on that. If anyone could PLEASE help me with all the extras, that would be outstanding so we don't have to go through this again because PHP is missing something as I become more advanced. I'm still pretty much a noob.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 07 June 2006 - 07:45 AM

Dont know if it helps at all but here is my configure for my dev server.
'./configure' '--prefix=/usr/lib/php5' '--sysconfdir=/etc' '--cache-file=./config.cache' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/cli-php5' '--with-config-file-scan-dir=/etc/php/cli-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl' '--with-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--enable-ftp' '--without-gettext' '--without-gmp' '--without-hwapi' '--without-iconv' '--without-informix' '--without-kerberos' '--disable-mbstring' '--with-mcrypt' '--without-mcve' '--disable-memory-limit' '--with-mhash' '--with-ming' '--without-mnogosearch' '--without-msql' '--without-mssql' '--with-ncurses' '--without-oci8' '--without-oci8-instant-client' '--without-oracle' '--without-openssl' '--without-openssl-dir' '--without-ovrimos' '--disable-pcntl' '--without-pfpro' '--with-pgsql' '--with-pspell' '--without-recode' '--disable-shmop' '--with-snmp' '--enable-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--with-tidy' '--disable-wddx' '--with-xmlrpc' '--with-xsl' '--with-zlib' '--disable-debug' '--disable-dba' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-tiff-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-imap' '--without-imap-ssl' '--with-mysql=/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-readline' '--without-libedit' '--without-mm' '--disable-sqlite-utf8'


#3 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 13 June 2006 - 07:59 PM

Sounds to me like you need LDAP, GD and Sablotron (XSL, XSLT). XML comes built-in with PHP5, i believe.
you should be able to do this to get help:
./configure --help



but, you can configure it like this:
./configure \
--prefix=/usr \
--with-gd=/usr \
--with-xslt-sablot=/usr \
--with-ldap=/usr

of course you might require more features, but this should do it for what you've asked for. just append the rest to this.

You'll need to store your LDAP, GD and Sablot libs in the appropriate place. on linux, it's in /usr/* (thats the default base install dir for most libraries) which is why in my configure code, i use /usr as my prefix. i'm not sure what sun server structure is like. /usr can even be /home/username/usr on a linux system. it totally depends on your environment variables.

actually, you might not have to specify the path to the gd libraries for GD because it seems as though PHP ships with GD by default so if you're compiling from source, you should have GD there so you can just use --with-gd

you can view details of your required libs in the links below. also, in the links below, there are links to sites where you can download the required libs. please read through it well :) and if you still genuinely have a problem with it, let us know.

Sablotron: [a href=\"http://www.php.net/xslt\" target=\"_blank\"]http://www.php.net/xslt[/a]
LDAP: [a href=\"http://www.php.net/ldap\" target=\"_blank\"]http://www.php.net/ldap[/a]
GD: [a href=\"http://www.php.net/gd\" target=\"_blank\"]http://www.php.net/gd[/a]

Installation and configuration: [a href=\"http://www.php.net/manual/en/install.php\" target=\"_blank\"]http://www.php.net/manual/en/install.php[/a]

#4 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 13 June 2006 - 08:35 PM

That's very useful. Thanks.

You know we got through the ./compile finally after resolving all of the paths and installing all of the needed extensions, and now "make" is failing. First it was GD so we pulled the with statement for that temporarily from the ./configure, then make had a problem with mysql. This is very frustrating.

It's coming up with parse errors, conflicting types, and previous declarations. The last one ended with

Error code 1
make: Fatal error: Command failed for target `ext/mysql/php_mysql.lo'



#5 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 13 June 2006 - 08:45 PM

it would be helpful if you posted the configure command along with your exact output.

in any case, i always do this efore i actualy make:
make test

that will only work if your Makefile has a test rule. but what it does is, simulates the make and does tests to see if your make has all the things it needs.

let me know how it goes.

#6 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 13 June 2006 - 09:27 PM

Here's the error output. I don't have access to the configure command at the moment, but I'll get that as soon as I can. I'm very new to the UNIX environment, and the admin I'm working with doesn't have experience in compiling programs, but it almost looks like some things need to be moved around judging by this output...


/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c: In function `_php_iconv_appendl':
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:254: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c: In function `php_iconv_string':
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:414: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c: In function `_php_iconv_strlen':
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:528: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c: In function `_php_iconv_substr':
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:641: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c: In function `_php_iconv_strpos':
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:772: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c: In function `_php_iconv_mime_encode':
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:1021: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:1121: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c: In function `php_iconv_stream_filter_append_bucket':
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:2379: warning: passing arg 2 of `libiconv' from incompatible pointer type
/home/someuser/php_setup_files/php-5.1.4/ext/iconv/iconv.c:2458: warning: passing arg 2 of `libiconv' from incompatible pointer type
/bin/sh /home/someuser/php_setup_files/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/mime_magic/ -I/home/someuser/php_setup_files/php-5.1.4/ext/mime_magic/ -DPHP_ATOM_INC -I/home/someuser/php_setup_files/include -I/home/someuser/php_setup_files/main -I/home/someuser/php_setup_files/php-5.1.4 -I/usr/local/include/libxml2 -I/usr/sfw/include -I/usr/local/include -I/home/someuser/php_setup_files/ext/date/lib -I/home/someuser/php_setup_files/php-5.1.4/ext/date/lib -I/usr/sfw/include/mysql -I/usr/include/pspell -I/usr/include/libxml2 -I/home/someuser/php_setup_files/TSRM -I/home/someuser/php_setup_files/Zend -I/home/someuser/php_setup_files/php-5.1.4/main -I/home/someuser/php_setup_files/php-5.1.4/Zend -I/home/someuser/php_setup_files/php-5.1.4/TSRM -I/home/someuser/php_setup_files/ -D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include -g -O2 -c /home/someuser/php_setup_files/php-5.1.4/ext/mime_magic/mime_magic.c -o ext/mime_magic/mime_magic.lo
/bin/sh /home/someuser/php_setup_files/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/mysql/ -I/home/someuser/php_setup_files/php-5.1.4/ext/mysql/ -DPHP_ATOM_INC -I/home/someuser/php_setup_files/include -I/home/someuser/php_setup_files/main -I/home/someuser/php_setup_files/php-5.1.4 -I/usr/local/include/libxml2 -I/usr/sfw/include -I/usr/local/include -I/home/someuser/php_setup_files/ext/date/lib -I/home/someuser/php_setup_files/php-5.1.4/ext/date/lib -I/usr/sfw/include/mysql -I/usr/include/pspell -I/usr/include/libxml2 -I/home/someuser/php_setup_files/TSRM -I/home/someuser/php_setup_files/Zend -I/home/someuser/php_setup_files/php-5.1.4/main -I/home/someuser/php_setup_files/php-5.1.4/Zend -I/home/someuser/php_setup_files/php-5.1.4/TSRM -I/home/someuser/php_setup_files/ -D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include -g -O2 -c /home/someuser/php_setup_files/php-5.1.4/ext/mysql/php_mysql.c -o ext/mysql/php_mysql.lo
In file included from /usr/include/sys/signal.h:34,
from /usr/include/signal.h:26,
from /home/someuser/php_setup_files/php-5.1.4/ext/mysql/php_mysql.c:55:
/usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:292: error: parse error before '}' token
/usr/include/sys/siginfo.h:294: error: parse error before '}' token
/usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
/usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
/usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
/usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
/usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
/usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
/usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
/usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
/usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
/usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
/usr/include/sys/siginfo.h:426: error: parse error before '}' token
/usr/include/sys/siginfo.h:428: error: parse error before '}' token
/usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
/usr/include/sys/siginfo.h:437: error: parse error before '}' token
In file included from /usr/include/signal.h:26,
from /home/someuser/php_setup_files/php-5.1.4/ext/mysql/php_mysql.c:55:
/usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
In file included from /home/someuser/php_setup_files/php-5.1.4/ext/mysql/php_mysql.c:55:
/usr/include/signal.h:111: error: parse error before "siginfo_t"
/usr/include/signal.h:113: error: parse error before "siginfo_t"
*** Error code 1
make: Fatal error: Command failed for target `ext/mysql/php_mysql.lo'




#7 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 13 June 2006 - 10:15 PM

Here's the configure command...

/home/someuser/php_setup_files/php-5.1.4/configure --prefix=/usr/local/php --with-mysql=/usr/sfw --with-apxs2=/usr/apache2/bin/apxs --with-pear=/usr/local/lib/php --with-pspe
ll --with-mime-magic --disable-safe-mode --enable-versioning --enable-ftp --with-openssl --with-freetype-dir --with-jpeg-dir=/usr/local --with-zlib --enable-libgcc--enable-
mbstring --enable-xslt --with-xslt-sablot --with-gettext --with-curl --with-dom --with-dom-xslt --with-zip --with-bz2 --with-iconv --enable-exif --enable-bcmath --enable-cal
endar --enable-soap --enable-xslt --with-xslt-sablot --enable-sockets --with-xsl


#8 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 14 June 2006 - 03:22 AM

just about to leave for work. i can come home and have a look but i quickly glanced through this and it seems like it could either be:
1. some of the files might not be meant for your architecture (php? libs?)
2. you haven't given paths to the libs in some cases (prefix/base install folder)
3. your library files might be too old


i'll have a look at it tonight. good luck till then

#9 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 14 June 2006 - 02:36 PM

Wow Bane, thanks for all of your help. I'll see if we can play with it a little today and I'll check into your suggestions.

#10 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 14 June 2006 - 07:13 PM

i haven't really helped you yet :)


why do you give the entire path here though?
--with-mysql=/usr/sfw


#11 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 14 June 2006 - 11:09 PM

I'm not sure where we are with this yet, but the guy I'm working with on this has been doing some troubleshooting today based on your pointers.

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]why do you give the entire path here though?[/quote]

Are you saying to take the path out?

#12 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 15 June 2006 - 03:04 AM

well if i'm not mistaken, /usr along should suffice.

suppose you have mysql installed in /usr/sfw/mysql, if you use the /usr/sfw prefix, it would look for /usr/sfw/sfw/mysql but if you used /usr only, it would search for mysql in /user/sfw/mysql

i believe that's the case. the configure just needs to know the base installation path (/usr). the environment variables should know where mysql is relative to the base installation path.

#13 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 15 June 2006 - 12:45 PM

I wonder if this path thing is our problem with GD as well? Your suggestions are great. I'll let you know how it goes.

Thanks again.

#14 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 15 June 2006 - 01:28 PM

hope it goes well.

by the way, was the last long list of errors you posted the output of 'make' or 'make test'?

#15 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 15 June 2006 - 01:57 PM

It was from make. That list of errors was run before you told us about make test.

#16 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 15 June 2006 - 02:12 PM

ok so how about the output for make test?

#17 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 15 June 2006 - 02:19 PM

I'll try to post something soon, that is if we are still having problems. We might be able to resolve them with your suggestions thus far. I'll certainly post something from make test if we get stumped; otherwise, I'll let you know our findings.

#18 jbsmith969

jbsmith969
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 15 June 2006 - 08:29 PM

So we've figured out some things and got past the MySQL problem, but now we're stuck on this...

In file included from /usr/include/sys/signal.h:34,
                 from /usr/include/signal.h:26,
                 from /home/someuser/php_setup_files/php-5.1.4/ext/posix/posix.c:42:
/usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:292: error: parse error before '}' token
/usr/include/sys/siginfo.h:294: error: parse error before '}' token
/usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
/usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
/usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
/usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
/usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
/usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
/usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
/usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
/usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
/usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
/usr/include/sys/siginfo.h:426: error: parse error before '}' token
/usr/include/sys/siginfo.h:428: error: parse error before '}' token
/usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
/usr/include/sys/siginfo.h:437: error: parse error before '}' token
In file included from /usr/include/signal.h:26,
                 from /home/someuser/php_setup_files/php-5.1.4/ext/posix/posix.c:42:
/usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
In file included from /home/someuser/php_setup_files/php-5.1.4/ext/posix/posix.c:42:
/usr/include/signal.h:111: error: parse error before "siginfo_t"
/usr/include/signal.h:113: error: parse error before "siginfo_t"
*** Error code 1
make: Fatal error: Command failed for target `ext/posix/posix.lo'

This is from make test. We tried to find posix.lo and did not find it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users