HTTP Error 500 on Google Chrome, Blank on Iceweasel |
[eluser]fredmanglis[/eluser]
I am new to CodeIgniter, and was going through the tutorial that comes with the user guide. I am experiencing a problem on the 'News Section' where, after I have done as the tutorial states, I get the HTTP Error 500 on Google Chrome (Version 22.0.1229.94) and a blank document on Iceweasel (10.0.7). I have set up the database configuration in 'application/config/database.php' according to instructions, and even tried different servers (Postgresql 9.1 and MySQL 5) to no avail. I am officially stumped, and I would appreciate any assistance to get me out of my current ignorance level. In case it is relevant, I am running on Debian 7 (Wheezy). Thank you for your time.
[eluser]satej[/eluser]
Can you please be a little more explicit stating your problem in terms of links, error message, image etc.? ![]()
[eluser]fredmanglis[/eluser]
The problem comes in after pointing my browser to the path localhost/CodeIgniter_2.1.3/index.php/news The routing rules (according to the tutorial) are to be set up as follows: Code: $route['news/(:any)'] = 'news/view/$1'; Google Chrome responds with: 'The website encountered an error while retrieving http://localhost/CodeIgniter_2.1.3/index.php/news. It may be down for maintenance or configured incorrectly' 'HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.' The other code that i did was: applications/models/news_model.php Code: <?php application/controllers/news.php Code: <?php application/views/news/index.php Code: <?php foreach ($news as $news_item): ?> application/views/news/view.php Code: <?php
[eluser]satej[/eluser]
@fredmanglis I used your code and was able to see the something similar to this image https://lh4.ggpht.com/JKZF8MyLcN-lzbabDz...TWvLa=s136 and there was no error as such you have mentioned. Are you using any api that calls to Google or something? The error you are entering may not be a CodeIgniter syntax error. Is there anything else about your code, you would like to share that may help us find a solution to it?
[eluser]fredmanglis[/eluser]
Thanks @satej for your response. I am not using any other APIs, at least, not any that I am aware of. My setup is on a personal machine with Apache/2.2.22 on Debian 7 (Wheezy), with PHP 5.4.4-9. I have placed the "CodeIgniter_2.1.3/" directory in the "/var/www/" directory. I am not aware of anything else that could be the problem. After setting the log_threshold=4; (ALL), I get the following output: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>;
[eluser]satej[/eluser]
Everything appears fine to me though from the log list. Can you give me some extra info regarding the code you have setup? I don't think the wheezy set up is the problem.
[eluser]fredmanglis[/eluser]
Well, I can't seem to find anything else that is related to that... I have put my code in the 'CodeIgniter_2.1.3/application/' folder in '/var/www/', I don't know if that helps. The code I am working on is as I have posted here (copy - paste). Also, my OS is 64-bit, therefore my daemons are mostly also 64-bit...
[eluser]fredmanglis[/eluser]
Apparently, I had not installed the database modules needed to make PHP work with either mysql and postgresql. I made an assumption they would be installed by default, as I was used to it happening in the past; apparently that has changed. I would have given up, had I not decided to play with WordPress, which gave me informed me of the absence of the mysql module (CI, unfortunately, did not), and I also installed the postgresql module too. Thank you for your time though.
|
Welcome Guest, Not a member yet? Register Sign In |