PHP and Apache not compatible - php

Iam try to install (switch) PHP v5.1.6 with last version of Wamp, but a console message says: "This PHP version doesn't seem to be compatible with your actual Apache Version. Switch cancelled..."
How I can know the apache version compatible with the php version indicated (5.1.6)? What is the procedure to downgrade the version current version of apache?
THX

PHP5.1.anything will not run with Apache 2.4.anything.
If you look in the PHP5.1.6 folder you will NOT see a php5apache2_4.dll, which is PHP for that version compiled as a DLL with linkages to Apache 2.4, all you will see is a php5apache2_2.dll i.e. that version of PHP compiled with Apache 2.2 linkages. Its possible that version of PHP only has linkages for Apache 2.0, in which case it could be a real pain trying to get it working.
So you will also have to install a Apache2.2 or maybe Apache 2.0 that will run with it.
Both Apache and PHP will need to be compiled with the same compiler, probably VC6, as I think PHP5.1 was almost definitely compiled with VC6.
You may also find it useful to install another version of PHP like PHP5.3.29 maybe as this will run under Apache 2.2 and Apache 2.4, then when you are switching versions you can step backwards like so :-
While running Apache2.4 and PHP 5.4.16
Switch to PHP 5.3.29
Then switch to Apache 2.2.?
Then switch from PHP 5.3.29 to 5.1.6
This assumes PHP5.1.6 runs with Apache 2.2 and does not need the extra steps to ge back to Apache 2.0
You may also need other PHP's or Apache's I am not absolutely sure as its a long ways back from PHP5.4 to PHP5.1, but I hope this gives you a bit of an idea what might be involved.
Alternatively you could backup your current WAMPServer and uninstall it, and install an old version of WAMPServer 2.2a/b/c/d/e... You will have to try a few to see if they go back that far

Related

Wampserver gibin not a valid Win32 application with php 5.4

I replaced my 2.1 version of WampServer with the 3.1.4 64 bit version. Everything worked after the installation. But I need to have php 5.4 and that doesn't come with this version of WS. So I downloaded that version, made the changes to the various files as mentioned here and other places. But when I switch to 5.4 it doesn't start.
I ran the "Check State of Services" tool and it said this
State of services:
The service 'wampapache64' is NOT started EXIT error code:1066 Help
message for error code 1066 is: The service has returned a
service-specific error code.
The service 'wampmysqld64' is started
The service 'wampmariadb64' is started
The service 'dnscache' is started
WampServer (Apache, PHP and MySQL) will not function properly if any
service 'wampapache64' 'wampmysqld64' 'wampmariadb64' 'dnscache' is
not started.
And the "Check http.conf" tool said
httpd.exe: Syntax error on line 195 of
C:/wamp64/bin/apache/apache2.4.35/conf/ht tpd.conf: Cannot load
c:/wamp64/bin/php/php-5.4.9/php5apache2_4.dll into server: %1 is not
a valid Win32 application.
And line 195 of that file is
LoadModule php5_module
"${INSTALL_DIR}/bin/php/php-5.4.9/php5apache2_4.dll"
Is it failing because the dll file is for the wrong version or do to something else? I've tried to locate a php5apache2_4.dll file for 32 bit but I couldn't find one.
I've spent most of the weekend on this and if I can't get it going I will need to go back to my previous version since I work on more sites using 5.4 than later versions. I hope I don't have to do that.
If you are using WAMPServer 3 or greater then there are a multitude of versions of PHP that can be downloaded as ADDONS. In other words installed into WAMPServer with a simple download and click to install.
I suggest you remove the manually installed version of PHP and use the provided downloads.
They are available from SourceForgce, but they are a LOT EASIER to find on the WAMPServer backup repo
It looks like you may need to use the 32bit WAMPServer 3.1.4 as there does not appear to be a 64bit PHP5.4 available in the ADDON list.
You may also find that you need to download an older version of Apache to get PHP5.4 to run as Apache and PHP have to be installed to versions that are compatibly compiled.
But with WAMPServer 3 there are 16 versions of Apache and 50 or so versions of PHP.
EDIT: In answer to your comment
If you uninstall the 64bit WAMPServer (after backing up site code and any databases) and install the 32bit WAMPServer V3.1.4.
The version of Apache i.e. V2.4.35 that comes with WAMPServer3.1.4 will run PHP5.4.45. So once you have WAMPServer 3.1.4 installed and working (check it works before continuing) you can download and install the ADDON for PHP5.4.45
Then using the wampmanager menu, switch to PHP5.4.45.
The version of MySQL is not directly link to Apache/PHP so the version that comes with WAMPServer V3.1.4 will work just fine.
It would also be a good idea to apply the WAMPServer 3.1.5 upgrade to WAMPServer 3.1.4 so you are totoally upto date with WAMPServer

