Changes to php documents require restarting php-fpm
-
I installed php through the php-fpm method and installed xcache. If I make a change to a php document, the change doesn't show up in the browser until I restart php-fpm.
For example, if I change "test 5" the following php file to test 100, then refresh the broswer, it stays as test 5...even overnight. Changes to static files reflect immediately.
<html> <body> <p> <?php echo "Test 5"; ?> </p> <p> Xcache Pageview Counter: <?php echo xcache_inc("count"); ?></p> </body> </html>Posted 1 year ago # -
This sounds like the root cause of a lot of problems I've been seeing. How do you restart php-fpm, so I can test this out?
Posted 1 year ago # -
Well, I tried "n2r" followed by "sudo /etc/init.d/php-fpm start" and that didn't seem to make any difference.
On this page:
http://www.breezetree.com/index.phpI still get the vpsBible welcome message even though the contents of
/home/public_html/breezetree.com/public/index.php are completely different.Posted 1 year ago # -
Aha! This works:
"sudo /etc/init.d/php-fpm reload"
What's troubling is that I changed that index.php file two weeks ago, and it still didn't update after reloading nginx multiple times. After doing the reload above, I got the newer content. But I edited it again for shits and giggles and the latest changes don't show up.
Of course, I don't want to have to reload php-fpm every time I change a php file.
Posted 1 year ago # -
And I can't find ANY reference to this problem anywhere on google. And I certainly don't think we should have to restart php-fpm any time a change to a php file is made.
Posted 1 year ago # -
sudo /etc/init.d/php-fpm reload
.. you'll have to restart using this when changes have been made to php's config
Posted 1 year ago # -
The problem isn't when you make changes to the php config; it's when you make changes to a php file.
For example, you can change the html from <h1>Before</h1> to <h1>After</h1> and it will continue to show Before until you reload php-fpm.
As I mentioned in anther thread, I turned xcache off to fix this problem.
Posted 1 year ago # -
I've been experiencing this problem as well, but how exactly do you turn of xcache?
Posted 1 year ago # -
this is interesting, I am also having this issue...
I have to restart phpfpm eveytime a php file is modified... i cant no longer just hit refresh from browser...
Posted 1 year ago # -
@Roland,
In /etc/php/php.ini change xcache.cacher to Off.
Alternately, you could try changing the xcache.ttl setting to something like 3600 (1 hour). The default is 0 (forever). I'm going to play with this sometime soon.
Posted 1 year ago # -
I tried setting it to one second, and it didn't help. BTW, PHP 5.3 doesn't get along well with Drupal 6, so I had to rollback to pHp 5.2 and still had the same problem. So at the moment, I have xcache disabled.
Posted 1 year ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
