Create one php app with mongodb cartridge, when accessing the php page, it will create mongo connection, if mongo db stop, it also returns 200. content of php/mongo.php --------------------------------------------------------- <?php header('Content-Type: text/plain'); $m = new Mongo($_ENV['OPENSHIFT_MONGODB_DB_URL']); #$dbname = "<database_name>"; #$db = $m->$dbname; $db = $m->$_ENV['OPENSHIFT_APP_NAME']; $coll = $db->factory; $count = $coll->find()->count(); if($count == 0) { $insert = array("version" => "1"); $coll->insert($insert); } # Accessing the page without arguments if(empty($_GET["version"])) { $obj = $coll->findOne(); $m->close(); echo "version ".$obj["version"]; } else { $coll->remove(); $insert = array("version" => $_GET["version"]); $coll->insert($insert); $m->close(); echo "The mongodb factory is modified\n"; } ?> -----------------------------------------------------
I tracked this down to this: http://bugs.xdebug.org/view.php?id=587 If you install php-pecl-xdebug, PHP files with errors in them come back with a status of 200. If you uninstall that RPM, the status will come back correctly as 500.
Thanks @Andy, so we should be able to fix this bug once we're able to complete the following Trello card: https://trello.com/c/lbjDOA6S. Then users will be able to turn off the Xdebug and thus get rid of this behaviour.
Closing UPSTREAM: RHEL 6 - bug 1053301 Workaround for OpenShift Origin PHP cartridge - Trello card https://trello.com/c/lbjDOA6S
Fixed in php-pecl-xdebug-2.1.4-2 reportedly. Once the RPM is available for update, we can fix this.
RPM is still not available. We need to wait for new RHSCL release/update.
Verified on devenv_5549. Both php-5.3 and php-5.4 works.