CodeIgniter Forums
Installation problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Installation problem (/showthread.php?tid=19036)

Pages: 1 2


Installation problem - El Forum - 05-25-2009

[eluser]skunkbad[/eluser]
I just uploaded my CodeIgniter site, and even though I had it working locally, and in a test folder on the production server, I am getting an error:

[25-May-2009 21:33:44] PHP Warning: require(application/config/constants.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/dirbase/public_html/system/codeigniter/CodeIgniter.php on line 52
[25-May-2009 21:33:44] PHP Warning: require(application/config/constants.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/dirbase/public_html/system/codeigniter/CodeIgniter.php on line 52
[25-May-2009 21:33:44] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'application/config/constants.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/dirbase/php') in /home/dirbase/public_html/system/codeigniter/CodeIgniter.php on line 52

The constants file is there... so I'm not sure what to do. When I try to load the home page, the screen is blank, and the header says 500 Server Error.


Installation problem - El Forum - 05-25-2009

[eluser]skunkbad[/eluser]
I edited index.php so that the application folder includes the system folder, and I can view the home page, but when I click on any menu link, it redirects me (or shows me) the home page... so I'm still stuck with this problem.


Installation problem - El Forum - 05-26-2009

[eluser]skunkbad[/eluser]
I figured out my problems (plural). Even though I had my CI site working in a subdirectory of my site, the URI protocol had to be changed from AUTO (which worked in the subdirectory, to REQUEST_URI. Don't know why this was the case, but it is what it is.

Secondly, I had been trying to install this new CI version of my site along side a Kohana version of my site, and CI didn't like that. Once Kohana's application and modules directories were removed, CI started working. I had even renamed the directories of my CI installation inside the config file, but it didn't matter, CI wasn't going to work without removing Kohana.


Installation problem - El Forum - 05-26-2009

[eluser]Dam1an[/eluser]
Hmm... it would appear CI and Kohana don't play nicely
I wonder if this is intentional, like Windows trying to stop you from installing Google Desktop Search lol


Installation problem - El Forum - 05-26-2009

[eluser]TheFuzzy0ne[/eluser]
I'm not quite sure of your directory structure, but shouldn't these both be separate apps? If so, I can't see what the problem is.


Installation problem - El Forum - 05-26-2009

[eluser]skunkbad[/eluser]
[quote author="TheFuzzy0ne" date="1243361391"]I'm not quite sure of your directory structure, but shouldn't these both be separate apps? If so, I can't see what the problem is.[/quote]

Of course they are seperate apps. That's why I didn't immediately remove the Kohana application folder, which was at web root. CI's application folder is inside the system directory, so there should be no confusion right? Well, as soon as I renamed the Kohana application folder to ko_application, CI started working.


Installation problem - El Forum - 08-13-2009

[eluser]haydenchambers[/eluser]
from a fresh install of 1.7.1
I have this structure

www.example.com/ci/
index.php
licence.txt
system/
application/
...
...

and I also had the above error

but changing line 95 of index.php to define('APPPATH', 'system/'.$application_folder.'/');
seemed to fix it? Though it makes me nervous. Is there something I'm doing wrong in the setup that means it would work doing that hack? Will it 'just work for now' and further down the track I'll run into some ugly bug?

Thanks in advance


Installation problem - El Forum - 08-13-2009

[eluser]TheFuzzy0ne[/eluser]
CodeIgniter should work straight out of the box, since it works using the path relative from the index.php. Please could you paste the relevant parts of your index.php file, and also, the exact error you're receiving.


Installation problem - El Forum - 08-14-2009

[eluser]haydenchambers[/eluser]
Hi Fuzzy One, thanks for the reply

in index.php lines 93 - 105
Code:
if (is_dir($application_folder))
{
    define('APPPATH', 'system/'.$application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }

    define('APPPATH', BASEPATH.$application_folder.'/');
}

if it makes any difference I'm running in a subdomain http://ci.unco.co.nz which routes to www.unco.co.nz/ci/

the error that can be seen there now that I've reverted the code back to
Code:
define('APPPATH', $application_folder.'/');

is Warning: require(application/config/constants.php) [function.require]: failed to open stream: No such file or directory in /home/hayden/public_html/ci/system/codeigniter/CodeIgniter.php on line 52

Fatal error: require() [function.require]: Failed opening required 'application/config/constants.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hayden/public_html/ci/system/codeigniter/CodeIgniter.php on line 52


Installation problem - El Forum - 08-14-2009

[eluser]TheFuzzy0ne[/eluser]
OK, I'd revert back to the original version of the index.php. What I was looking for was the values that you had for $application_folder and $system_folder. I have to say that I've never heard of anyone having to change the code in the index.php that you have, so I suspect that this is not a bug.

I recommend you check your file permission, and try experimenting from within the index.php file, by replacing the index.php with your own version, and playing around with require() until it works. Hopefully this will give you some indication of what the problem is.