I'm trying to migrate a moodle server from host to another host . On the old server Moodle is working. i copy the moodle folder and the moodledata to the new Server and migrate the Database and change the config.php with the new informations. if i try to open the moodle site i get this problem.
-------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
-------------------------------------------------and if i open the server error log i get Invalid command error
-------------------------------------------------
/home/update/public_html/moodle/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
/home/update/public_html/moodle/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
-------------------------------------------------
my .htaccess looks like
DirectoryIndex index.php index.html index.htm
php_value memory_limit 40M (adjust to your version of Moodle)
php_flag magic_quotes_gpc 1
php_flag magic_quotes_runtime 0
php_flag file_uploads 1
php_flag session.auto_start 0
php_flag session.bug_compat_warn 0
AcceptPathInfo on
LimitRequestBody 0
php_value upload_max_filesize 2M
php_value post_max_size 2M
-------------------------------------------------
and if a remove all php_value and php_flag from .htaccess i get anthoer error log
-------------------------------------------------
AH01071: Got error 'PHP message: PHP Warning: unlink(/home/update/moodledata/cache/core_component.php): Permission denied in /home/update/public_html/moodle/lib/classes/component.php on line 295PHP message: PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/update/public_html/moodle/lib/weblib.php on line 2888PHP message: PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/update/public_html/moodle/lib/weblib.php on line 2889PHP message: PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/update/public_html/moodle/lib/weblib.php on line 2891PHP message: PHP Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/update/public_html/moodle/lib/deprecatedlib.php on line 3478PHP message: PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/update/public_html/moodle/lib/moodlelib.php on line 5544'
-------------------------------------------------
my PHP Version is 7.4.33 on the old and new host
:my Server API on the old host is
CGI/FastCGI
:and on the new host is
FPM/FastCGI