简体   繁体   English

PHP 更改在浏览器中刷新缓慢

[英]PHP changes slow to refresh in browser

Ever since I added a.bash_profile on my Mac to point to a fresher version of PHP in MAMP, I've noticed my PHP changes take a long time to show in the browser localhost.自从我在我的 Mac 上添加 a.bash_profile 以指向 MAMP 中更新版本的 PHP 后,我注意到我的 PHP 更改需要很长时间才能在浏览器本地主机中显示。 It's absolutely killing me.这绝对要了我的命。 I added the bash profile so I could install Laravel 4?我添加了 bash 配置文件,所以我可以安装 Laravel 4? Any fixes out there?那里有任何修复吗?

Comment out the OPcache in your php.ini files. 在php.ini文件中注释掉OPcache。

/Applications/MAMP/conf/php5.5.3/php.ini /Applications/MAMP/conf/php5.5.3/php.ini

[OPcache]
;zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/opcache.so"
;  opcache.memory_consumption=128
;  opcache.interned_strings_buffer=8
;  opcache.max_accelerated_files=4000
;  opcache.revalidate_freq=60
;  opcache.fast_shutdown=1
;  opcache.enable_cli=1

Found a solution. 找到了解决方案。 The problem with my slow PHP was the version I was using, 5.5.3. 我的PHP速度慢的问题是我使用的版本5.5.3。 Once I switched MAMP to 5.2.17 everything started working as expected. 一旦我将MAMP切换到5.2.17,一切就会按预期开始工作。

Try Preferences -> General, then set PHP-Cache to "Off"尝试 Preferences -> General,然后将 PHP-Cache 设置为“Off”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM