Can someone compile PHP runkit DLL extension for me? - php

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.

Related

How do I choose between thread-safe and not thread-safe PHP?

I am developing a Laravel 9.x app in Windows 10. My current version of PHP is PHP 8.1.5 (cli) (built: Apr 12 2022 17:38:57) (ZTS Visual C++ 2019 x64). Is this a thread-safe or not-thread-safe version? How can I tell? When should I prefer a thread-safe over a not-thread-safe version?
I've tried researching this issue here on StackOverflow but the questions/answers I see all seem to be a decade or more old - like this - and I strongly suspect that I might get a different answer if I asked the question today simply because the technology has changed in the intervening years. Is that a reasonable assumption? (At the very least, my current version of PHP evidently uses a newer compiler, VC++ 2019, rather than VC6 or VC9.)
I have no idea yet what my production environment is going to be or even IF the app I'm developing will ever go to a production environment since it's just an app I'm writing to (re-)learn Laravel. I may put it in production as a demonstration of a working Laravel app when the time comes but whether it will be on a hosting service or Netlify or something else, I just don't know at this point.
Just to give you some context, this issue only came up because I am trying to learn how to step through my Laravel source code to debug problems and this apparently requires me to add XDebug to XAMPP. The instructions I found for installing XDebug point me to here and recommend that I download the Windows binaries for my version of PHP. There are no binaries of 8.1.5 so I don't know if one of the binaries for 8.1 would work or if I'd be better to use 8.1 thread-safe or 8.1 not-thread-safe. If it would be better to upgrade my PHP first to 8.2, I still don't know if thread-safe or not-thread-safe is a better choice.
Can someone enlighten me on these matters?
Is this a thread-safe or not-thread-safe version? How can I tell?
You can use the good old phpinfo() function and lookup for the Thread Safety column.
If you have your PHP setup in PATH environment, you can even get it via CLI using a quick command php -i | grep Thread
When should I prefer a thread-safe over a not-thread-safe version?
As per PHP official documentation
If you choose to run PHP as a CGI binary, then you won't need thread safety, because the binary is invoked at each request. For multithreaded webservers, such as IIS5 and IIS6, you should use the threaded version of PHP.
I have no idea yet what my production environment is going to be ...
Generally, there is no difference on TS or NTS code execution. It's more towards the webserver.
If I am not mistaken, by default, XAMPP uses Apache Handler, so it will likely be a thread safe build. And yes, the Xdebug binary for PHP8.1 will just work fine.
Technically, NTS should be slightly faster because it doesn't need to cater for thread safety.
Personally, I think it doesn't matter, unless you want to spend slightly more time to tinker around the webserver switching to FastCGI or PHP-FPM, since you are still in development phase, I think stick to the default setup and focusing on getting it up is more efficient.

Unable to install imagick

I found tons of instructions, how to install Imagick on windows. Here is a very good and detaild explanation.
I am following the instructions. So, first, download the latest DLL from PECL. Copy the php_imagick.dll to the extension dir, copy the _CORE* libraries to PHP root directory, and it shows me the following version: ImageMagick 6.9.1-2 Q16 x64 2015-04-14
Wow, great, now I have nothing to do just install this exe.
Oh, wait...
There are no installer like this. And the problems starts here. Of course, I've tried to download and install the latest installer, installed it, set the environment variables, but it always says something about entry points.
I don't know why Imagick guys removes the releases from their ftp, I think this is a very bad behaviour. Can not access from archive too.
So I am unable to installing the Imagick.
Can anybody help me with this version of installer, or give me a step-by-step instruction, how to install this Imagick for Windows 10, 64bit for Apache 2.4.2 64bit, and PHP 5.6.5 64bit?
I tried the 32bit version, but with that, the phpinfo() does not show me anything.
EDIT: There is an alternative download location here.
I started a thread on the Imagick forum, and now I don't know, should I cry or should I laugh...
The answer for my question was this:
Hmm... it seems we don't build our libraries with 'deprecated' methods. I will see if we can change this before the next release so DrawAllocateWand will not suddenly be gone.
I tell to the guy, ok, it's a cool thing, but I've just reinstall my machine from the scratch, so, I got this error:
Procedure entry point (DrawAllocateWand) not found in DLL
or something similar, I translated it.
So, please tell me, where can I download the ImageMagick 6.9.1-2 Q16 x64 2015-04-14 binaries, because it seems, that php_imagick.dll need this, and I should work...
The answer was:
We don't keep an archive of old binary version of ImageMagick. You could however decide to build IM from source.
CONCLUSION
If you ever had a working installer for windows for Apache, PHP, Imagick, you should always keep these in the cloud for yourself. MHO: I really hate these things. I know, most of us is working on linux boxes, but our company policy is to use OS what admin says. So I need to use windows. Now I should suck for a while, to download and install a cygwin with compilers, compile the Imagick somehow, and set all the environments variables, because some developers do not use a version controller, or maybe the sotrage is too expensive for them to store old binaries... I can not imagene these options.
ImageMagick is available here:
http://windows.php.net/downloads/pecl/deps/
Imagick, that has been compiled against that version of ImageMagick is available here
http://windows.php.net/downloads/pecl/releases/imagick/3.4.0rc5/
Downloading random versions of libraries from other places is not guaranteed to work.

