Updating Apache2 after installing PHPMyAdmin and PHP 8.1 - php

Today I installed PHPMYAdmin on Ubuntu Focal Fosset. I got the message
apache2_reload: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.4.load: Cannot load /usr/lib/apache2/modules/libphp7.4.so into server: /usr/lib/apache2/modules/libphp7.4.so: cannot open shared object file: No such file or directory
The simple explanation is I no longer use PHP 7.4 as I updated to PHP 8.1.
How do I update in order to have php8.1.conf and php8.1.load instead of php7.4.conf and php7.4.load ?
Thanks.
PS: I just looked at etc/php and noticed there 2 files, one entitled 7.4 and the other 8.1. Should I delete the first one?

Related

php7ts.dll cannot load into server

Today I have installed php7, but when I restart the apache, it couldn't start. again despite I edited the httpd-xampp.conf file to config php7.
anyway I went to C:/xampp and run the apache_start.bat, then I saw the following error
Apache 2 is starting ...
httpd.exe: Syntax error on line 456 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 17 of C:/xampp/apache/conf/extra/httpd-xampp.conf: Cannot load C:/xampp/php/php7ts.dll into server: The specified module could not be found.
after that I checked those file and saw they're exist.
what can I do now?
thanks in advance...
You need to have all the components installed in the same x64/x86 version :
Apache (httpd.exe -v to find out which one is installed)
PHP 7 (php.exe -v to find out which one is installed)
Visual C++ Redistributable for Visual Studio 2015 (check the list of your installed softwares on Windows)
If one of the above component is not in the same version than the others, you could get the module could not be found error.

Fatal error: Class 'MongoClient' not found

I want to connect to MongoDB from PHP but I keep getting the fatal error in the title. My PHP version is 5.5.14, architecture x86, thread safety enabled, VC11.
So I downloaded 5.5 Thread Safe (TS) x86 from PECL, extracted php_mongo.dll to the \ext\ folder of my php installation, added extension=php_mongo.dll to the php.ini file, and restarted Apache.
I keep getting the same fatal error when I use either Mongo() and MongoClient().
Also, I can access mongo from CMD, starting it with mongod and then opening another cmd window to handle the database using mongo. I installed PHP and Apache separately (No XAMPP or WAMP) on Windows 8.1 x64.
Installation folders:
Apache: C:\Apache24
PHP: C:\php
MongoDB: C:\Program Files\MongoDB
In the lastest version, you can use new MongoDB\Driver\Manager() to create the obj instead of the MongoClient().

Amazon Linux LAMP with php 5.5

I installed PHP 5.5 on my Amazon Linux VPS via the instructions here. The CLI is working fine.
I also had apache already installed and running via the httpd package. It was running without any issue.
I see that there is no mod_php in the list of available modules. Now when I try to restart httpd I get the error:
httpd: Syntax error on line 222 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: symbol SSLeay_version, version OPENSSL_1.0.1 not defined in file libcrypto.so.10 with link time reference
I've looked up parts of this error, and the general advice seems to be to run
yum update openssl
However, when I run this I just get:
No packages marked for update
When I run install instead of update, I get:
Package 1:openssl-1.0.1e-4.55.amzn1.x86_64 already installed and latest version
Nothing to do
I'm not sure what else to do at this point.
The php55 package in the Amazon Linux YUM repository requires the http24 package, not the http package.

Downgrade XAMPP PHP from 5.4 to 5.3 on Mac 10.7

I've got a Macbook Pro 13" 64bit (early '11) with the latest XAMPP version. This version is shipped with PHP 5.4.*.
As I'm developing sites for a server that runs Debian with php 5.3.* it's pretty confusing when uploading sites, testing them and to redo stuff because of different php versions.
So now I'm looking for a way to downgrade php from 5.4 to 5.3 - would be cool if there is a version-switcher, but not necessary for now.
stackoverflow had the question already by now, but it mostly states the fact of using Windows. The structure isn't the same, so I can't use the tips for my mac.
Here is an answer that I already tried: https://stackoverflow.com/a/1422622
The problem is, that I can't start Apache after changing the file(s):
httpd: Syntax error on line 522 of /Applications/XAMPP/xamppfiles/etc/httpd.conf: Syntax error on line 10 of /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf: Cannot load modules/libphp5.so into server: dlopen(/Applications/XAMPP/xamppfiles/modules/libphp5.so, 10): no suitable image found. Did find:\n\t/Applications/XAMPP/xamppfiles/modules/libphp5.so: no matching architecture in universal wrapper
httpd: Syntax error on line 522 of /Applications/XAMPP/xamppfiles/etc/httpd.conf: Syntax error on line 10 of /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf: Cannot load modules/libphp5.so into server: dlopen(/Applications/XAMPP/xamppfiles/modules/libphp5.so, 10): no suitable image found. Did find:\n\t/Applications/XAMPP/xamppfiles/modules/libphp5.so: no matching architecture in universal wrapper
In an older version of XAMPP I found a phpswitcher-script and tried it with an older PHP version of XAMPP. The script tells me:
XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.
Is there any way I can downgrade PHP?

Apache 2.4.4 issue with PHP 5.5.1

I am having a problem setting up PHP 5.5.1 on Windows 8 Pro under Apache 2.4.4. I have Apache 2.4.4 x86 and I downloaded PHP 5.5.1 x86 VC11 Thread Safe. When I try to load Apache It returns the error:
httpd.exe: Syntax error on line 531 of C:/Apache24/conf/httpd.conf: Cannot load
C:/php/php5apache2_4.dll into server: The specified module could not be found.
I am staring at the file C:\php\php5apache2_4.dll, so I am 100% positive it exists. Now here is the part I don't understand....
When I download PHP 5.4.17 VC9 Thread Safe and unzip, Apache loads and finds the .dll just fine.
Why does PHP 5.4 install perfectly fine, but PHP 5.5 throws the above error. I have tried to install several times and now I am here because I cannot figure it out on my own.
Thanks!
P.S. I originally asked this question on Server Fault, assuming this was a Server Setup related question, but was directed here, even though I've had questions closed over here that were of this nature. Original Server Fault Question: https://serverfault.com/questions/525029/apache-2-4-4-issue-with-php-5-5-1
Any chance you have a x64 version of Apache and a x86 version on PHP ? Or maybe the other way around ?
I think there's some compatibility issue with that dll file.. try some other version of php

Categories