Welcome Guest, Not a member yet? Register   Sign In
FCPATH issue with multi-installation of codeigniter
#1

[eluser]KLODEnet di Stefano Surricchio[/eluser]
Hi,
I have some installation on my TestServer.
I want to explain this issue with a little example:

I have an installation of CodeIgniter (2.1.0) in a subfolder, "foo".
I use a library, that need to get the FCPATH in his construct.

Then, I have another installation of CodeIgniter (2.1.0) in another subfolder, "man".
Here I use the same library.

NOW... If I access to http://localhost/foo (or http://localhost/man) all works fine, but if I access to the OTHER installation, I get an error. The SECOND execution of CodeIgniter in the same Server in different subfolder, get the FCPATH of the FIRST execution. So, if I execute "foo" and then "man", to http://localhost/man the FCPATH constant results /www/foo and not /www/man. Otherwise, if I execute "man" and then "foo", to http://localhost/foo the FCPATH constant results /www/man and not /www/foo


MY SOLUTION:
in the "index.php" I set:

Code:
define('FCPATH', dirname(__FILE__));

and so, either installation works fine.





Theme © iAndrew 2016 - Forum software by © MyBB