CodeIgniter Forums
Codeigniter problem in LAMP - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Codeigniter problem in LAMP (/showthread.php?tid=32593)



Codeigniter problem in LAMP - El Forum - 07-28-2010

[eluser]anesmon[/eluser]
Hi,today I just installed CodeIgniter in LAMP. The problem I got is I download the index.php file from localhost when i only type http://localhost/codeigniter, but I can access the welcome message from http://localhost/codeigniter/index.php/welcome. And I also can access that page from http://localhost/codeigniter/index.php, but not when http://localhost/codeigniter. Anybody knows the solution?


Codeigniter problem in LAMP - El Forum - 07-28-2010

[eluser]WanWizard[/eluser]
index.php is not defined in the httpd.conf as the index page (usually, only index.html is defined out of the box)?


Codeigniter problem in LAMP - El Forum - 07-28-2010

[eluser]anesmon[/eluser]
No, in a normal index.php file, it works great. I don't understand why CI's index.php behave this way.
Oh yeah, i installed LAMP today and i found that httpd.conf is empty. The content seems to be moved into apache2.conf.

And the index.php that I downloaded became XxXxXx.phtml.part where x is a different alphabet each time I download it. Maybe someone has a clue?


Codeigniter problem in LAMP - El Forum - 07-28-2010

[eluser]WanWizard[/eluser]
I don't really understand what you mean by 'download index.php'. Why whould you download it? Where to?


Codeigniter problem in LAMP - El Forum - 07-28-2010

[eluser]anesmon[/eluser]
It is downloaded, not opening a default controller in a web page like as how it should be. I download it like another file, I can put it wherever I want.


Codeigniter problem in LAMP - El Forum - 07-28-2010

[eluser]pickupman[/eluser]
The problem maybe on your server configuration on .htaccess in the document root. When you leave off the trailing slash, apache will try parsing it as part of the uri in the document root, not your /codeigniter/ subfolder.


Codeigniter problem in LAMP - El Forum - 07-29-2010

[eluser]anesmon[/eluser]
I'm not really sure about .htaccess file. I never created it. And on normal index.php file, it works great. Only CI's index.php that behave this way.


Codeigniter problem in LAMP - El Forum - 07-29-2010

[eluser]pickupman[/eluser]
I believe I had this problem once before when I installed Apache on my laptop before. I believe I had fixed it by changing file ownership. Because I had downloaded CI to home folder, I had file ownership. I unzipped as me, and copied contents to /var/www. It would try and download the index.php almost like the mime-type was messed up. I changed ownership, and seemed to fix the problem.


Codeigniter problem in LAMP - El Forum - 07-30-2010

[eluser]anesmon[/eluser]
Changed ownership to root, and the problem still exists Sad


Codeigniter problem in LAMP - El Forum - 10-24-2010

[eluser]mercurio[/eluser]
I’m not sure that’s a definitive solution but I solved the problem as follows in the index.php file at the root, in line

error_reporting (E_ALL);

I change by

error_reporting (E_STRICT);

I hope you solve the problem

System:Linux ubuntu 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64
Apache Version: Apache/2.2.14 (Ubuntu)
PHP Version: 5.3.2-1ubuntu4.5
Codeigniter Version: 1.72