简体   繁体   中英

Issues with Deploying CakePHP Custom Helper

I've been following a tutorial for implementing auto-complete functionality on my CakePHP 1.3 application. 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).

Using log statements, I see the input function fails at..

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

in the AutoCompleteHelper's input() method. I don't seem to get any error output. Below is the output of $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. 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

Hopefully this will push you in the right direction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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