Magento扩展404错误

Jon*_*ono 5 php xml linux macos magento

我很难过!

我有一个自定义扩展,在Mac Leopard本地工作得很漂亮,但是在推送到主机(Centos Linux)后,当我尝试调用前端路由器时,我收到Magento 404错误.

例如,此URL:[domain] /shop/index.php/bbyd_sync/index/生成404但在本地返回"done".

这是我的config.xml:

<config>
<modules>
    <Bbyd_Sync>
        <version>0.1.0</version>
    </Bbyd_Sync>
</modules>
<crontab>
    <jobs>
        <bbyd_sync>
            <schedule>
                <cron_expr>*/5 * * * *</cron_expr>
            </schedule>
            <run>
                <model>sync/run::runAll</model>
            </run>
        </bbyd_sync>
    </jobs>
</crontab>
<frontend>
    <routers>
        <sync>
            <use>standard</use>
            <args>
                <module>Bbyd_Sync</module>
                <frontName>bbyd_sync</frontName>
            </args>
        </sync>
    </routers>
</frontend>
<admin>
    <routers>
        <wrapper>
            <use>admin</use>
            <args>
                <module>Bbyd_Sync</module>
                <frontName>syncadmin</frontName>
            </args>
        </wrapper>
    </routers>
</admin>
<adminhtml>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <bbyd translate="title" module="run">
                                        <title>BBYD Sync</title>
                                        <sort_order>808</sort_order>
                                    </bbyd>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
    <translate>
        <modules>
            <Bbyd_Sync>
                <files>
                    <default>BBYD_Sync.csv</default>
                </files>
            </Bbyd_Sync>
        </modules>
    </translate>
</adminhtml>
<global>
    <models>
        <sync>
            <class>Bbyd_Sync_Model</class>
            <resourceModel>sync_mysql4</resourceModel>
        </sync>
        <sync_mysql4>
            <class>Bbyd_Sync_Model_Mysql4</class>
            <entities>
                <run>
                    <table>bbyd_sync</table>
                </run>
            </entities> 
        </sync_mysql4>
    </models>
    <helpers>
        <sync>
            <class>bbyd_sync_helper</class>
        </sync>
    </helpers>
    <resources>
        <sync_setup>
            <setup>
                <module>Bbyd_Sync</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </sync_setup>
        <sync_write>
            <connection>
                <use>core_write</use>
            </connection>
        </sync_write>
        <sync_read>
            <connection>
                <use>core_read</use>
            </connection>
        </sync_read>      
    </resources>  
</global>
<default>
    <bbyd>
        <setup>
            <send_new_customer_account_email>0</send_new_customer_account_email>
        </setup>
        <cron>
            <log_file_name>bbyd_sync.log</log_file_name>
        </cron>
    </bbyd>
</default>
Run Code Online (Sandbox Code Playgroud)

我的IndexController.php

class Bbyd_Sync_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction() {
        echo "done";
    }
}
Run Code Online (Sandbox Code Playgroud)

我的app/code/local结构(我在这里使用字母大小写):

Bbyd
    Sync
        controllers
            IndexController.php
        etc
            config.xml
            system.xml
        Helper
            Data.php
        Model
            Run.php
            Mysql4
                Run.php
        sql
            sync_setup
                mysql4-install-0.1.0.php
Run Code Online (Sandbox Code Playgroud)

当然我也有/app/code/etc/modules/Bbyd_Sync.xml.

有人对Magento的Mac和Linux平台之间发生的问题有一些好主意吗?也许是文件/目录的大写?

顺便说一下,这是Magento 1.5.

任何帮助表示赞赏...(我的第一个要求所以请温柔!)

Ala*_*orm 12

步骤0:清除实时服务器上的缓存和会话.

步骤1:使用免费/开源模块列表模块检查您的模块是否已安装

步骤2:使用以下方法删除一些调试代码.var_dumps将告诉您Magento的路由器在您的模块中寻找哪些文件/类,但无法找到.

File: app/code/core/Mage/Core/Controller/Varien/Router/Standard.php

protected function _validateControllerClassName($realModule, $controller)
{
    $controllerFileName = $this->getControllerFileName($realModule, $controller);
    if (!$this->validateControllerFileName($controllerFileName)) {
        var_dump($controllerFileName);
        return false;
    }

    $controllerClassName = $this->getControllerClassName($realModule, $controller);
    if (!$controllerClassName) {
        var_dump($controllerFileName);
        return false;
    }

    // include controller file if needed
    if (!$this->_includeControllerClass($controllerFileName, $controllerClassName)) {
        var_dump($controllerFileName);
        return false;
    }

    return $controllerClassName;
}   
Run Code Online (Sandbox Code Playgroud)

第3步:调试404页面.