Welcome Guest, Not a member yet? Register   Sign In
Its supposed to be easy, right?
#1

[eluser]jodomama[/eluser]
I am on a windows XP with php 5. I just installed Code Igniter and started to follow the user guide, trying to make a simple Hello world page. I only get "The page canot be found". No clue why. Sorry for being too much newbie for you.
#2

[eluser]gtech[/eluser]
hello jodomama, welcome to CI. create a file called temp.php in your controllers dir

then cut and paste this code.
Code:
<?php
class Temp extends Controller {
    function Temp() {parent::Controller(); }
    function index() {echo "hello"; }
}
?>
then browse to http://<HOST>/<CI INSTALL>/index.php/temp/

check config/config.php check base_url is set correctly and index_page is set correctly.. if that does not work then try and follow the trouble shooting section in the guide.
#3

[eluser]megabyte[/eluser]
You need to play around with your config/config.php file

these areas to be exact:


Code:
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = "index.php?"; // try adding a "?"
Code:
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'        Uses the REQUEST_URI
| 'ORIG_PATH_INFO'    Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol']    = "AUTO";
#4

[eluser]jodomama[/eluser]
I am using IIS and CI is configured as default web site
values in config/config.php are:

$config['base_url'] = "http://127.0.0.1/";

$config['index_page'] = "index.php";

I am browsing to http://127.0.0.1/index.php/temp/ but I still get a 404.
#5

[eluser]gtech[/eluser]
then try what megabyte suggests, as that is what the troubleshooting guide suggests you should do. [url="http://ellislab.com/codeigniter/user-guide/installation/troubleshooting.html"]http://ellislab.com/codeigniter/user-guide/installation/troubleshooting.html[/url]
#6

[eluser]jodomama[/eluser]
I tried all the alternatives under URI protocol both with a question mark after index.php and without it as suggested in trouble shooting... same result.
#7

[eluser]Jay Turley[/eluser]
Try troubleshooting from the beginning. I'm running CI on XP with no problem at all.

1) Is IIS service on and serving up pages correctly? (put a .html file in your c:\inetpub\wwwroot directory and see if you can see it)

2) Is php configured correctly? (put a simple &lt;?php echo "hello" ?&gt; php page in your root internet directory and see if you can see it and that php is set up correctly)

3) If (1) and (2) are working properly, then get rid of your CI installation and put in a fresh copy. Follow the configuration guide step by step. I swear it works.
#8

[eluser]jodomama[/eluser]
Yes, IIS is up and working. I see the CI site when I browse to http://127.0.0.1/index.php

Yes, PHP (version 5.2.0) is working properly. I have apprx 60-70 other php sites on this machine that works fine.

And yes, I got a fresh CI install and followed instructions from the beginning. Im puzzled... I check user rights. I restarted IIS. I cleared the cache. I even rebooted the machine. I followed install instructions. I pasted the Temp class in a file called temp.php and put in in system/application/controllers folder. Same result. What am I missing... ?
#9

[eluser]jodomama[/eluser]
OK, if I edit the file system/application/controllers/welcome.php I see the changes on the start page. At least That works. Could someone give me a clue from here?
#10

[eluser]gtech[/eluser]
[strike]
what you could do as a test is put a test.html file in the root of your install (where the index.php file and system directory lives) and then try and browse to it.
test.html
Code:
<h2>HELLO WORLD</h2>
http://127.0.0.1/test.html. At least then you know you a re trying to browse to the correct place.[/strike] (ah you can see welcome page)




Theme © iAndrew 2016 - Forum software by © MyBB