Guten Tag! Ich versuche, Ruhe für Winkel mit Phalcon zu erstellen - https://github.com/cmoore4/phalcon-restPhalcon REST - cmoore4/phalcon-rest
Hallo! Ich habe ähnliche Fehler https://github.com/cmoore4/phalcon-rest/issues/10 Aber ich kann es nicht lösen.
Ich habe Datenbank (ini)
[database]
dbname = orcl
username = root
password = root
Dienst
$config = new IniConfig('Database.ini');
$di->set('dbOracle', function() use ($config) {
return new \Phalcon\Db\Adapter\Pdo\Oracle(
array(
"username" => $config->database->username,
"password" => $config->database->password,
"dbname" => $config->database->name
)
);
}, true);
In Models Ordner
namespace PhalconRest\Models;
use \PhalconRest\Exceptions\HTTPException;
class Users extends \Phalcon\Mvc\Model {
public function getSource() {
return 'Users';
}
}
In Controller versucht
class UsersController extends RESTController {
protected $allowedFields = array(
'search' => array('id', 'login'),
'partials' => array('id', 'login')
);
$users = Users::find();
Und erhalten 502 Bad Gateway nginx.
error.log
*20 recv() failed (104: Connection reset by peer) while reading response header from upstream
Bitte, können Sie mir helfen?
Wie wäre es http://phalcon-rest.redound.org Did du hast es versucht? – klay