Link to home
Start Free TrialLog in
Avatar of thebuckst0p
thebuckst0pFlag for United States of America

asked on

Understanding PHP extensions

I'm a little confused about PHP extensions like Pear and PECL. There seem to be two types of extensions in general, those called with "extension=" statements in php.ini and included PHP files. In Windows the former seems to be DLL files, and in Linux SO files.
Here's the issue I encountered: I have a Windows server with the Pear php_http.dll extension loaded in php.ini. I recently set up a Linux server and it's missing the HTTP extension (which includes the http_redirect function that I need). So I spent hours trying to figure out how to install the equivalent of php_http.dll for Linux. I couldn't find php_http.so anywhere. I can run the shell command "pecl install pecl_http" and that compiles an HTTP.php file, which includes the function HTTP::redirect. So I'm using that now instead of http_redirect. But why are some compiled extensions and others php files? How do I get the equivalent of php_http.dll for Linux?
Any help in understanding this would be most appreciated. Thank you.
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thebuckst0p

ASKER

That's pretty cryptic. I'm accessing the server through an SSH client. I downloaded the tgz file with the "pear download http" command, copied it to my local pc, unzipped it, and copied the extracted folder back to the server. Then in the terminal I went to that folder and did "phpize", and got this response:

Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

I guess I'll just stick with the .php versions. I just wish the documentation on this were simpler, or compiled versions were downloadable.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial