Error with curl since upgrade

Status
Not open for further replies.

placege2

New Member
Messages
11
Reaction score
0
Points
1
Hi, I'm using curl to call one of my pages on the x10.mx site in a PHP scheduler but since the recent upgrade/service the curl connection is failing with curl error 56 - "Recv failure: Connection reset by peer"

Is there something that has not been completed in the setup when doing the latest upgrade?
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
Hi, where is the connection being made to?
 

fab_piatti61

New Member
Messages
8
Reaction score
0
Points
1
same problem to me! after last upgrade the curl connection falls ("Recv failure: Connection reset by peer") when I try to call a page of my site from another php page of the same folder... how to resolve? thanks
 

placege2

New Member
Messages
11
Reaction score
0
Points
1
Hi, where is the connection being made to?
To my registered site. I use it as a scheduler when going to a page it curls to another page on the same site. So in one file include 'mysite.x10.mx/skedge.php' would curl to mysite.x10.mx/repeat.php but only open this page once a day or once an hour type of thing.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi placege2,

Assuming you are using PHP's include() function, you must include files relatively rather than calling them from a separate location.

For example, instead of doing
Code:
include('http://mysite.x10.mx/skedge.php');
I would have to do
Code:
include('/skedge.php');

Thank you,
 

placege2

New Member
Messages
11
Reaction score
0
Points
1
Sorry my fault, I am doing the include through local file name so it is already include 'lib/skedge.php' that curls to mysite.x10.mx. The include is working, I can see output from skedge when I print the error code and message from curl. I did a test with skedge.php to curl example.com and it displayed the website perfectly. It's only when trying to connect to the server x10.mx that the trouble happens.
 

fab_piatti61

New Member
Messages
8
Reaction score
0
Points
1
I've the same problem when I call a
curl_exec()
with a .php page from the same folder... how can I resolve?
 

fab_piatti61

New Member
Messages
8
Reaction score
0
Points
1
same problem with file_get_contents($url) with $url that links to a file on the same server here on x10hosting

Warning: file_get_contents(MYURL): failed to open stream: HTTP request failed! in MYPHPFILE on line 7
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
can I ask why you need to CURL your own website?
 

fab_piatti61

New Member
Messages
8
Reaction score
0
Points
1
because I have I script of my friend I need to run... it is all just prepared and I called it until now, it worked perfectly...
 

placege2

New Member
Messages
11
Reaction score
0
Points
1
It's not the best solution but it has been working. I just do an include file instead of curl now.
 

fab_piatti61

New Member
Messages
8
Reaction score
0
Points
1
thanks, but I can't do an include instead of a curl because the php script isn't mine and it updates itself, I need the curl work like before... can x10 staff resolve this please?
my actual solution is to put the php script on another server and call it with curl (very bad solution)

no reply yet? how can I have a solution please?
up...
 
Last edited:
Status
Not open for further replies.
Top