Welcome Guest, Not a member yet? Register   Sign In
CURL Proxy and GoDaddy? Yeah I know... Though it works outside CI
#1

[eluser]amites[/eluser]
Hello,

I have a question I'm hoping has an answer,

why would
Code:
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);

create 2 errors
Code:
Message: Use of undefined constant CURLOPT_PROXYTYPE - assumed 'CURLOPT_PROXYTYPE'
Code:
Message: Use of undefined constant CURLPROXY_HTTP - assumed 'CURLPROXY_HTTP'

it does this on GoDaddy Linux hosting running PHP 4.2, it does not do this on my localhost

the tricky part is that this does not happen while setting CURLOPT_PROXYTYPE in the buggy procedural code I am attempting to replace

any ideas? Please...
#2

[eluser]Colin Williams[/eluser]
Well, you get two errors because you try to use two undeclared constants, CURLOPT_PROXYTYPE and CURLPROXY_HTTP.

And building a PHP app on GoDaddy is like building a skyscraper with tools from Black & Decker... it ain't gonna happen.
#3

[eluser]redarc[/eluser]
Not really a CI topic.

That said, check that PHP has curl installed (phpinfo()) Last time I looked at their shared hosting, not too long ago, a lot of modules were missing. To get these, their solution is for you to upgrade to their "version" of VPS.
#4

[eluser]Pascal Kriete[/eluser]
CURLOPT_PROXYTYPE was added in PHP 5 (curl 7.10), along with the two possible values (CURLPROXY_HTTP, CURLPROXY_SOCKS5) [docs]. You will need to upgrade your version of PHP.
#5

[eluser]Phil Sturgeon[/eluser]
Not an answer to the question but if you are doing lots of work with cURL you could be a great candidate to help test this cURL Library I knocked up yesterday.

Let me know if it could be more useful.
#6

[eluser]amites[/eluser]
I suppose I should have been more specific,

that same cURL declaration works outside of CI on GoDaddy, it was originally copied directly from a GoDaddy tech (I feel sorry for those guys)

when I run that same code in straight PHP, works fine, when I run that code on my local computer (PHP 5) works fine, I'm wondering why it would trigger an error in CI when it works outside of CI??
#7

[eluser]Chris Bandy[/eluser]
CI has errors turned up maybe?




Theme © iAndrew 2016 - Forum software by © MyBB