我将我的应用程序从测试服务器移动到生产服务器,但现在我遇到了SplFileInfo的问题,它试图从测试服务器访问路径。
我尝试了很多我找到的解决方案,但没有人工作。而且我没有权限从我的服务器更改PHP版本。
当我需要从名为' FileUpload'的插件加载一些JS文件时,会发生这种错误。它打印在JS文件的顶部。可以在这里看到:http://www.mileniomoveis.com.br/file_upload/js/jquery.iframe-transport.js
旧(测试服务器)路径为/storage/e/ca/fa/novomileniomoveis/public_html/...
新(生产服务器)路径为/storage/5/99/da/tmpmileniomoveis/public_html/...
这是错误:
Warning: SplFileInfo::openFile(/storage/5/99/da/tmpmileniomoveis/public_html/tmp/cache/persistent/myapp_cake_core_cake_dev_en-us): failed to open stream: Permission denied in /storage/e/ca/fa/novomileniomoveis/public_html/Cake2.2/Cake/Cache/Engine/FileEngine.php on line 313
Warning: SplFileInfo::openFile(/storage/5/99/da/tmpmileniomoveis/public_html/tmp/cache/persistent/myapp_cake_core_cake_dev_en-us): failed to open stream: Permission denied in /storage/e/ca/fa/novomileniomoveis/public_html/Cake2.2/Cake/Cache/Engine/FileEngine.php on line 313
Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /storage/e/ca/fa/novomileniomoveis/public_html/Cake2.2/Cake/Cache/Cache.php on line 309
Warning: /storage/5/99/da/tmpmileniomoveis/public_html/tmp/cache/models/ is not writable in /storage/e/ca/fa/novomileniomoveis/public_html/Cake2.2/Cake/Cache/Engine/FileEngine.php on line 336
Warning: SplFileInfo::openFile(/storage/5/99/da/tmpmileniomoveis/public_html/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /storage/e/ca/fa/novomileniomoveis/public_html/Cake2.2/Cake/Cache/Engine/FileEngine.php on line 313
答案 0 :(得分:0)
我遇到SplFileInfo问题,试图从测试服务器访问路径。
应用程序文件的路径是缓存的内容之一,每当更改应用程序中的基本内容时删除所有tmp文件,尤其是缓存:
cd app
rm -rf tmp/cache/*/*