0

I am developing a system in Zend Framework and I implemented user/rol authentication using Zend_Auth for security and it work receiving user/password information and return the Model User with each user's rol.

In my global layout, I have a big banner that redirect to Home some/path/default/index/index and then inside IndexController, I redirect to user's home page that depends of its roles. When I work on Windows I have no problems. But when I work in my Ubuntu, the _redirect function of Zend Framework throw a Doctrine's Exception

Uncaught exception 'Doctrine_Connection_Pgsql_Exception' with message 'SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: ""

But the error begin in Zend Broker.

I using a Plugin in my Front Controller to know if user can or cannor access to certain page. How can I solve that error?

This is my stack trace:

Fatal error: Uncaught exception 'Doctrine_Connection_Pgsql_Exception' with message 'SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: ""' in /home/project/library/Doctrine/Doctrine/Connection.php:1082 Stack trace: #0 /home/project/library/Doctrine/Doctrine/Connection/Statement.php(269): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement)) #1 /home/project/library/Doctrine/Doctrine/Connection.php(1006): Doctrine_Connection_Statement->execute(Array) #2 /home/project/library/Doctrine/Doctrine/Query/Abstract.php(976): Doctrine_Connection->execute('SELECT u.usuari...', Array) #3 /home/project/library/Doctrine/Doctrine/Query/Abstract.php(1026): Doctrine_Query_Abstract->_execute(Array) #4 /home/project/library/Zend/Controller/Plugin/Broker.php on line 336

Thanks in advance

4

1 回答 1

0

从技术上讲,大多数助手(尤其是这个助手)在任何平台上都以相同的方式工作。为了帮助您找出问题所在,我有两个建议。

确保您在两个系统上处于相同的环境中。如果其中一个是 APPLICATION_ENV '开发者',而另一个是'生产',这可能会导致不同系统上的不同行为。

另一件事是确保您设置了您认为设置它的环境。一些教程提倡通过 SetEnv APPLICATION_ENV 开发人员(例如)在 .htaccess 文件中设置环境,因此您在 public/index.php 中设置的任何内容都可能根本没有设置。

另一种想法是,两个系统上的包含路径可能预设(在 public/index.php 之前)不同。

希望这有助于这个过程:)

于 2013-01-25T11:15:00.483 回答