php.ini does not get reloaded when i restart apache. WHY???
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
If you want to turn PHP 'off', remove the line in your httpd.conf file that tells apache to parse .php files through the PHP parser. Otherwise you will always get php files getting sent to the PHP engine.ivj wrote:You're PHP pros here, tell me something, how can I "turn off" php without httpd.conf by messing up php.ini?
Can you post a link to your PHP info page and specify again what exactly it is you are trying to accomplish?
Even if I set Engine=Off in php.ini? I tried that, but like I said, php.ini isn't being read.Everah wrote:If you want to turn PHP 'off', remove the line in your httpd.conf file that tells apache to parse .php files through the PHP parser. Otherwise you will always get php files getting sent to the PHP engine.ivj wrote:You're PHP pros here, tell me something, how can I "turn off" php without httpd.conf by messing up php.ini?
"Can you post a link to your PHP info page and specify again what exactly it is you are trying to accomplish?"
There ya go:
http://thailandhaven.com/test.php
And Like I said before, no matter what I do with
Configuration File (php.ini) Path /usr/local/apache2/conf/extra/php.ini
(delete/ modify it with bad syntax, change things in it with right syntax), it's as if that file wasn't read/reloaded whatsoever.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
What doesprint?
Code: Select all
<?php
$inipath = '/usr/local/apache2/conf/extra/php.ini';
echo "<pre>\n";
$path = '';
foreach( explode('/', substr($inipath,1)) as $p ) {
$path .= '/'.$p;
if (!file_exists($path)) {
echo "no such file: $path\n";
}
else {
echo is_dir($path) ? 'd' :'-',
is_readable($path) ? 'r' :'-',
is_writable($path) ? 'w' :'-',
is_executable($path) ? 'x' :'-',
" $path\n";
}
}
$ini = parse_ini_file($inipath, false);
echo "\nentries parsed: ", count($ini), "\n";
foreach( array('engine', 'log_errors', 'error_log', 'error_reporting') as $e) {
echo $e, ': ', (isset($ini[$e])) ? $ini[$e] : '-undefined-', "\n";
}
echo "</pre>\n";
?>Looks good to me.dr-x /usr
dr-x /usr/local
dr-x /usr/local/apache2
dr-x /usr/local/apache2/conf
dr-x /usr/local/apache2/conf/extra
-r-- /usr/local/apache2/conf/extra/php.ini
entries parsed: 149
engine: 1
log_errors: 1
error_log: -undefined-
error_reporting: 2047
Now set a value for error_log in /usr/local/apache2/conf/extra/php.ini
e.g.
Code: Select all
error_log=/usr/local/apache2/php.errHmmm. I get the file does get parsed, look here now: http://thailandhaven.com/test.php
However, I don't see no php.err in that directory...
The reason I'm doing this whole thing was because I was trying to use the PHPMailer library and it was bitching about my timezone not being set, and no matter what I tried, it remained America/New_York, and If I tried setting it in that file, it still wouldn't change....
But still, why don't I see the error log file? It says I Have errors...
However, I don't see no php.err in that directory...
The reason I'm doing this whole thing was because I was trying to use the PHPMailer library and it was bitching about my timezone not being set, and no matter what I tried, it remained America/New_York, and If I tried setting it in that file, it still wouldn't change....
But still, why don't I see the error log file? It says I Have errors...
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
It still says
Probably something like?
edit: ah FC4 ->
You did restart the apache service?Configuration
PHP Core
[...]
error_log no value no value
Probably something like
Code: Select all
/etc/init.d/apache stop
/etc/init.d/apache startedit: ah FC4 ->
Code: Select all
/sbin/service httpd stop
/sbin/chkconfig httpd on
/sbin/service httpd startActually my apache/logs/error_log is very clean. Ok I don't get this, in my php.ini I have
[Date]
date.timezone = "America/Vancouver"
However, when I check the timezone, I get America_NewYork: http://thailandhaven.com/test.php
The code is:
Any idea?
[Date]
date.timezone = "America/Vancouver"
However, when I check the timezone, I get America_NewYork: http://thailandhaven.com/test.php
The code is:
Code: Select all
echo "<br>Timezone (set as \"America/Vancouver\" in php.ini: <b>".date("e")."</b><br>";Huh? Refresh the file, here's what I'm seeing:volka wrote:It still saysYou did restart the apache service?Configuration
PHP Core
[...]
error_log no value no value
Probably something like?Code: Select all
/etc/init.d/apache stop /etc/init.d/apache start
edit: ah FC4 ->Code: Select all
/sbin/service httpd stop /sbin/chkconfig httpd on /sbin/service httpd start
entries parsed: 150
engine: 1
log_errors: 1
error_log: /usr/local/apache2/logs/php.err
error_reporting: 2047