Find the answer to your question
Advanced Search
Published: May 03 2011, 6:09:00 PMUpdated: November 28 2020, 1:55:29 PM
file exchange: programmatic code sample
How can i programatically upload files for the FileExchange Service using PHP?
Please refer to the following code sample
You have to make sure that you php is compiled with the following configure commands:
Configure Command './configure' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-exif' '--enable-fastcgi' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-sqlite-utf8' '--enable-wddx' '--enable-zip' '--prefix=/usr' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/opt/openssl' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mime-magic' '--with-mssql=/usr' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/opt/openssl' '--with-openssl-dir=/opt/openssl' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-ttf' '--with-unixODBC=/usr' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'
Note: this is a tested configuration, doesnt require all the commands to be enabled. "enabling --with-curl=/opt/curlssl/' " should work.
You can check your current Configure command row from the phpinfo();
if you cant find the above commands in your php installation, you can follow the following tutorials.
Clear steps are here:
http://www.apachefriends.org/f/viewtopic.php?f=17&t=39263&start=0&view=print
and if you are running dev on a windows machine you can refer this
http://www.apachefriends.org/f/viewtopic.php?f=17&t=39263
How well did this answer your question?
Answers others found helpful