PHP and CURL

Web hosting, FTP/database access, mirror services and hosted blogs
Post Reply
ercatli
Posts: 103
Joined: Thu Apr 13, 2006 9:14 am
Location: Sydney
Contact:

PHP and CURL

Post by ercatli » Tue Mar 02, 2010 9:18 pm

I have the Exetel free hosted webspace, and am learning to use PHP on it.

I have tried to run some PHP code with "CURL" calls in it, but it doesn't run. It's probably my lousy coding, but I read somewhere that some servers don't allow or support CURL. Can anyone tell me please what is the situation with Exetel?

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: PHP and CURL

Post by Dazzled » Tue Mar 02, 2010 9:50 pm

The difficulty with testing php code on the remote server is that the server (unlike your own machine) keeps error messages to itself, and you see nothing happen.

You might find handy the output from putting a file called phpinfo.php in your webspace (Use Permission 705). It need contain only the line

Code: Select all

<?php phpinfo(); ?> 
Navigate to it in the browser. The display lists all the features of the site, particularly the full file pathnames, the values of the php variables and the enabled features. See http://php.net/manual/en/function.phpinfo.php and http://php.net/manual/en/book.curl.php

Starcraftmazter
Posts: 23
Joined: Sun Jul 27, 2008 12:38 am
Location: Sydney

Re: PHP and CURL

Post by Starcraftmazter » Tue Mar 02, 2010 10:49 pm

Chuck this line at the top of the PHP file you are trying to access:

Code: Select all

error_reporting(E_ALL);
This will make the error clear.

I don't use the Exetel webspace myself, however if it turns out that it does not have curl installed, then PM me and I can hook you up with some that does.

SysAdmin

Re: PHP and CURL

Post by SysAdmin » Thu Mar 04, 2010 9:58 am

Starcraftmazter wrote:Chuck this line at the top of the PHP file you are trying to access:

Code: Select all

error_reporting(E_ALL);
This will make the error clear.

I don't use the Exetel webspace myself, however if it turns out that it does not have curl installed, then PM me and I can hook you up with some that does.
Or better yet, either post here or email hosting@exetel.com.au and make a request for it to be installed.

That said:

Code: Select all

ii  libcurl3      7.15.5-1etch3             Multi-protocol file transfer library
ii  php5-curl     5.2.0+dfsg-8+etch16       CURL module for php5
It is installed. Soon it shall be v5.2.6 with libcurl v7.18.2.

Andrew

Dazzled
Volunteer Site Admin
Posts: 6003
Joined: Mon Nov 13, 2006 1:16 pm
Location: Sydney

Re: PHP and CURL

Post by Dazzled » Thu Mar 04, 2010 10:09 am

Presumably the OP has used phpinfo, to see:
Attachments
curl.png
curl.png (12.3 KiB) Viewed 1295 times

Post Reply