curl and openssl dependencies

9 views
Skip to first unread message

JeffSchilling

unread,
Jan 8, 2010, 2:19:55 PM1/8/10
to Shine
When uploading the first 'version' of my app, the S3 code fails with

Warning: is_executable() [function.is-executable]: open_basedir
restriction in effect. File(/usr/bin/curl) is not within the allowed
path(s): (/home/gcortex/:/usr/lib/php:/usr/local/lib/php:/tmp) in /
home/gcortex/public_html/shine/includes/class.s3.php

In the includes/class.s3.php, I can override the value of $_pathToCurl
to get around this.

It appears though that shell exec of openssl in version-new.php is
silently failing - presumably for the same reason.

I can branch the code and work around this - are there other
suggestions (php.ini or others) to work around this?

-jeff

Tyler Hall

unread,
Jan 8, 2010, 2:30:38 PM1/8/10
to shin...@googlegroups.com
Holy crap.

So here's the thing. I wrote a bunch of PHP classes for dealing with
Amazon web services (like S3) about three years ago. At the time, I
needed them to be compatible with PHP4, so the code was pretty crappy.

A year or so ago I rewrote them to take advantage of PHP5 and its
native curl extension, so the script wouldn't have to shell out to the
command line any more.

It looks like when I was piecing together Shine, I somehow grabbed the
old PHP4 version of the S3 class. I can't believe I didn't notice it
until you pointed out what it was doing. I'll get it replaced with the
new one asap.

The openssl shell exec is going to have the same problems until I can
rewrite it to use PHP's extension. Not sure how difficult that'll be,
but I'll take a look into it.

Tyler

Tyler Hall

unread,
Jan 11, 2010, 11:47:34 PM1/11/10
to Shine
I just committed a fix that updates the Amazon S3 class to the newer
version which uses PHP's native CURL extension rather than shelling
everything out through the command line.

Tyler

Reply all
Reply to author
Forward
0 new messages