adding special php-extensions

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
stoltenhoff
-


Joined: 11 Jan 2008
Posts: 27
Location: DK

PostPosted: Wed Apr 16, 2008 10:32 pm    Post subject: adding special php-extensions Reply with quote

hi,

i'm not very familar with installing php. so i've installed the ready-to-use package from abyssunderground – thanks!
it's working great. but two projects (e.g. magento and phpmyadmin) are missing special php-modules such as "mcrypt". what is the best way to add extensions like this (on a mac-machine)? do i have to switch to an new, full installation of php?

thank you and best regards,
jan
Back to top View user's profile Send private message Visit poster's website
phirez
-


Joined: 22 Apr 2006
Posts: 57

PostPosted: Thu Apr 17, 2008 2:39 am    Post subject: Reply with quote

I'm assuming you're using the pre-configured package from Aprelium....

To install a php extension from source, on a mac (requires Apple's Developer Tools):

Open Terminal and cd to the the extension's source directory and type...

Code:
/Applications/PHP5/bin/phpize


Next configure (to generate appropriate Makefiles)...

Code:
./configure --enable-[extension_name] --with-php-config=/Applications/PHP5/bin/php-config


Finally compile the source....

Code:
make
make install


Then open /Applications/PHP5/lib/php.ini in TextEdit and Add the line:
Code:
extension = [extension_name].so
Back to top View user's profile Send private message
stoltenhoff
-


Joined: 11 Jan 2008
Posts: 27
Location: DK

PostPosted: Thu Apr 17, 2008 12:17 pm    Post subject: Reply with quote

... thanks a lot, phirex!
this is very helpful, i'm going to follow your steps.

best regards,
jan
Back to top View user's profile Send private message Visit poster's website
stoltenhoff
-


Joined: 11 Jan 2008
Posts: 27
Location: DK

PostPosted: Thu Apr 17, 2008 6:13 pm    Post subject: Reply with quote

... ok, php plus terminal seems to be my personal hell.

i've installed the developer tools, downloaded the latest mcrypt-sources and i'm stopping just at the first line:

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


i have tested every possible location. further, there is no "config.m4" in the mcrypt-directory?

any idea? no pre-compiled extensions available?

greetings,
jan
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Apr 18, 2008 5:58 pm    Post subject: Reply with quote

stoltenhoff wrote:

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


You should use the cd command to move to the directory where the extension source is. For example:

Code:
cd /Users/jan/mcrypt-extension

_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
stoltenhoff
-


Joined: 11 Jan 2008
Posts: 27
Location: DK

PostPosted: Fri Apr 18, 2008 9:47 pm    Post subject: Reply with quote

but „yes“, i did it?!

aprelium wrote:

You should use the cd command to move to the directory where the extension source is. For example:

Code:
cd /Users/jan/mcrypt-extension
Back to top View user's profile Send private message Visit poster's website
phirez
-


Joined: 22 Apr 2006
Posts: 57

PostPosted: Sat Apr 19, 2008 4:00 pm    Post subject: Reply with quote

Some source directories include a package.xml for compatibility with PEAR, therefore the actual source directory is another level deep.

So for example

/Users/jan/mcrypt-ext/mcrypt-ext

run the following in the terminal to see the files and folders in the directory:
Code:
ls


If it still doesn't work, send me the link for the mcrypt extension.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group