Koozali.org: home of the SME Server

Fault find web application not working on server move

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Fault find web application not working on server move
« on: March 02, 2023, 02:46:50 PM »
Hi All
I have a working php application on sme 9 (php 7.3)
Been wanting to move it over to 10 for some time but i keep running out of talent.
All the tools say it should work as is but i get http 500 errors.
There is nothing in any of the logs I can find.

Just wondering where i start with this.
Ive tried using the old servers mysql to ensure its not that causing the issue.

Thanks

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Fault find web application not working on server move
« Reply #1 on: March 02, 2023, 06:48:30 PM »
what logs did you check?

can you give more info on the server? mode? contribs? template custom?

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #2 on: March 08, 2023, 06:03:18 PM »
what logs did you check?

can you give more info on the server? mode? contribs? template custom?
Hi JP
Its a standard sme 10 server apart from mysql 57
afaik the sme 9.2 its currently on is mysql 57 too and standard too.

Log wise ive checked the php error log for the ibay, httpd error log and messages

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Fault find web application not working on server move
« Reply #3 on: March 09, 2023, 04:34:50 AM »
default php is php74 on sme10 ibays.

it could be that your app is not compatible.

could be you are missing some php extension for the php version running. 

also could it could be an issue with a template custom or some .htaccess files not compatible with httpd 2.4 access syntax


Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #4 on: March 28, 2023, 10:55:14 AM »
Quote
could be you are missing some php extension for the php version running.

this is what im thinking but cant work out which one.

It just goes 500 error. SUpport of the web application say its a database issue, but im using the database of the old server (for testing) and the fault persists.


Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #5 on: March 28, 2023, 11:27:07 AM »
checking between the 2 servers (sme 9 vs sme10)

sme9
Code: [Select]
# httpd -M
Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 env_module (shared)
 log_config_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 status_module (shared)
 info_module (shared)
 include_module (shared)
 autoindex_module (shared)
 dir_module (shared)
 cgi_module (shared)
 asis_module (shared)
 actions_module (shared)
 proxy_module (shared)
 proxy_http_module (shared)
 alias_module (shared)
 rewrite_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 authn_file_module (shared)
 authn_anon_module (shared)
 auth_digest_module (shared)
 auth_basic_module (shared)
 authz_groupfile_module (shared)
 expires_module (shared)
 headers_module (shared)
 usertrack_module (shared)
 setenvif_module (shared)
 authnz_external_module (shared)
 deflate_module (shared)
 php5_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 ssl_module (shared)

sme10
Code: [Select]
# httpd -M
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 env_module (shared)
 log_config_module (shared)
 systemd_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 status_module (shared)
 info_module (shared)
 include_module (shared)
 autoindex_module (shared)
 dir_module (shared)
 cgi_module (shared)
 asis_module (shared)
 actions_module (shared)
 proxy_module (shared)
 proxy_http_module (shared)
 alias_module (shared)
 rewrite_module (shared)
 authn_core_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 authn_file_module (shared)
 authn_anon_module (shared)
 auth_digest_module (shared)
 auth_basic_module (shared)
 authz_groupfile_module (shared)
 proxy_wstunnel_module (shared)
 mpm_prefork_module (shared)
 socache_dbm_module (shared)
 unixd_module (shared)
 access_compat_module (shared)
 expires_module (shared)
 headers_module (shared)
 usertrack_module (shared)
 setenvif_module (shared)
 authnz_external_module (shared)
 deflate_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 ssl_module (shared)
 proxy_fcgi_module (shared)

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Fault find web application not working on server move
« Reply #6 on: March 28, 2023, 12:50:26 PM »
by default mysql will not allow connexions from outside the server, so it is expected not to work  using the one from previous server. 
2 reasons:
- host should allow your server in the user table of mysql database. 
- default is only using socket and not network port.


from your previous sme9 you need to check which version of php you were using, as it seems from first post 7.3
then

rpm -qa |grep 73|sort


then do on new server

