View Single Post
  #17 (permalink)  
Old 12-18-2007, 06:22 AM
Sabari Sabari is offline
D-Web Genius
 
Join Date: Jul 2007
Posts: 1,008
Sabari is on a distinguished road
Default Re: PHP Tips and Tricks

Adding an extension

Problem
You need PHP's built-in ftp functions for the ultra-cool script you are writing, but your
service
provider does not have PHP compiled with the --enable-ftp option.

Solution
If you have a shell account on a system with the same operating system as your web server, grab the
PHP source tarball and build using:


--with-apxs --enable-ftp=shared
You can check which flags your provider used by putting a phpinfo() call in a script on your server.


<?phpinfo()?>
Once compiled, you will find a "modules/ftp.so" file which you can copy to your web server and
enable either by putting:


extension=ftp.so
in your php.ini file or by adding this to the top of your script:


<?php dl("ftp.so") ?>
__________________
Thanks & Regards
Sabari...
Reply With Quote