dongque1646 2013-09-29 08:08
浏览 56
已采纳

CodeIgniter on 1and1错误报告

I made a website with CodeIgniter and I am currently hosting it with 1and1. During development, everything looked golden. Only if all hosts were as reliable as localhost.

I am looking to get the PHP error logs from the site. Unfortunately, 1and1 does not allot access to their Apache logs. How can I get error logs? Debugging fatal errors is a pain without logs.

What I have tried?

  1. The custom error logging function
  2. Modifying the local PHP.ini to allow/log errors
  3. Used php5 by adding the necessary AddHandler and AddType clauses to my .htaccess

Still the problem is not fixed.

Update (October 1st)
Still trying to fix my issue, I have narrowed it down to the PHP ActiveRecord spark. The models which inherit from PHP ActiveRecord are not instantiated. PHP ActiveRecord's ActiveRecord\Model class is instantiated. I did this using the following snippet

    $class_name = "ActiveRecord\Model";
    echo in_array($class_name, get_declared_classes());

which returns a 1 for ActiveRecord\Model and 0 for MyActiveRecordModel.

Supposedly, there is some friction between the ActiveRecord spark and and 1and1—my guess, DB problems. Here comes the interesting part. Using the ActiveRecord library provided by CodeIgniter works like a charm. I presume PHP ActiveRecord is printing some errors of what is going wrong. This is what I want to get from 1and1.

Update (October 8th) If I manually require MyActiveRecordModel, the code snippet that checks for definition of classes claims ActiveRecord\Model is not defined.

  • 写回答

1条回答 默认 最新

  • duanchique1196 2013-10-08 05:03
    关注

    This issue is solved by changing the naming conventions. The file which had MyActiveRecordModel was named myActiveRecordModel. This did not allow CodeIgniter to autoload the required class.

    I got this tip from a list of steps for upgrading CodeIgniter to version 3.0.0—although, I am on version 2.1.3

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

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化