Page 1 of 1

HttpRequest not working in linux platform

Posted: Thu May 29, 2008 1:54 pm
by nsalam
I have a php code which uses the class HttpRequest and it works well and fine in windows env, but when i use the same code in linux platform, it says "Class HttpRequest not found...".
I have added php_http.dll in the ext folder and have updated the php.ini folder also.
Is there something i am missing out or is it a different lib file for linux ?

Re: HttpRequest not working in linux platform

Posted: Thu May 29, 2008 2:44 pm
by califdon
".dll" is strictly a Windows executable. It can't run in Linux. You need to install and configure php in Linux. Search Google for php install linux

Re: HttpRequest not working in linux platform

Posted: Fri May 30, 2008 1:37 am
by nsalam
Thanks for the reply.
My Linux env is a live environment.php is already installed here.
Although I assume that all the required classes come packaged with the linux php installer.Is there some other lib I need to put to use the HttpRequest class. Otherwise it would not have shown the error. Unable to find out where went wrong.

Thanks,
Naba

Re: HttpRequest not working in linux platform

Posted: Fri May 30, 2008 1:57 am
by califdon
nsalam wrote:Thanks for the reply.
My Linux env is a live environment.php is already installed here.
Although I assume that all the required classes come packaged with the linux php installer.Is there some other lib I need to put to use the HttpRequest class. Otherwise it would not have shown the error. Unable to find out where went wrong.

Thanks,
Naba
XMLHttpRequest is a Javascript object, not a PHP class. That's probably what's confusing you. It sounds like you're trying to call a PHP class with that name. There is none. The Javascript object XMLHttpRequest sends a request to a PHP script to perform the server side operations and return either a text string or XML or JSON (I've only used the simple text string) to the calling Javascript function, which then does whatever it needs to do within your HTML page. I hope that helps clarify it. Here is a good reference: http://developer.mozilla.org/en/docs/XMLHttpRequest

Re: HttpRequest not working in linux platform

Posted: Fri May 30, 2008 6:43 am
by nsalam
I was able to use HttpRequest, which is a php class <http://usphp.com/manual/en/function.htt ... t-send.php>, in my windows box.
But the same code is not working in linux platform which is also my live env.

Re: HttpRequest not working in linux platform

Posted: Fri May 30, 2008 10:48 am
by nowaydown1
Do you have the dependencies installed and the PECL package? There's some user contrib notes on the install page about what dependency packages to install on linux:

http://usphp.com/manual/en/http.install.php

Re: HttpRequest not working in linux platform

Posted: Mon Jun 02, 2008 2:12 am
by nsalam
Finally got it working using curl.
http://us2.php.net/curl

Thanks,
Naba