I have a problem with my site. After upgrading to mySQL 5.6, then the host povider did a recompilation of Apache and PHP. apparently they also upgraded the WHM cPanel.
as for now my site can display properly, but when tried to login, it can't find the specific page requested.
The error Message:
The requested URL /main/cek_login was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
error messages from cPanel:
[Mon Dec 22 10:10:58 2014] [error] File does not exist: /home/xxx/public_html/main [Mon Dec 22 10:10:56 2014] [error] File does not exist: /home/xxx/public_html/404.shtml
My analyses so far:
CI version : 2.2
PHP Version : 5.4.3.5
mySQL version : 5.6.21
cPanel Version 11.46.1 (build 4)
main -> is actually a file called main.php
cek_login -> is a function inside main.php that run verification against record in user table.
the folder structure as follows.
/home
/application
/controllers
/main
/view
/login_view
/system
/assets
/cgi-bin
The code as follows
<div class="loginForm">
<?=($_GET[ 'error'])? "<div class='alert'>$_GET[error]</div>": ""?>
<form class="form-horizontal" action="<?php echo base_url().'main/cek_login'; ?>" method="POST">
config.php inside application folder
$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI'; -> tried AUTO before, but useless. Previously was AUTO
.htaccess in root folder
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
.htaccess in another folder
deny from all
routes.php
$route['default_controller'] = "main";
$route['404_override'] = 'not_found';
I tried to see config files as well and tried a lot of tricks before posting this.
my suspicion is on the base_url function or the routing mechanism. I am not sure.
I am NEW to Code Igniter or PHP, also in Server Administration. my strength lies in Database.
Please help on narrowing the root problem.
best regards, Ridwan
other controllers are accessible, please postbase_url,htaccessand routes if you have any.