douyue1481 2016-11-11 20:01
浏览 124
已采纳

找不到类 - PHP服务器配置?

So I'm working from a laptop, and I'm developing a PHP application. Being allowed to work from home, I installed EasyPHP on the laptop so I can host the web application locally on the laptop and work even when not connected to the internet, and without the use for a VPN connection, and even for when I'm at work, no need to mess with FileZilla or whatever, everthing will be so much easier like that for me.

My problem is the following: from our dev server, at work, everything is good. I copied the whole code in my easyphp folder, and I make a duplicate of my database in my local MySQL server. Running the application on my work's dev server, everything is fine. But locally, I get the following error:

Fatal error: Class 'ConfigNamespace' not found in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\MyApplication\libs\config\ConfigParser.php on line 50

So my ConfigParser class calls a New ConfigNamespace() at line 50... The local server doesn't like it. The ConfigNamespace class sits next to the ConfigParser class, in the \libs\config folder. Why does t not work locally, but works on the dev server?

I am under the impression that the configuration of the servers are different, and that my local server decides to expect all the classes to be in the root folder... but it's not!

I've searched on the web but only found things regarding system classes being unreachable... nothing that really has anything to do with my problem.

Thanks,

  • 写回答

1条回答 默认 最新

  • dsd30433 2016-11-14 13:24
    关注

    I fixed it. It ended up being a problem with rights on the folders after all. I did give it all the rights, but windows somehow still blocked it... I changed my document root for another folder, not in program files, and now everything works!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 docker环境配置
  • ¥20 绿盟安全扫描--检测到目标站点存在javascript框架库漏洞
  • ¥30 Android STD快速启动
  • ¥15 如何使用simulink建立一个永磁同步直线电机模型?
  • ¥30 天体光谱图的的绘制并得到星表
  • ¥15 PointNet++的onnx模型只能使用一次
  • ¥20 西南科技大学数字信号处理
  • ¥15 有两个非常“自以为是”烦人的问题急期待大家解决!
  • ¥30 STM32 INMP441无法读取数据
  • ¥15 R语言绘制密度图,一个密度曲线内fill不同颜色如何实现