CodeIgniter Forums
Need help to work the CodeIgniter Tutorial - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Need help to work the CodeIgniter Tutorial (/thread-57347.html)



Need help to work the CodeIgniter Tutorial - El Forum - 03-08-2013

[eluser]Unknown[/eluser]
Hi,

I am new in CodeIgniter and I tried the introduction : http://ellislab.com/codeigniter/user-guide/tutorial/static_pages.html
and I it did not for on my computer. my web server is XAMPP. I don't know how can I run my code using CodeIgniter.

First thing that I do is.
1. Download the CodeIgniter
2. Extracted the files.
3. Put the CodeIgniter Folder to D:\Program Files\xampp\htdocs\CodeIgniter\
4. I read the introduction and to what the instructions said.

and I tried to run this:

http://localhost/CodeIgniter/application/views/pages

and the output is:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403
localhost
3/8/2013 4:37:25 PM
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1


I hope somebody can help me. I really want to learn the CodeIgniter.

Thank you so much.


Need help to work the CodeIgniter Tutorial - El Forum - 03-08-2013

[eluser]Harold Villacorte[/eluser]
Quote:http://localhost/CodeIgniter/application/views/pages
This is correct behaviour. The application folder should not be accessible to the browser.



Need help to work the CodeIgniter Tutorial - El Forum - 03-09-2013

[eluser]greedyman[/eluser]
You can not run this if router and .htaccess are not configed
Quote:http://localhost/CodeIgniter/application/views/pages

At the first time, you should write any controller with some methods and you can access to function like this:
Quote:http://localhost/index.php/controller_name/function_name/id
id is a parameter used pass to function



Need help to work the CodeIgniter Tutorial - El Forum - 03-09-2013

[eluser]InsiteFX[/eluser]
When using XAMPP you need to install it into the root of your hard drive, like c:\xampp it will not work if installed to c:\Program Files




Need help to work the CodeIgniter Tutorial - El Forum - 03-09-2013

[eluser]Unknown[/eluser]
Hi Guys,

Newbie.

So my issue is somewhat similar.

Env - Windows 7/Xampp/CodeIgnitor2.1.3/
Aim - To get the CommunityAuth module to work.
Done - Updated Config File with encryption key and configured the database.php
Status - I am able to access the static page i.e. index view of Community Auth module.
Test Action - Initiate the auto installer for Community Auth (http://localhost/CommunityAuth/init)
Expected Result - Expected the data tables to be created in the Database set
Actual Result - Getting a Object Not Found general redirect to Xampp start page (that's right even the custom 404 page is not displayed)

Code- route.php
Code:
$route['init'] = 'init/index';
$route['default_controller'] = 'static_pages';
$route['404_override']       = 'custom_error_page/error_404';

Log Analysis -
Code:
DEBUG - 2013-03-09 22:15:06 --> Config Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Hooks Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Utf8 Class Initialized
DEBUG - 2013-03-09 22:15:06 --> UTF-8 Support Enabled
DEBUG - 2013-03-09 22:15:06 --> URI Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Router Class Initialized
DEBUG - 2013-03-09 22:15:06 --> No URI present. Default controller set.
DEBUG - 2013-03-09 22:15:06 --> Output Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Security Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Input Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Global POST and COOKIE data sanitized
DEBUG - 2013-03-09 22:15:06 --> Language Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Loader Class Initialized
DEBUG - 2013-03-09 22:15:06 --> Config file loaded: application/config/db_tables.php
DEBUG - 2013-03-09 22:15:06 --> Config file loaded: application/config/authentication.php
DEBUG - 2013-03-09 22:15:06 --> Config file loaded: application/config/google_analytics.php
DEBUG - 2013-03-09 22:15:06 --> Helper loaded: html_helper
DEBUG - 2013-03-09 22:15:06 --> Helper loaded: url_helper
DEBUG - 2013-03-09 22:15:06 --> Helper loaded: form_helper
DEBUG - 2013-03-09 22:15:06 --> Helper loaded: cookie_helper
DEBUG - 2013-03-09 22:15:06 --> Database Driver Class Initialized
DEBUG - 2013-03-09 22:15:07 --> Session Class Initialized
DEBUG - 2013-03-09 22:15:07 --> Helper loaded: string_helper
DEBUG - 2013-03-09 22:15:07 --> Encrypt Class Initialized
DEBUG - 2013-03-09 22:15:07 --> A session cookie was not found.
DEBUG - 2013-03-09 22:15:07 --> Session routines successfully run
DEBUG - 2013-03-09 22:15:07 --> Model Class Initialized
DEBUG - 2013-03-09 22:15:07 --> Model Class Initialized
DEBUG - 2013-03-09 22:15:07 --> Controller Class Initialized
DEBUG - 2013-03-09 22:15:07 --> File loaded: application/views/static_pages/home.php
DEBUG - 2013-03-09 22:15:07 --> File loaded: application/views/templates/main_template.php
DEBUG - 2013-03-09 22:15:07 --> Final output sent to browser
DEBUG - 2013-03-09 22:15:07 --> Total execution time: 1.1099

Where am I wrong? Why is it that I am not able to get anything other than the static page set by default?


Need help to work the CodeIgniter Tutorial - El Forum - 03-10-2013

[eluser]InsiteFX[/eluser]
The Controller's default method is the index method. You do not need to specify it.