Welcome Guest, Not a member yet? Register   Sign In
[RESOLVED][Apache/PHP5] Accessing controllers throws an 404 error
#1
Question 
(This post was last modified: 01-24-2018, 06:46 AM by dfun.)

Hey!

I'm rather new to CodeIgniter, but I want to use it to implement a RESTful API server for a project at work.
I downloaded a fresh copy of version 3.1.7, unpacked it, installed the dependencies via composer and put it on our local development server.
At first glance it worked as intended, it showed the Welcome controller without any troubles.

I then created my own controller with the documentation as a guideline. After then trying to access it like described in the docs all it gave me was an 404 Not Found error from the Apache Server.
(tried: http://server.local/ciproject/index.php/orders/ and http://server.local/ciproject/orders/)


After trying several things with the config.php and their options, modifying the .htaccess, even changing the main index.php paths to be absolute paths to my project.... still no luck. The CI logger option didn't even seem to note anything when I tried calling the controller, so to me it looks like as if the Apache/PHP just ignores something and tries to find a directory called like the controller, but obviously can't.
(For reference: I can access the controller via the http://server.local/ciproject/index.php?c=orders option when I activate it in the config.php)

On my local machine with a standard XAMPP (PHP5) installation CodeIgniter controller handling works like intended without any troubles. (So I doubt that the Controller has any issues whatsoever.)

My colleague who maintains our servers has no idea what the issue might be, same with me. I do either suspect the Apache2 server itself or maybe something with the PHP configuration. But what would cause said issues?

I'd really appreciate if anyone here can help me out or maybe even had the same problem. For now I'm kinda forced to start developing on my local machine, until the issues on the development server are fixed.

Thank you!
Reply


Messages In This Thread
[RESOLVED][Apache/PHP5] Accessing controllers throws an 404 error - by dfun - 01-24-2018, 12:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB