Changing server, struggling with displaying websites (WordPress / Typo3)

After importing domains onto a new server, the website (typo3) and wordpress won't show.

in the apache errorlog I found this (regarding typo3)

PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mcrypt.so' - /usr/lib64/php/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0, referer: http://soundgallery.com/typo3/

*On the wordpress side I get the following displayed: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. (errorlog apache same as above)

The old server is a CentOS 6.2, where the two websites were running fine. Apache version 2.2.15
PHP version 5.3.3 MySQL version 5.1.66

*I setup through the scriptinstaller a new WordPress on the new server and that worked fine. The imported version of WordPress was up to date.

can you help me on this dynamic library?

Status: 
Active

Comments

Howdy -- you may be seeing an issue with some incompatibilities with your old php.ini file and your new server.

In the public_html file for this domain, can you create a file named test.php, and in it, place the following contents:

<?php phpinfo(); ?>

Then, could you share the URL that we can use to access that test.php file?

That will help us understand what the php.ini file is trying to do.

Doing some Googling, it looks like mcrypt may not be available in the default CentOS repositories.

To prevent that notice from showing up over and over, you may want to edit "/etc/php.d/mcrypt.ini", and comment out the line that's loading it.

Now, as far as MySQL is concerned -- what is the output of these two commands:

cat /etc/php.d/mysql.ini
ls /usr/lib/php/modules

For this command: cat /etc/php.d/mysql.ini

Enable mysql extension module extension=myspl.so

and for ls /usr/lib/php/modules

ls: Zugriff auf /usr/lib/php/modules nicht möglich: Datei oder Verzeichnis nicht gefunden translates to: "access impossible" for /usr/lib .... and "file or folder not found"

I installed mcrypt but without effect. In the error logs I discovered these messages:

[Fri Sep 16 17:00:02.511650 2016] [cgi:error] [pid 3989] [client 82.195.234.237:39978] AH01215: PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0

[Fri Sep 16 17:00:02.511705 2016] [cgi:error] [pid 3989] [client 82.195.234.237:39978] AH01215: PHP Warning: Module 'mysql' already loaded in Unknown on line 0

Okay, I suspect the php.ini file is trying to use a PHP Extension directory that doesn't exist.

We'll need to figure out where PHP is putting those though... what is the output of this command:

find /usr -name mysql.so

thats the returned output:

/usr/lib64/perl5/vendor_perl/auto/DBD/mysql/mysql.so

/usr/lib64/php/modules/mysql.so

Okay, great!

In $HOME/etc/php.ini, there should be a line that begins with the word "extension_dir"/

Currently, it's set to use "/usr/lib/php/modules", which is probably the correct path for your old server.

Could you update that path, so that it instead uses "/usr/lib64/php/modules/"? That should resolve that issue.

in the php.ini I found this:

; Directory in which the loadable extensions (modules) reside.

; http://php.net/extension-dir

; extension_dir = "./"

; On windows:

; extension_dir = "ext"

under these lines I placed

extension_dir ="/usr/lib64/php/modules/"

I tried with "..." and withouth it

then I restarted apache ... but no changes on the front end there.

Hrm, I'm not actually sure where it's getting that value from.

However, what I did is I created a symlink on your server, linking that non-existent directory with the correct extension directory.

Now when I look at your phpinfo() output, it's showing that the MySQL module is loading as expected.

Can you give that a try and see if it works as expected?

Oh that was a great idea. One step out of the blues... the server win77.com seems to work now fine with a wordpress enviroment.

Now the second server Soundgallery with a typo3 (version 4.6...) still loads in errors.

[Fri Sep 16 20:26:04.674815 2016] [cgi:error] [pid 16390] [client 194.191.229.105:63521] AH01215: PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0, referer: http://www.soundgallery.com/index.php?id=5 [Fri Sep 16 20:26:04.674874 2016] [cgi:error] [pid 16390] [client 194.191.229.105:63521] AH01215: PHP Warning: Module 'mysql' already loaded in Unknown on line 0, referer: http://www.soundgallery.com/index.php?id=5

Those aren't actually errors, they're just notices that multiple php.ini files are trying to load those modules.

Those are safe to ignore.

Though if that's a concern for you, you could always edit your user's php.ini file, and comment out the sections that are trying to load those modules, since they're being loaded from the files within /etc as well.

After uncommanding at virtualmin - webdomain - Service - php5 configuration - php.ini

"extension=mysql.so

extension=mcrypt.so

typo3 appeared better.

the expected frontpage of soundgallery.com still didn't show. But for the admin login page of typo3, the funny messages disapeared. Unfortantly I couldn't login into typo3/backend, it didn't recognize the admin.

Unfortunately, configuring the website itself is a bit outside our area of expertise.

What I can offer is that when I browse to soundgallery.com, it says an error has occurred.

That may mean there's some additional error being printed in the Apache error log that could help.

It's possible that's related to why you're unable to access the backend.

I found this on the apache error log. Does this relate?

[Fri Sep 16 22:25:30.911108 2016] [ssl:warn] [pid 2756] AH01909: RSA certificate configured for soundgallery.com:443 does NOT include an ID which matches the server name

That message is safe to ignore, it won't cause a problem with your web apps.

I don't know if the following errors I receive, maybe has something to do with displaying the website. What I experianced is this: I used the scriptinstaller, to install a typo3. Well I received the following message:

This script cannot be installed, as this virtual server does not meet its requirements : Missing command wget

OK I fixed the last comment and the script installer worked also for typo 3. I used "yum install wget".

Great, we're glad to hear the typo3 install script is working now!