View previous topic :: View next topic |
Author |
Message |
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Mon Apr 14, 2014 3:54 pm Post subject: mcrypt.so (PHP 5.4.16 package for Mac OS X) |
|
|
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 |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Apr 18, 2014 5:08 pm Post subject: |
|
|
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 |
|
|
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Fri Apr 18, 2014 8:53 pm Post subject: |
|
|
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 |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Apr 18, 2014 10:14 pm Post subject: |
|
|
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 |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Apr 18, 2014 11:13 pm Post subject: |
|
|
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 |
|
|
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Sat Apr 19, 2014 4:30 pm Post subject: |
|
|
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 |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Apr 19, 2014 5:06 pm Post subject: |
|
|
Make sure to change extension_dir directive to point to the location of the extension folder. |
|
Back to top |
|
|
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Sat Apr 19, 2014 5:29 pm Post subject: |
|
|
i guess dir is correct:
|
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Apr 19, 2014 6:03 pm Post subject: |
|
|
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 |
|
|
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Sat Apr 19, 2014 6:54 pm Post subject: |
|
|
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 |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Apr 19, 2014 8:50 pm Post subject: |
|
|
Everything looks okay. Did you try restarting Abyss after making the changes to php.ini? |
|
Back to top |
|
|
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Sun Apr 20, 2014 1:36 pm Post subject: |
|
|
Yes. Many times. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sun Apr 20, 2014 5:17 pm Post subject: |
|
|
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 |
|
|
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Mon Apr 21, 2014 3:41 pm Post subject: |
|
|
ok, i will wait. thank you. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Apr 22, 2014 12:58 am Post subject: |
|
|
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 |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Apr 23, 2014 11:52 pm Post subject: |
|
|
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 |
|
|
fehmi -
Joined: 14 Apr 2014 Posts: 8
|
Posted: Thu Apr 24, 2014 3:39 pm Post subject: |
|
|
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 |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri Apr 25, 2014 12:28 am Post subject: |
|
|
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 |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Fri Apr 25, 2014 11:43 am Post subject: |
|
|
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 |
|
|
|