Hi, I've a very odd issue, I was working with Phalcon Micro to create a Rest API, on my development server (PHP 5.6, Phalcon 2.0.13, Apache, Ubuntu 16) works like a charm, but I moved the code to the production server (AWS Instance, PHP 5.6, Phalcon 3.0.1, Apache, Ubuntu 16) and seem that not working like the development server because the ‘GET’ function of the Micro is not working but the ‘POST’ does. Here is an example:
use Phalcon\Mvc\Micro,
Phalcon\Http\Response,
Phalcon\Http\Request;
$app = new Micro();
$app->get('/say/{id}', function($id){
echo $id;
}
$app -> handle();
This is working on my development server but the production server it doesn’t. On the production server I get a 404 when I request x.x.x.x/users/say/1234567
use Phalcon\Mvc\Micro,
Phalcon\Http\Response,
Phalcon\Http\Request;
$app = new Micro();
$app->post('/', function(){
$request = new Phalcon\Http\Request();
// Get the user data from the request
$user_data = $request->getJsonRawBody();
print_r($user_data);
}
$app -> handle();
And the odd part is that this code is working in both servers. *Both codes are examples not actual code.
So, something changed between versions so I need to change my code, or is something I miss on the setup. Thank you very much for your time.
Regards!