Koozali.org: home of the SME Server

From 9.2 to V10 migrated Webpage error

Offline umbi

  • ***
  • 100
  • +0/-0
From 9.2 to V10 migrated Webpage error
« on: December 18, 2022, 10:39:25 PM »
Hello, everyone

I've been migrating from 9.2 to V10 for a long time. I would like to switch off 9.2 forever as soon as possible, but the last migrated and most important website for me is causing problems.

Unfortunately, this website only works under max php 5.6 because it has a specially developed tool that is ioncube-encrypted. Unfortunately, the programmer passed away so I have to stay on remi php5.6 for a while.

The problem explained:

The website works perfectly on V10 remi 5.6 without modrewrite (but for me urlrewrite is mandatory), but when I activate the mod-rewrite, the frontend works perfect, but when I log into the backend, I get an "internal 500 server error" . In the backend directory it has a .htaccess where the urlrewrite turns off.

Nothing is written in the logs in the SME-10 server manager. I compared the phpinfo files with each other as best I could and didn't find any big differences except that I had installed ACP Cache on V9.2 and not on V10.

Can someone help me please?

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: From 9.2 to V10 migrated Webpage error
« Reply #1 on: December 19, 2022, 01:25:58 AM »
which logs have you checked ?

Offline umbi

  • ***
  • 100
  • +0/-0
Re: From 9.2 to V10 migrated Webpage error
« Reply #2 on: December 19, 2022, 09:49:07 AM »
Hello Jean-Philippe

Thank you for your answer.

I checked the in the server_info mentioned path: /var/log/php/my_ibay/error.log (was empty) and the  messages.log in the server-manager. In the httpd.log i found this error maybe its the smoking gun:

[Sun Dec 18 02:55:56.690067 2022] [core:alert] [pid 24692] [client *.*.*.125:57405] /home/e-smith/files/ibays/ib_my-ibay/html/www/backend/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration, referer: https://test.mydomain.com/backend/index.php


What i found is that on old V9.2 server where all is working there is at open_basedir no entry.

In V10 is the Entry: /home/e-smith/files/ibays/ib_my-ibay/:/var/lib/php/ib_my-ibay/:/usr/share/php/:/usr/share/pear/:/opt/remi/php56/root/usr/share/pear/:/opt/remi/php56/root/usr/share/php/

Can that have an impact ?

But for me it looks as the turn off rewrite command in htaccess from backend directory will not be taken:

"<IfModule mod_rewrite.c>
  RewriteEngine off
</IfModule>
php_flag suhosin.session.encrypt Off
"
Here is my phpconfig and i guess the phpmodule must be on:

"
 config show php56
php56=configuration
    AllowUrlFopen=On
    FollowSymLinks=enabled
    IonCube=enabled
    MaxExecutionTime=30
    MaxFileUpload=20
    MaxInputTime=60
    MemoryLimit=768M
    MemoryLimit=512Mconfig=setprop
    PhpModule=disabled
    PostMaxSize=20M
    UploadMaxFilesize=10M
    php56=MemoryLimit=512M
"

As when i turn of the mod_rewrite in server-manager, the backend works.

Greez
Umbi
« Last Edit: December 19, 2022, 12:07:04 PM by umbi »

Offline umbi

  • ***
  • 100
  • +0/-0
Re: From 9.2 to V10 migrated Webpage error
« Reply #3 on: December 19, 2022, 01:16:18 PM »
Update

After activating php_module = enabled

the problem still appears :-(
at the moment no new errors in the log file.

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: From 9.2 to V10 migrated Webpage error
« Reply #4 on: December 19, 2022, 02:18:20 PM »
please disable php_module.

stop playing with php settings for php ini they are not in use with httpd.
httpd uses php-fpm.  so no php aetting can occurs in httpd,  nor in php.ini. First will fail httpd and second will
be overriden by fpm.


install smeserver-webhosting and set what you need from there. 

you should also check httpd/errors_log

message reports an issue in a cron file.
do not forget to change the php bin to ise the apropriate one. there

Offline umbi

  • ***
  • 100
  • +0/-0
Re: From 9.2 to V10 migrated Webpage error
« Reply #5 on: December 19, 2022, 08:28:40 PM »
Hello Jean-Philippe

i have disabled the php_module. Thanks for that tip.

Now all is working i found the error! I write my solution, maybe it helps somebody else:

in the backend  directory in the htaccess worked on V9.2 was

Code: [Select]
"<IfModule mod_rewrite.c>
  RewriteEngine off
</IfModule>
php_flag suhosin.session.encrypt Off
"

i disabled the commandline:  php_flag suhosin.session.encrypt Off
V10 goes in internal 500 error with this command.

Cheers  :lol:
« Last Edit: December 19, 2022, 08:32:58 PM by umbi »

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: From 9.2 to V10 migrated Webpage error
« Reply #6 on: December 20, 2022, 12:21:40 AM »
as i said php commands should not be in httpd anymore ;)

great to hear the result.