A very strange occurance. |
I've been using codeignitor off and on since pre 1.5 days if I remember right. I occasionally use it to help write utilities on personal web servers for private use mostly. I've always loved it.
Anyway, I figured I'd give the pro's a crack at this head scratcher. As I'm sure someone will go, "well it'd probably help if you weren't doing x wrong", and make a right fool of myself. Now, keep in mind this is an older server which is why I haven't gone the route of wiping it and installing the latest slackware/LAMP. I had written a pastebin clone application at one time for personal use on a private server some years ago, and had need of it again. I attempted to get the old code base to work again to no avail. Working backwards I'm down to a clean install of the same version of ci that it was written on(1.7.2). With this clean install, I've figured out the problem is coming from the controllers. All controllers follow the same pattern, none will load the controllers default view unless it is the only function available to it. For example: PHP Code: <?php Works, but: PHP Code: <?php What happens is that upon http://server/cidir/controller/ it calls newfunction() and flatly refuses to call index(), nor can I call newerfunction() no matter how many crude hacks I try. Nor has anything of import changed on the old server since it's last update a couple of years ago. I've gone through every conceivable idea I've been able to muster, and am looking longingly at the shotgun to put the old server out of my misery. I have gone through everything from possible path issues, to aliens and have come up with nothing. I've never seen it behave this way.
Check the error log of the server.
The code looks very old I think it is a compatible issues with php. (11-12-2016, 01:53 AM)Wouter60 Wrote: What's in your application\config\routes.php file? PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); (11-12-2016, 05:58 AM)Paradinight Wrote: Check the error log of the server.Already done. The only errors are random 404's, etc. from passing, unrelated ip address.
I have actually found the answer to this particular conundrum.
Since everything from the code, to the server are of an older flavor, it was coming from how that particular version of php was handling the controller functions. At least, this is how I got it corrected. The server is as follows, Apache 1.3.x with php running 4.4.x. The CI code base was 1.7.x. When naming certain functions in the controllers, I finally got the httpd to throw the error into it's error_log in the form of a fatal error. After renaming the controller functions into wildly unique names, it began to work properly. They had been fairly unique before, and there were no duplicate namings. As for why this occurred, I am at a loss to explain. Nor can I explain why a clean install broke down in the default welcome.php_controller->welcome_message.php_view when a second function was added in the welcome.php controller. But, randomly altering function names fixed each controller. |
Welcome Guest, Not a member yet? Register Sign In |