Reputation: 2388
I am trying to set some php configuration options using .htaccess
file and then get them in php.
If i write php_value max_execution_time 21
then i can run ini_get('max_execution_time')
in browser which returns 21 (using CLI it returns "0" but I dont know why).
However if I write php_value error_log someValue
using ini_get('error_log')
it returns boolean false in both browser and CLI. What is wrong with my configuration. How can I get values?
Upvotes: 2
Views: 101
Reputation: 95121
CLI is PHP Command Line Interface
. As the name implies, this is a way of using PHP in the system command line. Or by other words it is a way of running PHP Scripts that aren't on a web server
(such as Apache web server or Microsoft IIS)
.htaccess
(hypertext access) is file is a directory-level configuration file that works with web servers
such as Apache
The two of them are 2 different technology which mean PHP & .htacess can only share variables if you are running them on a Web Server
not via Command line
Upvotes: 3