Basic Codeigniter setup on XAMPP isn't working

I installed the latest version of Codeigniter on my XAMPP install on Windows 7... however after following the basic first steps I seem to have completely borked something as basic hello world pages are not working (page not found).

Can anyone help point me to details about a correct install folder structure or provide help with what I've got so far?


and thus:


Is this correct or have I done something dumb... e.g. is the "codeigniter" directory supposed to be there or should "application" and "system" be dropped directly inside the htdocs directory?

Even if someone has a basic setup with a single working Model, View, & Controller as a package I could peek at I'd love to see the setup... Its driving me nuts that I can't seem to get a simple setup to work.

[eluser]Jason McCallister[/eluser]
When you install XAMPP the default site runs in the htdocs directory. Therefore, would resolve to C:\xampp\htdocs.

If you are placing CI into a new directory, such as CodeIgniter, you would have to view the url:

So the structure would look like this:


However, if you dropped the application, system, index.php and user_guide directly into the htdocs directory it would resolve at

That being said, the advantage to placing the files inside the CodeIgniter directory means that you could run more than one application at a time (i.e and

Also, if you rename the system or application directory be sure that you change the index.php to reference the name changes.

Does that help a little bit?

You can change for http://localhost::port.

Thanks, it does help to know that I haven't completely messed things up and that it should work as installed in my htdocs directory.

However since my environment isn't working properly at all I think I'm going to backup any code I've created so far and try re-installing both xampp and CI.

As I run through the steps next time I'll post a question as soon as I get stuck which will hopefully find the root cause of my install issue(s). ;-)

[quote author="Jason Hudnutt" date="1354505795"]...

Does that help a little bit? [/quote]

Just a quick check
http://localhost - should run the xampp default directory. If not then this is your problem

also check your hosts file (normally found in "C:\windows\system32\drives\etc\")
make sure it contains these 2 lines and they are not commented (remove any "#" prefix)
Code:       localhost
::1             localhost

Also as a rule any new codeigniter site that I make i make an entry in the host file for that site
Code:       mynewsite
And so the url to this site is http://mynewsite

In addition to that I place my codeigniter site somewhere other than the htdocs folder.
eg: D:\webdev\mynewsite

Finally in the file c:\xampp\apache\conf\extra\httpd-vhosts.conf
my setup for all my sites (including xampp) will look like this:
# Web site(s) dev environments
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost

<VirtualHost *:80>
DocumentRoot "D:\webdev\mynewsite"
<Directory "D:\webdev\mynewsite">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
ServerName mynewsite

any changes you make to the apache conf file require the apache server to be restarted.
Also you should note that all the additional lines for mynewsite are in the conf file purely because I need to set permissions up as it's not in the installed htdocs filder (which has all permissions).
If you want to continue to use htdocs then just set the mynewsite section in the conf file as follows:
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\mynewsite"
ServerName mynewsite

Hope that's of some help to you

Note: These settings are for the latest apache version which you will have as you're using the latest xampp.
For anyone wishing to do this on an older version of apache the conf file is configured differently

Thanks @Ckirk that was helpful and things seem to be working now... or at least working more.

I'll continue with what I have then and see if I can't get a dynamic page to work. ;-)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.