Control Web Panel

WebPanel => PHP => Topic started by: trex2002ro on August 25, 2022, 07:29:50 PM

Title: PHP File cache
Post by: trex2002ro on August 25, 2022, 07:29:50 PM
Hello

I am an newbie and i want to learn php.

I have CWP 7 installed with PHP 8.1.

I am trying to make an php script that connects to sql...this is not really important.
The problem that i have is this:

Every time i edit an php file and save it...it will not refresh on my browser. After about 60-70 seconds...it will refresh.
This is verry anoying because i don't really have good skills in php and most of the work i do is trial and error.

Can someone explain to me why this is happening and what can i do to refreh php site instant?

html file does not have this problem.

Thank you
Title: Re: PHP File cache
Post by: LexBart on August 29, 2023, 11:53:39 AM
I have the same problem. Did you manage to solve it?

Update

I guess disabling the cache should help.
/opt/alt/php-fpm74/usr/php/php.d/opcache.ini
Title: Re: PHP File cache
Post by: overseer on August 29, 2023, 02:16:23 PM
You can disable opcache in your relevant php.ini for your version of php:

Code: [Select]
opcache.enable = 0
Or you can selectivel set opcache_reset() at head of your php script.