mcrypt.so (PHP 5.4.16 package for Mac OS X)

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


Joined: 14 Apr 2014
Posts: 8

PostPosted: Mon Apr 14, 2014 3:54 pm    Post subject: mcrypt.so (PHP 5.4.16 package for Mac OS X) Reply with quote

Hello,

I am trying to enable mcrypt.so but there is no entry for that in php.ini.
I added one and restart server but i am still taking "Call to undefined function mcrypt_encrypt()" error.

What can i do about that?


Last edited by fehmi on Sat Apr 19, 2014 4:46 pm; edited 2 times in total
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Apr 18, 2014 5:08 pm    Post subject: Reply with quote

Check and make sure that you first have the php_mcrypt.so (not dll) and make sure your pointing PHP in the right extensions folder. If you do not have that file, you will need to compile it.
Back to top View user's profile Send private message Visit poster's website
fehmi
-


Joined: 14 Apr 2014
Posts: 8

PostPosted: Fri Apr 18, 2014 8:53 pm    Post subject: Reply with quote

TRUSTAbyss wrote:
Check and make sure that you first have the php_mcrypt.so (not dll) and make sure your pointing PHP in the right extensions folder. If you do not have that file, you will need to compile it.


I downloaded this file from this link you provide: http://www.aprelium.com/data/PHP5416.dmg

And there is no file called php_mcrypt.so in "PHP5/lib/php/extensions/no-debug-non-zts-20100525".

Can i just download php_mcrypt.so from somewhere? I really don't know how can i compile that file. I event don't have any source code of php_mcrypt.so. Can you include this file to the PHP5416.dmg?

Thank you
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Apr 18, 2014 10:14 pm    Post subject: Reply with quote

You will need to download and install Xcode if you wish to compile your own extension. This package comes with the developer tools to develop for the Mac. PHP also comes with a tool called phpize that allows you to compile extensions. For your convenience, I'm going to compile this extension for you but I can't guarantee it will work on your machine. I will post back when it's ready.
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Apr 18, 2014 11:13 pm    Post subject: Reply with quote

Here's the compiled mcrypt PHP extension. It is named mcrypt.so and not php_mcrypt.so. Please let me know if it works and I might compile my own pre-configured package for you since the one Aprelium provides is quite old now.

Download can be found here.
http://www.trustabyss.com/files/mac/php/extensions/mcrypt/
Back to top View user's profile Send private message Visit poster's website
fehmi
-


Joined: 14 Apr 2014
Posts: 8

PostPosted: Sat Apr 19, 2014 4:30 pm    Post subject: Reply with quote

Sorry, I tried but no luck.

Here are the steps i follow.

1) Downloaded the file you compile and copy to the extensions folder. ("PHP5/lib/php/extensions/no-debug-non-zts-20100525")
2) Enabled in php.ini as "extension=mcrypt.so". (PHP5/lib/php.ini)
3) Server restarted.
4) Tried to run mcrypt_encrypt function in my php file.

Still getting "Call to undefined function mcrypt_encrypt()" error.

Thanks anyway
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sat Apr 19, 2014 5:06 pm    Post subject: Reply with quote

Make sure to change extension_dir directive to point to the location of the extension folder.
Back to top View user's profile Send private message Visit poster's website
fehmi
-


Joined: 14 Apr 2014
Posts: 8

PostPosted: Sat Apr 19, 2014 5:29 pm    Post subject: Reply with quote

i guess dir is correct:

Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sat Apr 19, 2014 6:03 pm    Post subject: Reply with quote

Try running this php script. Save it as phpinfo.php

Code:
<?php phpinfo(); ?>


Is it loading the correct php.ini file and are any other extensions loaded?
Back to top View user's profile Send private message Visit poster's website
fehmi
-


Joined: 14 Apr 2014
Posts: 8

PostPosted: Sat Apr 19, 2014 6:54 pm    Post subject: Reply with quote

Ok, here is the output of my php info:
http://fehmi.ozuseven.com/abyss/phpinfo.html

Other extensions (curl, openssl, exif etc.) loaded correctly and php.ini path is ok i guess.

Maybe mcrypt.so needs some other files?
Probably irrelevant but in the php.ini there are some entries like ;mcrypt.algorithms_dir and ;mcrypt.modes_dir.

And these are the active extensions in php.ini.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sat Apr 19, 2014 8:50 pm    Post subject: Reply with quote

Everything looks okay. Did you try restarting Abyss after making the changes to php.ini?
Back to top View user's profile Send private message Visit poster's website
fehmi
-


Joined: 14 Apr 2014
Posts: 8

PostPosted: Sun Apr 20, 2014 1:36 pm    Post subject: Reply with quote

Yes. Many times.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Apr 20, 2014 5:17 pm    Post subject: Reply with quote

I'm going to build a PHP5 package for you and have you try it later. Maybe the extension didn't compile properly. As far as I know, everything looks to be configured properly. I will have this pre-configured package available today or tomorrow.
Back to top View user's profile Send private message Visit poster's website
fehmi
-


Joined: 14 Apr 2014
Posts: 8

PostPosted: Mon Apr 21, 2014 3:41 pm    Post subject: Reply with quote

ok, i will wait. thank you.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Apr 22, 2014 12:58 am    Post subject: Reply with quote

I know I said that I would have it ready for you by today but I ran into some trouble compiling the libraries for jpeg and imap. Hopefully it will be ready by tomorrow. Hang in there.
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Apr 23, 2014 11:52 pm    Post subject: Reply with quote

Here's the pre-configured PHP that I promised. It doesn't have all the extensions that Aprelium's pre-configured package has, but it should be enough. The Mcrypt extension is built in and all shared extensions are set to load automatically. Please let me know if this works for you. Thanks.

PHP 5.4.27 pre-configured (put folder in /Applications)
http://www.trustabyss.com/files/mac/php/PHP5427_MacOSX.zip
Back to top View user's profile Send private message Visit poster's website
fehmi
-


Joined: 14 Apr 2014
Posts: 8

PostPosted: Thu Apr 24, 2014 3:39 pm    Post subject: Reply with quote

Thank you for that. I downloaded your pre-configured package and put /Applications folder and restarted the server.
I tried to run a php file. Unfortunately it takes 45 seconds to load and gives 500 server error.
Probably we missed something but i don't know what?

Why Aprelium Support is silent about this situtation?

Anyway, thanks again for your effort.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Fri Apr 25, 2014 12:28 am    Post subject: Reply with quote

Contact Aprelium's support and they should be able to help you further. I don't understand why it didn't work on your end. Check the fastcgi.log or cgi.log for more details and you might want to send the log files to Aprelium so that they can get an idea of what maybe going on.
Back to top View user's profile Send private message Visit poster's website
aprelium-support
-


Joined: 20 Feb 2009
Posts: 356

PostPosted: Fri Apr 25, 2014 11:43 am    Post subject: Reply with quote

We will release very soon a PHP 5.5.11 preconfigured package for Mac OS X. Building PHP for Mac OS X is always very difficult since the libraries bundled with each version of the OS change hence the issues that you may experience when using a binary linked on a version of Mac OS X different than yours: our solution is to build all the dependencies on our own and ship them with the PHP package.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Visit poster's website
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