Operations-How do I test whether the php.ini is configured correctly?
Source: Internet
Author: User
KeywordsPHP operation and maintenance
Title, similar
nginx -tTest Nginx configuration,
php-fpm -tTest php-fpm.conf, how the correctness of php.ini test, in the production environment sometimes need to modify php.ini, need to test php.ini is correct before reload related services.
Someone answered the use php -i and php --help command, this is no use, I will php.ini inside the
memory_limit = 256M
Change into
amemory_limit = 256M
Don't see any error hints
Execute PHP statement
php -r 'echo getcwd(), "\n";'
No abnormalities
Reply content:
Title, similar to nginx -t test nginx configuration, php-fpm -t test php-fpm.conf, php.ini correctness of how to test, in the production environment sometimes need to modify php.ini, need to test php.ini is correct before reload related services.
Someone answered the use php -i and php --help command, this is no use, I will php.ini inside the
memory_limit = 256M
Change into
amemory_limit = 256M
Don't see any error hints
Execute PHP statement
php -r 'echo getcwd(), "\n";'
No abnormalities
Php-i
PHP--help
Command line directly run PHP, it will load php.ini first, if there is a problem there will be warning and the like
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.