Cannot load Xdebug - it was built with configuration API220090626,TS,VC9, whereas running engine is API220090626,NTS,VC9 and i seem to have had this problem without quite noticing until it comes to debugging php scripts and please can someone help me as i havent really tried to manage debug a php script scuessfully?
If you can load page with phpinfo() on it, look at the Architecture row. If its value is x86 you need the 32 bit version: PHP 5.4 VC9 TS (32 bit). If Architecture is x64, you need the 64 bit version: PHP 5.4 VC9 TS (64 bit).
It sounds like you're using PHP for Windows. There's two DLLs for xdebug since PHP comes in two flavors for Windows: Thread Safe(TS) and Non-Thread Safe(NTS). You also have to marry builds up (5.4 vs 5.5, 32 bit vs 64 bit)
Head over to the Xdebug download page and get the proper DLL.
Related
I am to work on a project currently running on php 5.3.
The only php exe I found for windows is : php-5.3.29-Win32-VC9-x86.zip.
No x64 version found.
So far, my firt try at installing locally (wampserver 64bits) has failed : Apache will not start with php5_module pointing to the "php-5.3.29-Win32-VC9-x86.zip" executable (dll).
Can anyone confirm php 5.3 can actually run on a 64bits pc ?
If confirmed as feasable, can you please help me ? (which download to use, should I use IIS/fastCGI instead, etc. ?)
Thanks in advance for any help,
Paco
I know this is not really the answer you want, but you REALLY should not use 5.3 .. It hasn't gotten any security patches in 3 years. If you project is not compatible with 7.1, you should at least be using 5.6.
You can get that here: http://windows.php.net/download#php-5.6
Try XAMPP. It runs on both x64 and x32 bit Windows PC
https://www.apachefriends.org/download.html
The answer is of course yes.
PHP on IIS goes through FastCGI, so that even on 64 bit Windows the IIS components are 64 bit, php-cgi.exe as FastCGI client can run as 32 bit. You should try to run 32 bit of PHP 5.x as based on observation the corresponding 64 bit builds (if available) are not as stable as it should.
Like others commented, you really should upgrade now to 7.x (even 5.6 reaches end of life in 2018), or never.
PHP 5.5 includes zend opcache by default, which basically means that almost nobody will use APC.
But what to use instead of the user data cache part of APC (apc_store & apc_fetch & similar)?
One use case where I really like to use APC user data cache are "versions" of static assets (javascript, css..). Whenever I reference static file, I add hash of its content into the url (e.g. <script src=/script.js> will became <script src=/script.js?v=hash>), so that browser always uses current version and can cache it permanently.
I can imagine using redis or memcache to store the hashes of static files, but it seems silly to ask another process over network or socket just to get a hash of file content. APC user data cache (which is in shared memory and accessing it is almost as fast as accesing php variable) seems just the right thing to use for such data.
So the question is: what to use in php 5.5 to cache small bits of data instead of APC?
Starting from PHP 5.5 the APC user data storage is packaged separately as PECL APCu.
Source code: http://pecl.php.net/package/APCu
MacOS homebrew package is php55-apcu (brew install php55-apcu)
Debian/ubuntu is called php5-apcu (apt-get install php5-apcu)
Fedora/RedHat is called php-pecl-apcu (yum install php-pecl-apcu)
Windows - use precompiled APCu dll - follow instructions provided in the answer below.
This allows you to use all user cache functions, such as apc_store(). It will also return true for extension_loaded('apc') - this means that all libraries depending on APC will work similarly to PHP 5.4.
I recently dealt with this question after upgrading from php 5.3 to php 5.5 beta 2.
I looked at Memcache and Redis. Depending upon whom you ask, the performance between the two is approximately the same. Some claim that Redis is marginally faster. However, Redis has a lot more features than Memcahe so I decided to go with Redis.
For a PHP client, I chose Phpredis over Predis. Phpredis is a C extension whereas Predis a pure PHP implementation. Thus, Phpredis is generally faster.
I'm primarily using Redis to cache and retrieve serialized objects. I started the project I'm currently developing in PHP 5.3 with APC. I'm continuing to develop the project with php 5.5 and Redis. While I don't have benchmark statistics, I can tell you that the app "feels" faster. This is likely due to performance enhancements in php 5.5 as opposed to APC user cache verses Redis. Either way, I'm happy with my choice.
I hope that helps. Good luck and happy hacking :-)
Nothing more to say. You got the correct answer already. I guess I can provide you with a link to tutorial to how to download and install APCu on XAMPP on Windows for php 5.5 and 5.6:
Link do download APCu for php build from 5.3 and higher:
download APCu different versions
Installation tutorial: installation instructions (The newest version should be on the very bottom of the file list - use this one)
Also bear in mind that you will have two to choose from few options like 64 or 84 version as well as nts or ts and vc9 or vc11 (it can be different in your case) and of course the correct PHP version (in my case that would be PHP 5.6 for my xampp).
EXAMPLE:
if you want to pick right you have to run phpinfo() first and check for those parameters:
Zend Extension Build and Architecture
In my case that would be:
[Zend Extension Build:] API220131226,TS,VC11
[Architecture:] x86
That mean that in my case I would have to choose ACLu wchich contain
in file name those parameters 5.6, TS, VC11, 86
file name to download: php_apcu-4.0.7-5.6-ts-vc11-x86.zip
Hope that clear things up for you.
Some aditional explanations on different PHP builds:
difference ts vs nts:
TS refers to multithread capable builds. NTS refers to single thread only builds. Use case for TS binaries involves interaction with a multithreaded SAPI and PHP loaded as a module into a web server. For NTS binaries the widespread use case is interaction with a web server through the FastCGI protocol, utilizing no multithreading (but also for example CLI).
difference vc9 vs vc11 vs vc14:
More recent versions of PHP are built with VC9, VC11 or VC14 (Visual Studio 2008, 2012 or 2015 compiler respectively) and include improvements in performance and stability.
The VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed
The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed
The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
difference 86 vs 64:
The x64 builds of PHP for Windows should be considered experimental, and do not yet provide 64-bit integer or large file support.
Take a look at the XCache opcode cacher, from the authors of lighttpd. It supports both php 5.5 and user data cache: http://xcache.lighttpd.net/wiki/XcacheApi
I didn't try it my self (still using APC and php 5.4).
Morning all,
Day 2 - I knew this was going to get sticky...
Windows 7 Professional 64bit
IIS 7.5
PHP 5.3.19 (as suggested/installed by Web Platform Installer)
All working fine.
ImageMagick 6.8.2.2 2013-01-28 Q16 - 32bit version. (64bit version tried yesterday but couldn't get php_imagick.dll working)
Working
php_imagick.dll:
PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\v5.3\ext\php_imagick.dll' - The specified module could not be found. in Unknown on line 0
Does anyone have any experience of this?
Do I need a 64bit version of PHP?
Should I be aiming at a newer or older PHP version?
How do I find out if my the version of PHP (installed by WPI) is 32 or 64bit?
Is it best to stick to 32bit when using Win7 64 or throw caution to the wind and use all 64bit versions?
I was assured that the days of incompatibility were over when I opted to upgrade to 64bit windows. I'm not young, but I'm still foolish, obviously...
My plan today is to run through every possible combination, including dropping IIS and using Apache. This will be a mammoth task, but I've got no other real options. Anything I find I will post here for future generations.
Thanks for any comments/help/observations.
Steve
OK, I was hoping to have something more comprehensive than this, but my fairly exhaustive investigations points to the following:
ImageMagick-x.x.x-x-Qx-x64-dll isn't compatible with x64 PHP Dlls.
There are sketching reports of x64 builds working, but for every report of a working installation, there are 10 that don't work. There are some admirable efforts to document this, but the chances are, it isn't going to work.
I've tried Nginx(x64), Apache(x64) and IIS servers, using PHP 5.3(x64) and 5.4(x64) TS and NTS.
I always get the "%1" or the "module not found" issue.
The answer is to steer clear of x64 binaries. Windows 7 x64 is fine, but don't use any other x64 components.
I'm interested in any other anecdotes, but I seriously doubt I would spend any more time on this. Given the relative hostility to Windows from the PHP, Apache and ImageMagick camps, a fix is likely to come from elsewhere.
Okay, so far ive been googeling and trying to find a solution for over 6 hours. normally i dont post questions because i feel the answer should be findable, but here goes nothing.
I need to work with PHP code that has implemented the memcache class. I use wampserver 2.2 as 64 bit install, with apache 2.2.2, php 5.4.3 (installed 5.3.13 too, to see if i could fix it in that version) and mysql 5.5.24
i have run the memcache service with both the memcached-win64-1.4.4-14.zip link and the memcached-1.2.6-win32-bin.zip link
I am now at a point where the feedback from wampserver i get is the following when (re)starting the apache module -> mem_cache_module, using the answers from a similar thread on stackoverflow.com/questions/3894065/php-memcache-dll-vc6-x64), in combination with php 5.3.13 64 bit:
PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
This is a lot further than i got with the other options, most (or all) results i can come up with seem to redirect to either a 32 bit dll (which i cant use since my wampserver is 64 bit) or with the wrong php version or api version (compilation date?) .. i do not think i am able to compile my own library to solve this.
I have added *extension=php_memcache.dll* to both php.ini files for both php versions and the dll files have been placed into the correct php/php5.x.x/ext/ folders of the wamp server
my assumption so far is that i need the php_memcache.dll compilated for 64 bit (x64) for php 5.3.13 on the 25th of may, 2010. That or i need to install a php version matching the binairy compiled on the 26th of june, 2009.
Do any of you have a soltion to my specific dillemma? Any help will be greatly appriciated.
I tried all dlls and none worked but suddenly the one given in comment by falcontoast http://www.mediafire.com/?8d3vd26z3fg6bf1 did work.
Will be glad if it works for someone :).
One must check architecture of the phpversion from phpinfo() and must use corresponding dll file. Also the version for memcached service should be of same type.
Try following steps that might work for you. Yes it did work for me when I almost gave up.
1 - Close all memcached services if any already running.
2 - get this service memcached-win64-1.4.4-14(find it) and install it and then start.(the ways to install are already given out there).
3 - get the dll file in comment by falcontoast and put that in extension(ext) folder.
4 - do the changes in php.ini file.
5 - restart the wamp server(probably exit it and then again start it).
If everything is done properly, then the program given here https://commaster.net/content/installing-memcached-windows should work fine.
Basically you need Memcache OR Memcached Library that match your PHP Executable. When I say match I'm not speaking of date but of code. The old PHP won't support new Memcache and vice-versa.
You can try to compile a special one just for your version of PHP (I tried once with other libraries it's not fun). Or you can find a version of PHP that would work with a version of Memcache but this new PHP will also need to work with your version of Apache...
After years of playing with that I just gave up and just used a unix system.
PS: Now that I think about it PHP already come with a correct version of Memcache... So your error may be just that you're using "new Memcached();" instead of "new Memcache();"
Thank you zzarbi!! Freaking finally, I have tried all possible dll's out there and the one you provided finally worked, all others gave Invalid Win32 application.
My setup is Wamp 64 bit with Apache : 2.4.4 MySQL : 5.6.12 PHP : 5.4.12 on Windows 8 64bit
I give up. I've asked this question some time ago but I'm again into that issue. I'm still stuck with compilation errors / missing files / other stuff that I can't / don't have time to fix. Don't get me wrong - I've compiled it several times, but none of the DLL files I've got worked. I use WAMPServer 2.1e [Apache 2.2.17, PHP 5.3.5] - after enabling php_runkit it does not start. Even already compiled DLLs from the Internet haven't worked. Another time Windows seems to be simply against me.
Now as a programmer I feel really, really lame to ask you the following: can someone compile PHP runkit DLL extension for me or point me to the WORKING one? Please test if it works and provide your WAMP stack configuration, so I can adjust mine.
You would be my hero.
I compiled Zenovich's fork for 5.3, no ZTS, VS9, commit f8daf39 with trivial changes in order to build in Visual Studio.
Unfortunately, the ZTS version seems to broken and did not compile. Its problems would require some effort to fix. So you must run PHP as a CGI binary, not as an Apache module.
Artefacto's binaries didn't work correctly for me so I compiled the newest runkit for PHP 5.3, 5.4 and 5.5 (both TS and NTS versions). You can grab it here - https://github.com/Crack/runkit-windows.
PHP 5.3 and 5.4 modules are compiled with VC9, 5.5 with VC11 so they work with official PHP binaries.