I have an application that I need to be using a non-thread-safe(nts) version of php 8.0 being built on current RHEL. I have tried a few different ways of recompiling php including this one to no avail. Checking the php info page, It still says that thread safety is enabled. Does anyone know of a way to recompile PHP without thread safety? I have found many posts talking about enabling thread safety, but almost nothing on disabling it. Thank you in advance!
Related
sorry if I seem like an absolute beginner at these things. I wanted to get the PHP extension for GEOS. I already have PHP (though XAMPP) and GEOS installed. Now, trying out the instructions on GitHub, I soon realize that these are instructions for Linux. I've been googling instructions for getting PHP extensions in Windows, but I've learned that it's not quite simple. Based on what I've found I would either need to
Use Visual Studio (which I would have to download first)
Find a dll (there is none)
Recompile PHP with the extension (not sure if I said it right)
So I have two questions: firstly, which of these options are most suitable for getting just one extension? And secondly, regarding the recompiling option, would I have compile things from a different source, since I got PHP from XAMPP and it doesn't seem to have the option to install the components separately.
EDIT: I believe that my question is not the same as this one because the user here actually found relevant DLLs, and did not have to compile anything or use Visual Studio.
I have a web project that for compiling it I use a Non Thread Safe version of php,
but my customer have a Thread Safe version of php on his server and when run the
project, there's many errors on each pages.
the question is: how i can fix it without changing server?
can we run Non Thread Safe project on Thread Safe server?
i use ms iis but my customer using last version of xampp.
Just because it is "thread safe" doesn't mean threads are enabled. XAMPP uses the prefork MPM, which does not use multiple threads. Your errors may be due to something entirely different.
i solve the problem
because php error report on my system was off but on the server not
so i never see some miss programing such and I set it on and recheck errors and fix them
and with some part of code i put it off on pages so it done and fix
I have been trying for hours to fix this issue, I recently purchased IP.Nexus, an add-on to the Invision Power Board forum software(it is a shop front for the forum). There are two versions I may download, Zendguard locked, and Ioncube locked. I tried both, and I tried download the proper versions of both loaders. Little did I know that ioncube did not work on 64-bit computers, and soon after figured out that Zendguard does not work on PHP server with thread safety enabled!
Question is, how do I change the PHP version on wamp? I understand that they have add ons to downgrade or upgrade but I believe that all of them are thread-safety enabled. I want to continue using wamp since I don't know how to use a different webserver. Thanks a bunch!!
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.
When running PHP in CLI mode, most of the time (not always), the script will hang at the end of execution for about 5 seconds and then output this:
Error in my_thread_global_end(): 1 threads didn't exit
It doesn't seem to actually have any effect on the script itself.
Some web searches turned up blogs which suggest replacing the php_mysql.dll with a different version, however this has not solved the issue for me, and I suspect the info from those blogs is now out of date.
My setup:
PHP Version 5.2.4
Apache/2.2.4 (Win32)
Windows Vista Home Premium SP1
This is a known bug with some of the PHP 5.2.X version in the windows fast-cgi implementation
http://bugs.php.net/bug.php?id=41350&edit=1
I have encountered this bug before and downgrading my PHP install to 5.2.0 solved the problem.
There is no need to downgrade the entire PHP version, just replace the libmysql.dll from the PHP 5.2.1 release & things should be rolling :) Refer this link for more info.
Did you take a look at this resource? You may want to double check that you got a specific libmysql.dll (5.2.1) that is unaffected by this, and also to double check that you don't have any stray mysql libraries lying around that PHP could be picking up instead. Or, switch from FastCGI if that's an option for you.
For interests sake, the bug appears to be best detailed here. The general idea of the problem (from the mysql bug link) appears to be:
Whenever a new thread is created libmysql is told about that by Windows. It then
increases a thread counter and initializes some data. When libmysql is being unloaded
it checks whether all threads have finished, if not it tries to tell them "close now"
and gives them 5 seconds for that. In general this works in a nice way.