mcrypt isn't loading on MAC - php

I have manually installed PHP on my mac which is running lion. I installed mcrypt as well. It was working fine until few days ago it stopped working (didn't load). Most probably this happened after the latest software update.
Now I am trying to install mcrypt again. I tried everything I could and followed most of the tutorials online. No luck yet.
Here is what I have done.
downloaded libmcrypt
configured and installed it.
I am running php 5.4.7
I downloaded the source. went to mcrypt folder and phpize.
configured and installed.
Edited the php.ini to add extension = mycrypt.so. Even tried putting the path in extension_dir.
restarted Apache. still doesn't work.
I have now spent days figuring this out but still cant work it out. I am in point where I am thinking of doing a clean install :(
These are the few things I have noticed that are wierd and may be the reason of problem.
When I do phpize this is what I get
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
but when it finishes installing it gives me path to
/usr/lib/php/extensions/no-debug-non-zts-20100525/
Any help will be really appreciated. If you need any help I will provide any necessary details.

Related

Install gRPC on centOS / Plesk

I'm stuck for a couple of hours now, I want to use Cloud Fire store on domains on my Plesk Server, but I can't get it to work.
I followed the steps from https://cloud.google.com/php/grpc
and a lot of other tutorials, but on all I get errors.
I managed to update the OS PHP version of CentOS, but still no luck.
What I want is that PHP Version 7.2.14 works with gRPC (I already added extension=grpc.so to the php.ini)
But there really isn't a any good documentation on Plesk and gRPC
What errors are you getting? It's during installing grpc.so or it's installed but the script can't load it?
Also, from the link you give, "CentOS/RHEL 6" is not supported.
In my case help this
Install Pecl PHP for CentOS https://stackoverflow.com/a/31558558/1932494
Then run: pecl install grpc

how can i get libmemcached for windows?

i'm trying to install the memcached extension in my windows localhost: wamp 64 php 5.5.12. see memcached at: https://pecl.php.net/package/memcached (notice that This extension uses libmemcached library)
unfortunately there is not a ready dll for this extension.. so i need to produce the dll myself.
i followed this guide in order to produce a working dll: https://wiki.php.net/internals/windows/stepbystepbuild
(im using Microsoft Visual Studio 2012 to compile)
i get an error when i try to configure (just before the build).
here is the print screen error that i get:
unfortunately the memcached extension is depended on 'libmemcached library' which do not officially support windows environment.
i came across this git project.
https://github.com/moteus/libmemcached-win32
im not sure what can i do with that source file and how can that help me. it seems that this git project is a libmemcached ready to work in windows (for all i know)
do this github project is a ready libmemcached library (if so where is the memcached.lib?)? or how can i produce from this page a memcached.lib file? (or anything that will help me make a working dll for the memcached extension)
would deeply appreciate any help on this.
thanks!!
There is vs2015 lib+dlls 1.0.18 available:
https://github.com/yshurik/libmemcached-win/releases/tag/1.0.18
Also vcxproj is availbale so you can compile it for other versions of msvc.
win32 branch on launchpad is extremely old and has different api from 1.0 version.
Apparently there is a libmemcached for windows. From the memcached website:
https://code.launchpad.net/~mattn/libmemcached/libmemcached-win32

Compiling php extensions for MAMP

I need to install a couple of PHP extensions, like memcache and geoip, on MAMP 3.5, for PHP 5.6.10.
What I'm doing is to run phpize:
/Applications/MAMP/bin/php/php5.6.10/bin/phpize
Which outputs:
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
Then configure:
/configure --with-php-config=/Applications/MAMP/bin/php/php5.6.10/bin/php-config
And, afterwards, try to build with make. This is where I get this error:
/Applications/MAMP/bin/php/php5.6.10/include/php/Zend/zend.h:51:11: fatal error: 'zend_config.h' file not found
I downloaded the content of the include/php folder from php.net, version 5.6.10 (found here).
I feel I'm closer now to solving this problem, but I'm at loss with this error. What am I doing wrong, so that apparently the freshly downloaded php from php.net is missing files?
Thank you.
I ended up using pecl instead of manually compiling the extensions.
The headers missing on the make step were I didn't run ./configure on the php folder - I came across this step by chance, really.
Afterwards, all I had to do was run:
sudo /Applications/MAMP/bin/php/php5.6.10/bin/pecl install memcache
And everything was running on wheels.
Before trying pecl, I tried to run make as I was doing on my post, and the extension compiled successfully, but I had versions mismatch between the php and the extension. I had previously tried pecl without success, but I don't really know what changed in my configuration since I last tried.
Anyway, I wrote a gist with all my steps to get this working, in case anyone has the same problem and is a complete beginner on this subject like I am.

Many DLLs missing when installing composer (windows)

I'm trying to install composer on my computer but I get many errors about missing some DLLs. I've downloaded some of them but I cannot find any website, where to download libsybcomn64.dll. However, I don't think downloading each DLL from internet is a good solution.
I'm using Windows 7 x64 and have Apache 2 and PHP 5.6.9 installed - simple PHP works.
I've solved it myself.
And I'm really stupid. Problem was that when installing PHP I uncommented all extensions in php.ini - I thought the more there is, better. So I reset that whole file and uncommented only the necessary - php_pdo_mysql.dll and php_openssl.dll. Now it works.
Hope this will be helpful for someone...

OSX 10.9 xdebug wrong phpize

Quick background.
Running OSX Mavericks.
Want to run xdebug in NetBeans
Pear runs okay
xdebug stopped running after OSX upgrade. Tried to reinstall. During the install I get:
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
But in phpinfo:
PHP API 20121113
PHP Extension 20121212
Zend Extension 220121212
Best thing I can figure out (after hours of trawling through similar issues) is to make sure I am using the correct version of phpize.
which phpize returns:
/Applications/MAMP/bin/php/php5.5.3/bin/phpize
whereis phpize returns:
/usr/bin/phpize
My question is in two parts:
Is the different PHP API Version likely to stop xdebug from running and; how can I make sure that I am using the correct version of phpize?
A wrong API makes Xdebug to not even load, so yes, that is a problem.
To use the correct one, you will need to figure out which php binary you use in the first place. It is likely that if you use MAMP's php binary, its in the same directory as the phpize you need to use. The same for /usr/bin/phpize, which should match /usr/bin/php's API numbers. phpinfo() output might give you hints as to which PHP binary is being used.

Categories