A site fails with “Invalid command 'php_value'”
A site returns 500 Internal Server Error because its .htaccess contains a php_value or php_flag line. Apache does not recognize these directives here because PHP runs through PHP-FPM, so move the values to the domain's PHP settings.
Symptoms
Every page of the site returns 500 Internal Server Error. Read the domain's error log with the following command.
urbestack-domain-log --name example.com --type error[Mon Nov 30 08:12:29.273001 2026] [core:alert] [pid 1377:tid 1417] [client 203.0.113.10:40618] /home/USER/files/web/example.com/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configurationCause
UrbeStack runs each site's PHP in its own PHP-FPM pool. Apache passes PHP requests to that pool.
php_value and php_flag are directives from mod_php, the PHP module for Apache. These servers do not load that module. Apache rejects the entire .htaccess file, so every page fails.
Resolution
Delete the
php_valueandphp_flaglines from.htaccess. The site responds again immediately.Set the values in the domain's PHP settings. This example sets
memory_limit.urbestack-domain-set --name example.com --php-setting memory_limit=512MThe command accepts
memory_limit,upload_max_filesize,post_max_size,max_execution_time,max_input_vars,disable_functions,display_errorsanddate.timezone.You can also set
display_errorsanddate.timezonein a.user.inifile in the site's folder.