rpm -qa |grep 74|sort


and install any missing composant

there are 2 different mysql driver for php, some app are very restrictive on which one they want.

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #7 on: March 28, 2023, 12:56:20 PM »
Thanks JP
im using 7.3 on both just to keep everything as similar as possible

The current working 9.2 is using a port and the one on 10 can see the db. I have also tried local mysql

i will check on the missing componenets etc and report back.

Many Thanks


Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #8 on: March 28, 2023, 01:10:33 PM »
Quote
mysql-5.1.73-8.el6_8.x86_64
mysql-libs-5.1.73-8.el6_8.x86_64
mysql-server-5.1.73-8.el6_8.x86_64
php73-2.0-1.el6.remi.x86_64
php73-php-pecl-imagick-devel-3.4.4-9.el6.remi.x86_64
php73-php-devel-7.3.25-1.el6.remi.x86_64

are the missing ones but im using mysql 5.7

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #9 on: March 28, 2023, 01:36:57 PM »
also tried istalling php73 devel and get

Code: [Select]
Error: Package: php73-php-devel-7.3.33-8.el7.remi.x86_64 (remi-safe)
           Requires: libargon2-devel(x86-64)

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #10 on: March 28, 2023, 05:27:35 PM »
ive installed (added remi from the extra repos page)
Code: [Select]
php73-php-pecl-imagick-devel-3.4.4-9.el6.remi.x86_64
php73-php-devel-7.3.25-1.el6.remi.x86_64

now the differences are

Code: [Select]
mysql-5.1.73-8.el6_8.x86_64
mysql-libs-5.1.73-8.el6_8.x86_64
mysql-server-5.1.73-8.el6_8.x86_64
php73-2.0-1.el6.remi.x86_64

Offline jameswilson

  • ****
  • 739
  • +0/-0
    • Security Warehouse, trade security equipment
Re: Fault find web application not working on server move
« Reply #11 on: March 28, 2023, 05:36:22 PM »
now im wondering if this is the issue
Quote
there are 2 different mysql driver for php, some app are very restrictive on which one they want.

how do i check what version its using on the sme9 server?

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Fault find web application not working on server move
« Reply #12 on: March 30, 2023, 12:15:25 AM »
You will be much better off taking a methodical approach here instead of thrashing about wildly.

Quote
i've installed (added remi from the extra repos page)
Code: [Select]

php73-php-pecl-imagick-devel-3.4.4-9.el6.remi.x86_64
php73-php-devel-7.3.25-1.el6.remi.x86_64

Those are el6 packages. v10 uses el7 packages.

You have a working v9 with el6. You do not need to add anything there.

You do not need the extra repos on v10 - the safe repos are already there.

Quote
SUpport of the web application say its a database issue, but im using the database of the old server (for testing) and the fault persists.

So it has some logs somewhere.

So how are you accessing the old DB from the app on v10? What does the v9 DB say?

Does the app have permission to access it? Can the v9 mysql57 be accessed using TCP and through the firewall? What are the mysql57 settings on v9? What are they on v10?

You need to stop trying to leap to conclusions, rewind a bit, start doing things logically, and write stuff out so we can follow a path. We can't just leap in part way through and understand what you have done or we will end up with another XY problem.

https://xyproblem.info/

If someone asks you for some information then post it eg what a does this say?

Quote
from your previous sme9 you need to check which version of php you were using, as it seems from first post 7.3
then

rpm -qa |grep 73|sort

then do on new server

rpm -qa |grep 74|sort

Please don't randomly install packages in the hope you can fix it - that will just clutter your system and make it more difficult to diagnose, and break stuff.

And I am sure you are probably under pressure to do this NOW, but then it should have been done a long while back. v10 has been out for some long time.

You need to take your time and don't cut corners in a desperate rush to try and fix it.

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: Fault find web application not working on server move
« Reply #13 on: April 05, 2023, 04:37:45 PM »
Did you get this sorted out James?
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation