Jump to content

Installing PERL and PECL Extensions


iwato

Recommended Posts

BACKGROUND: A long time ago I attempted to install the HTTP extension and run it with PHP5.3. As I failed, I moved on and did something else. Well, I am back with significant more progress, but have still not been entirely successful.I have gotten the PERL installation package to download the HTTP extension into my computer. This was somewhat of a feat, because my PHP interface goes through a rather circuitous route created by MAMP Pro, and because I am still a novice to the use of terminal commands.At first glance (see code results below) my failure appeared to be one of path.

Build process completed successfullyInstalling '/usr/include/php/ext/http/missing.h'ERROR: failed to mkdir /usr/include/php/ext/http

Understanding from the above that my PHP call to the mkdir() function failed I decided to make a search for the downloaded extension and found it in a very unexpected place -- namely, a folder called Uninstalled Extensions in my MAMP folder. There the extension appeared as a tar-package called pecl_http-1.7.0.tar. I was further surprised when I investigated the package's contents and found not one, but two items:package.xml and pecl_http-1.7.0. To my further surprise I discovered that pecl_http-1.7.0 is a folder filled with a whole host of other items. I was expecting an executable program.Now, something tells me that I should put the folder item called pecl_http-1.7.0 into my PHP library's extension folder, but I have hesitated, because I have not a clue as to what I should do with the item called package.xml.Please advise.Roddy

Link to comment
Share on other sites

what's in it? Is it is some sort of configuration file?
The folder's contents appears to be the HTTP extension library.Roddy
Link to comment
Share on other sites

The folder's contents appears to be the HTTP extension library.Roddy
uh... I meant package.xml. Wasn't that what you were asking about at the end of your post?
Link to comment
Share on other sites

uh... I meant package.xml. Wasn't that what you were asking about at the end of your post?
The xml file appears to be some sort of index or table of contents that contains line after line of code similar to the following:
<contents>	 <dir name="/">			<file md5sum="3e557477934d690e9284000737f4835b" name="phpstr/phpstr.h" role="src" />			.			.			.		   <file md5sum="acec56890bb00b8e571fef868ddd13c5" name="http_exception_object.c" role="src" />	  </dir></contents>

My goal is to learn how to install successfully a PEAR/PECL extension in a MAMP system that uses the MAMP-Pro interface. MAMP-Pro appears to reorganize the file structure of the MAMP environment in such a way that it is poorly understood by the PEAR installer.Exploring the contents of the folder and file mentioned in my original post is not the purpose of my original post. My purpose is to learn how to install PEAR/PECL extensions in a MAMP-Pro environment. MAMP-Pro does not appear eager to help.Roddy

Link to comment
Share on other sites

The idea of the PECL executable is to not only download the extension, but also compile and configure it. Like the PEAR command, the PECL runs PHP with a specific set of instructions. Because of this, the PHP executable needs to have full privilages over everything it would use. So to solve the error, you should make sure PHP has full permissions on /usr/include/php/ext/.There's also an alternative way BTW... phpize, though I have absolutely no idea how that would work out.

Link to comment
Share on other sites

... you should make sure PHP has full permissions on /usr/include/php/ext/.
The directory /usr/include/php/ext/ does not exist on my system.As close as I can come to this is a folder called extensions that shares a folder called PEAR in another folder called php and believe me, it is quite a path even to get to there....MAMP/bin/php5.3/lib/php/PEAR...MAMP/bin/php5.3/lib/php/extentionsIt is also in the php folder where are found the PEAR.php, PEAR5.php, pearcmd, peclcmd, and System.php files.Roddy
Link to comment
Share on other sites

Blah... just give the PHP binary full permissions on everything :) .(Have I told you how much I hate the UNIX permission system? I think I have... Along with the scattered and/or absent documentation, those are my biggest beefs with UNIX as a whole)

Link to comment
Share on other sites

Blah... just give the PHP binary full permissions on everything :) .
OK, I will try this should the people at appsolute absolutely fail to provide me with the counsel that I have requested still another time.Roddy
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...