1

I'm working as technical PM for a project that is using PHP, Zend and Redis to run a game.

We are doing a publishing service and I got a problem while I was trying to deploy a build I got from developers. I got this error when I tried to start the server.

Fatal error: Uncaught exception 'RedisException' with message 'Connection closed' in [no active file]:0 Stack trace: #0 {main} thrown in [no active file] on line 0

I thought it was Redis connection at first place. But I tried telnet it and also hard code PHP Predis to set/get Redis data via simple socket programming script. It was working.

So I tried to comment out each line of codes and I reach to the line that is Zend framework as:

    <?php
    ...
    try {
         Zend_Session::start();

         Game_Db_Db::init();       // <-- This is also failed if I commented out above Zend_Session::start();
    } catch (Exception $e) {
         echo $e->getMessage() . '<br>';
         echo "Error";
    }
    ...
    ?>

I tried to look it up on the other question and found out this.

Zend_Session / Zend_Auth randomly throws Error Message ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13)

The above question suggest that the problem was about the write permission. However my case is different because I'm using Redis for session.save_path="tcp://xx.xx.xxx.xxx:xxxx" instead of local path.

As I mentioned before I tested Redis set/get key value successfully. So I think that the problem might be different.

Developers are trying to solve the problem but it has been taking to long for this single problem.

If you can point me out any ideas where should I take a look, it would be more than enough.

Thank in advance.

Community
  • 1
  • 1
Zeal
  • 11
  • 5

1 Answers1

0

I had the same Issue, in my case i first check if the ini settings works correct in a separate File (without the Zend Framework).

<?php
var_dump(ini_get("session.save_handler"));
var_dump(ini_get("session.save_path"));

If the php.ini works correct check if there are some Setting in the Zend Config see http://framework.zend.com/manual/2.0/en/modules/zend.session.global-session-management.html or grep for "save_path" in the Zend Project.

Soeren
  • 11
  • 3
  • I created your little snippet php script and it showed `string(5) "redis" string(20) "tcp://localhost:6379"`. I wonder where to look next. I'm facing the same error message as described in the question above. – Stephane Oct 22 '16 at 10:41