php_memcache.dll for 64 bit wampserver with either php 5.3.13 or 5.4.3

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

APC FOR PHP 5.3.8

I've been trying to install apc . I've added the .dll file to the extenstions directory ( so far i'm running the application on xamppm, apache) . I've also updated the php.ini as well.
The problem comes up when I restart the apache and then the next warning appears :
php startup : unable to load dynamic library c:/xampp/php/ext/php_apc.dll
I think the problem might be the fact that the php version I employ is 5.3.8 .
I've been looking for apc download for php 5.3.8 and I hadn't found any,
What am I able to do in order to solve this problem ?
Any suggestion will be helpful , thanks in advance
I had the same problem and it was because i was using x64 version of WAMP server so i downloaded the x64 version of php_apc.dll file and it worked.
Here is a link
In the following site you'll be able to find the extension compiled for Windows in a variety of "flavours" ready to download:
http://dev.freshsite.pl/php-accelerators/apc.html
Hint: you mention you use XAMPP, which as far as I can tell bundles PHP compiled with VC9 and thread safe, so you are probably looking for this one if you use Windows 7 or this one for other windows versions.
Side note: As somebody who has been using Apache and PHP under win heavily, I can only recommend to switch to Linux as soon as you can: PHP extensions (among many other things) are way much less of a headache there.

PHP Inclued for Windows?

Is there a .dll version of the inclued extension for PHP?
The manual's link for Inclued on PECL4WIN doesn't help. I don't have a compiler to build my own DLL.
NOTE: The spelling "inclued" is correct!
Edit: I don't have a compiler, but do know someone with one... that's really a last resort though.
As best as I can tell, the Windows version doesn't exist anymore. Maybe whoever was maintaining it before had to stop for some reason.
I wonder what it takes to compile a PECL extension under Windows.
Edit
Here's some info on compiling a different PECL extension on Windows. You may be able to extrapolate to the inclued extension.
Edit
WAMP Server comes with PECL & PEAR. I can actually run the command pecl install inclued-alpha from the Windows command-line and it goes out and tries to grab the inclued extension from the PECL site.
Unfortunately it dies when it unpacks the .tgz file and tries to compile it
ERROR: The DSP inclued.dsp does not exist.
Which version of PHP are you running? I know someone that can compile you a version.
update
Alright, got this compiled - I've tested on my 5.2.6 build and it seems to work fine.
I've been told there may be problems using it in a threaded environment (e.g. Windows) but that's only a maybe. Also:
[13:10] <g0pz> the inclued dumpfiles will collide, because it uses PID # + increments
[13:11] <g0pz> but command line should work ok
[13:12] <g0pz> is the threaded apache version which'll have the same PID and well, a "possible" collision
So good luck with it :)
download
Poke me if you have any issues with inclued.
I'm just on the verge of putting out a release, I'll do a mkstemp() in windows instead of picking the PID + count.
Hopefully also with a gensvg.php which'll render the di-graph in-browser with pear::Image::GraphViz.
Isn't this their DLL download site? http://pecl4win.php.net/list_dlls.php
Unless I'm off on my browsing of the site?
Is this the page you are looking for?
http://pecl4win.php.net/list_dlls.php
..edit: (man, we are fast. I swear these two duplicate answers were posted simultaniously)
The official PHP for Windows site says:
PECL For Windows
PECL extensions for Windows is being worked on. The interface on the
pecl website will most likely be updated to offer Windows DLL download
right from that website. In the meantime, some extensions can be found
here.
That "here" link leads to http://downloads.php.net/pierre/, where you will find, among the multitude of other extensions, builds of inclued for PHP 5.2 and 5.3, VC6 and VC9, thread-safe and non-thread-safe. The one matching my version of PHP seems to be working.

Categories