CI on localhost - blank index, unfound controller |
[eluser]mabright[/eluser]
OK, after reading a few threads and post, I still have not resolved my issue. I have successfully used CI in the past on hosted servers, this time I am trying to use it on my local machine but I get a blank page, etc. I have apache 2.2 and PHP 5 installed. Apache workes and I verified PHP is working. For the sake of this thread, let's say my website is called wackamole. If I go to http://localhost/wackamole I see the following. Index of /wackamole Parent Directory .buildpath .project .settings/ application/ css/ img/ index.php license.txt scripts/ system/ user_guide/ If I click index.php, I get a blank screen. I created a controller called main, if I go to localhost/wackamole/main, I get "The requested URL /wackamole/main was not found on this server.". My settings are : Config.php $config['base_url'] = 'http://localhost/wackamole/'; $config['index_page'] = ''; Routes.php $route['default_controller'] = "main"; My .htaccess is like below. Code: <IfModule mod_rewrite.c> Looks like I get the below error in my apache error log. [Wed Mar 13 12:07:26 2013] [error] [client 127.0.0.1] client denied by server configuration: C:/webdev/htdocs/wackamole/.htaccess
[eluser]InsiteFX[/eluser]
Try this: Code: <IfModule mod_rewrite.c>
[eluser]Harold Villacorte[/eluser]
Maybe try adding this to .htaccess: Code: DirectoryIndex index.php
[eluser]InsiteFX[/eluser]
He may also need to add this to his .htaccess file also. Code: Options +FollowSymLinks
[eluser]mabright[/eluser]
I update .htaccess, I think the update solved the apache issue, I no longer see the access error in the apache log. However, still blank. I go to wackamole/index.php (blank), wackamole/index.php/main (blank), wackamole/main ("The requested URL /wackamole/main was not found on this server."). Code: <IfModule mod_rewrite.c> main.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]mabright[/eluser]
[quote author="Harold Villacorte" date="1363201171"]Does it work without .htaccess?[/quote] No, not really. I made a change to the apache httpd file (see below) and now the site is all whacky. I just want to start working on my new code and I am losing my mind trying to setup the environment. Now when I go to localhost/wackamole I no longer see a directory list, I guess this is a good thing. When I go to localhost/main, the URL switches to localhost/wackamole/index.php/main but still the page is blank. There is no log in the application log folder. Can someone verify my httpd file settings (see attached) and my .htaccess (below)? Code: <IfModule mod_rewrite.c> Code: # DocumentRoot: The directory out of which you will serve your
[eluser]Harold Villacorte[/eluser]
If CI is not working out of the box then it's probably a server or php config issue. If it were me I would not waste any time trying to configure apache on windows, I would just start with a fresh xampp install which should not need any configuration.
[eluser]Aken[/eluser]
How has no one mentioned error reporting being disabled yet? It's by far the most common reason behind a blank page...
[eluser]mabright[/eluser]
[quote author="Aken" date="1363206421"]How has no one mentioned error reporting being disabled yet? It's by far the most common reason behind a blank page...[/quote] $config['log_threshold'] = 1; Is there another setting I need to maintain for logging? |
Welcome Guest, Not a member yet? Register Sign In |