ioncube installation error on apache 2.4

I'm unable to make ioncube encoder work with Apache 2.4.12 and PHP 5.5.8. So, this is what I've done by now:
1. Installed httpd-2.4.12-win32-VC11 [http://www.apachelounge.com/download/]
2. Installed php-5.5.8-Win32-VC11-x64.zip [http://windows.php.net/downloads/releases/archives/]
Their raw combination works ok - I can run php scripts etc. I then:
3. Installed ioncube for Windows VC11 (64 bits) [https://www.ioncube.com/loaders.php]
I made corrections to php.ini and when I do php -m I see that it loads ioncube extension without any errors. However, when I now start Apache I get an error with a message about zend_get_hash_value and php5ts.dll. (PS. Combination with Apache 2.2, PHP 5.4 and ioncube works for me, but it seems rather outdated).
It seems like you have mismatched the thread-safe version of Apache and the ionCube Loader. PHP extensions have to match exactly the version that they run on, that is PHP with thread-safety enabled has to have a thread-safe Loader.
To confirm this, go to the output of your phpinfo(); and look for the entry Thread Safety. If it says disabled, make sure you have the Non-TS version of the ionCube Loader (Win x64 Non-TS zip). Likewise, if it says enabled, make sure you have to thread-safe version of the Loader (Win x64 TS zip).
Furthermore, please consider using 32bit PHP / Apache on Windows, as PHP 64bit is still marked as experimental and can cause issues with the ionCube Loader:
The x64 builds of PHP for Windows should be considered experimental, and do not yet provide 64-bit integer or large file support (source)

Building PHP from source for use in Apache

I'm having trouble when installing an older version of PHP (5.1) on a Ubuntu machine. I've tried to downgrade it without success using apt-get, so I tried to install from source. After the installation, typing php -v in the terminal results in the correct version (i.e. 5.1), but the version that apache uses keep the same (the older one: 5.4) if I view it through
How do I add the installation I just did to apache in place of the older one? I need to remove the older version and make apache recognize the version I just installed.

apache 2.2.4 cannot load php5apache2_4.dll

I wanted to install Apache and PHP without using xampp. Apache is working fine. When i type localhost in my browser it shows "It works!" but when i try to install PHP, i get always this error:
"apache 2.2.4 cannot load php5apache2_4.dll into server: %1 is not a Win32-executable" (or something like this. Ive got a german version of the error)
I have windows 7 64bit. I re and installed multiple times but nothing changed.
In my config i have this.
LoadModule php5_module "c:/php-5/php5apache2_4.dll"
Got anyone an idea?
Apache Version is 2.2.4 and Php5.6
I used to have the same probleme so I switch to a Virtual Machine on Unix. My Probleme was here :
http://windows.php.net/download/
Apache Please use the Apache builds provided by Apache Lounge. They
also provide VC11 builds of Apache for x86 and x64. We use their
binaries to build the Apache SAPIs.
If you are using PHP with Apache 1 or Apache2 from apache.org (not
recommended) you need to use the older VC6 versions of PHP compiled
with the legacy Visual Studio 6 compiler. Do NOT use VC9+ versions of
PHP with the apache.org binaries.
With Apache you have to use the Thread Safe (TS) versions of PHP.
I wanted to post this as a comment but it was to long.

Trouble when ugrading PHP & Apache

Today, I have on my Windows 8.1 computer (64bit), Wampserver 2.4, php 5.4.12, and apache 2.4.4 . Because of my student project, i have to upgrade my php version to 5.5.10. For this, I used this tutorial : http://forum.wampserver.com/read.php?2,113423,113435#msg-113435
I did every line in this tutorial, but, when i tried to switch php version in wampServer, i got this message :
this php version doesn't seem to be compatible with your actual apache version
So, i installed a VC11 (2.4.9) apache version, but this time, when i switched my apache version, i got this very intersting message :
this Apache version doesn't seem to be compatible with your actual PHP version
This message almost killed me... so i checked in httpd.conf, (i compared it to my old apache version) but nothing more happened...
If someone can help me find out the solution, or give me a tutorial for my case.. I'll be very greatfull.
I believe that you installed the 64bit version of WAMPServer. That means you installed a 64bit Apache/PHP/MySQL.
When you added php version to 5.5.10 did you check that it was a 64bit version? It will need to be!

Categories