Click to See Complete Forum and Search --> : compiling php with --enable-ftp failed.. Why ??


CyberOsc
01-23-2001, 03:17 AM
I try to compile my php with --enable-ftp option, but it failed.
When I use some ftp functions in my scripts, it returns an error : Undefined functions ftp_connect in line ....

My configuration is :
./configure --with-apache=/usr/local/apache --with-mysql=/usr/local/mysql --enable-ftp --enable-track-vars

There's no errors in the configuration and compilation.
Do I need to compile my Apache too ?
If yes, how should I compile my Apache ?
Anyone can help me ??

Thanks in advance

------------------
** It's the world of Oscario **

Sweede
01-23-2001, 03:58 AM
1) DONT compile php in apache. Enable apache's DSO module and compile php as a DSO module using --with-apxs=/path/to/apxs

2) you dont need to add the --with-mysql=/path/to/mysql in php4. php4 automaticly installs MySQL support

3) using the method you used, you do need to recompile apache and run make install. which is why you compile apache with SO module support.

cd apache_src
./configure --enable-modules=all --enable-shared=max [suexec options] [prefix, etc]

Energon
01-23-2001, 01:37 PM
are you sure that's right? Cuz I compiled PHP using the --with-apache adn then compiled apache with --activate-module=PHP_MODULE and it works as a module... am I confused on what I did as well?

CyberOsc
01-24-2001, 12:17 AM
I try to compile PHP with that way :
./configure --with-apxs
but it returns an error, it's said that I have to specified the path to the apxs, but where is the apxs ??

I found it in somewhere under /usr/local/apache/.....

Then I try to use that path, but it doesn't work !!
It seems that I have to use some options/parameters with the apxs.

Please help explain me about the apxs and DSO !!!

Thanks in advance


------------------
** It's the world of Oscario **

Sweede
01-24-2001, 01:26 AM
http://httpd.apache.org/docs/dso.html http://www.php.net/manual/en/install.unix.php

and there are INSTALL and README files in the source tarballs.

tar -zxvf apache
cd apache
./configure --enable-modules=all --enable-shared=most
make
make install

Apache is installed and ready to go...

tar -zxvf php
cd php
./configure --with-apxs=/path/to/axs
make
make install

edit httpd.conf and restart apache.

Sweede
01-24-2001, 01:27 AM
Originally posted by Energon:
are you sure that's right? Cuz I compiled PHP using the --with-apache adn then compiled apache with --activate-module=PHP_MODULE and it works as a module... am I confused on what I did as well?

that is a static module, the prefered way is a dynamic module (DSO). as a DSO, you can re-compile php and upgrade to a new version or whatever without re-compiling apache each and every time.