简体   繁体   English

部署CakePHP自定义助手的问题

[英]Issues with Deploying CakePHP Custom Helper

I've been following a tutorial for implementing auto-complete functionality on my CakePHP 1.3 application. 我一直在遵循有关在CakePHP 1.3应用程序中实现自动完成功能的教程 All of the source relevant to this approximately matches that code. 与此相关的所有源均与该代码大致匹配。

I've successfully implemented it on my local WAMP, but when deployed to my LAMP server, the app breaks (the html page only renders up to the form where the AutoCompleteHelper input function is called). 我已经在本地WAMP上成功实现了它,但是将其部署到LAMP服务器时,应用程序中断了(HTML页面仅呈现为调用AutoCompleteHelper输入函数的形式)。

Using log statements, I see the input function fails at.. 使用日志语句,我看到输入函数失败了。

$options = array_replace($baseOptions,$options);

in the AutoCompleteHelper's input() method. 在AutoCompleteHelper的input()方法中。 I don't seem to get any error output. 我似乎没有得到任何错误输出。 Below is the output of $options: 以下是$ options的输出:

Array
(
    [autoCompleteUrl] => /catalog/bands/auto_complete
    [autoCompleteRequestItem] => autoCompleteText
)

This doesn't look amiss to me. 这对我来说似乎不对。

Also, I found a similar, though closed, issue on Stack which made me think I may have some sort of tweak outside of Cakephp to make. 另外,我发现了一个类似的,但封闭的问题上堆栈这让我觉得我可能有某种TWEAK的CakePHP的外面进行。 The more I look into this the more I think this may not be needed, but I figure it's a good point of reference. 我研究的越多,就越不需要,但是我认为这是一个很好的参考。

Where do I go from here to troubleshoot this? 我从哪里去解决这个问题?

It's going to be difficult for anyone to troubleshoot this for you. 任何人都很难为您解决此问题。 Especially if it is working on your localhost but not another lamp environment. 特别是如果它在您的本地主机上运行,​​而不是在另一个灯泡环境下运行。 Chances are it's a configuration issue. 可能是配置问题。 Here are a few things to look into that may push you in the right direction: 以下是一些可能会推动您朝正确方向发展的事情:

  • have you checked the file permissions of the files being called 您是否检查了被调用文件的文件权限
  • have you confirmed the file actually exists and is not missing 您是否已确认文件实际存在并且没有丢失
  • have you checked the servers error log 您检查服务器错误日志了吗
  • have you tried turning on debug in core.php to see if an error is being displayed on screen 您是否尝试在core.php中打开调试以查看屏幕上是否显示错误

Hopefully this will push you in the right direction. 希望这会把您推向正确的方向。

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

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