2
votes

I have been testing with a ZF 1.11 site on an Apache server for months now. I tried to run some tests this morning and my site just hung (entered url and my browser just says waiting for a reply from ...). I am pretty good at fixing exceptions in my code but I never even get an exception. I must have changed something but I have spent 5 hours on this so far and I am stuck.

I have switched the site from https to http (and restarted httpd many times).

I refreshed all my php code from what I have working on a production server (clone of dev server with different certs.)

I changed logging to debug in the httpd conf file.

I can see the debug messages in the log when I hit the server:

[Tue Nov 22 12:40:25 2011] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 0 in child 30181 for worker proxy:reverse
[Tue Nov 22 12:40:25 2011] [debug] proxy_util.c(1837): proxy: worker proxy:reverse already initialized
[Tue Nov 22 12:40:25 2011] [debug] proxy_util.c(1934): proxy: initialized single connection worker 0 in child 30181 for (*)

I can see the access time on the Bootstrap.php file change everytime I refresh the browser. looked at the httpd logs and I see the request but all I see is the request.

Sometimes the modified time on my controller (IndexController.php) updates but not always ??

I initialize the logger in my Bootstrap so I added a call to print a message saying that the line had been hit. After a typo that produced an exception message in the browser, I now get messages in my log sometimes... but not always.

I can access files in my public/images directory through the browser just fine. Another site on this server also works.

I updated php.ini to send debug messages to syslog and except for the exception I mentioned above. I do not see any errors.

I think what I need is some guidance on how to follow the flow through the Zend framework. I am guessing the problem is in the Bootstrap or shortly thereafter. Here is my Bootstrap.php. It's pretty simple.

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    // anything here that starts with "_init" will be run at startup

    protected function _initSession() {
        $doctypeHelper = new Zend_View_Helper_Doctype();
        $doctypeHelper->doctype('XHTML1_TRANSITIONAL');

        Zend_Session::start();

    }

    protected function _initLog() {
        $options = $this->getOptions();
        $logpath = $options['logpath'];

        $logger = new Zend_Log();
        $writer = new Zend_Log_Writer_Stream($logpath);
        $logger->addWriter($writer);

        Zend_Registry::set("logger", $logger);

        $logger->log("Bootstrap.php - initLog complete", Zend_Log::INFO);
    }

    public function _initDbAdapter() {
        $resource = $this->getPluginResource('multidb');
        $resource->init(); // Don't forget to initialize the resource first

        $cpDB = $resource->getDb('cp');
        $openfireDB = $resource->getDb('openfire');

        Zend_Registry::set('cpDB', $cpDB);
        Zend_Registry::set('openfireDB', $openfireDB);

    }
}

Any pointers would be appreciated.

Ken

3
I would also enable DB profiling - may be it is some long long queryheximal
Good suggestion. I actually removed the _initDbAdapter routine and it did not help. I use ldap for login and I checked and restarted that service too.Ken
Why are you guessing? Hook up a debugger (xdebug) and you'll know exactly where it is hanging.John Watson
What does your httpd error_log file show?Yes Barry

3 Answers

1
votes

We had a very similar issue with a new server deployment and turning off IPV6 fixed it.

0
votes

This is not a php error. Is an Apache one, probably related with Apache upgrade.Try to disable proxy related modules in Apache. See this discussion.

a2dismod proxy proxy_connect proxy_ftp proxy_http  proxy_ajp proxy_balancer proxy_html proxy
0
votes

xdebug was what I needed to figure out what was going on.