1

When i uncomment the display_errors line in .htaccess the page throws an internal 500 error.

I have turned every single line on one by one to see where the issue was. But it throws an error only when php_value is active. The thing i don't understand is, this file has worked before. But since today it no longer works.

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
ErrorDocument 403 /403.php
#php_value display_errors 0
Options -Indexes

<FilesMatch "^\.">
require all denied
</FilesMatch>
<Files .htaccess>
require all denied
</Files>
<FilesMatch "database\.php|functions\.php|htmlfunctions\.php|footer\.php|header\.php">
 require all denied
</FilesMatch>```

1 Answer 1

1

try php_flag display_errors off

You may need to allow override for your htaccess

please see: https://php.net/manual/en/configuration.changes.php

Sign up to request clarification or add additional context in comments.

6 Comments

Im afraid this still throws the same error, i added the Allow Override and replaced php value etc. With php_flag
Is there anything in your error.log in apache logs folder?
I have checked the error log, and i found this [Mon Jul 29 15:12:14.126389 2019] [core:alert] [pid 26613:tid 139882325538560] [client 92.111.202.155:51132] /home/wopereiswb/domains/bedrijfsveiligheidwopereis.nl/private_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration, referer: https://www.bedrijfsveiligheidwopereis.nl/
Okay, that would indicate that perhaps mod_php is not enabled. what is currently running on apache?
I am honestly not sure, i can only access the settings and info for the domain through a directadmin environment. How can i check what's running?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.