HttpRequest not working in linux platform

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nsalam
Forum Newbie
Posts: 6
Joined: Mon May 05, 2008 6:15 am

HttpRequest not working in linux platform

Post 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 ?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: HttpRequest not working in linux platform

Post 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
nsalam
Forum Newbie
Posts: 6
Joined: Mon May 05, 2008 6:15 am

Re: HttpRequest not working in linux platform

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: HttpRequest not working in linux platform

Post 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
nsalam
Forum Newbie
Posts: 6
Joined: Mon May 05, 2008 6:15 am

Re: HttpRequest not working in linux platform

Post 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.
nowaydown1
Forum Contributor
Posts: 169
Joined: Sun Apr 27, 2008 1:22 am

Re: HttpRequest not working in linux platform

Post 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
nsalam
Forum Newbie
Posts: 6
Joined: Mon May 05, 2008 6:15 am

Re: HttpRequest not working in linux platform

Post by nsalam »

Finally got it working using curl.
http://us2.php.net/curl

Thanks,
Naba
Post Reply