4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: mantra on May 20, 2005, 03:33:36 AM

Title: two installation in one server
Post by: mantra on May 20, 2005, 03:33:36 AM
I try running two 4images 1.7 installation with deferent site in one server [ localhost also deferent name database],
Some strange happen ,,, i log in as admin for site A is doing fine like allways but then when i log in as admin for site B then in site A when i try edit something i lost my log in [ form log in come again ] even i try log in for siteA again they can not eccept my username and password.

But when I erase all record table 4images_sessions in site A then i can log in again or edit something.

any clue for this problem ?
Title: Re: two installation in one server
Post by: V@no on May 20, 2005, 02:38:22 PM
try use localhost address for site A and 127.0.0.1 for site B
the point is, u can not use same domain for two different installations of 4images, unless they are linked some how...
Title: Re: two installation in one server
Post by: Chris on May 20, 2005, 03:00:17 PM
Different site (domain) and different database?  That's fine even on the same server.  There must be something else going on here.

Is one of these domains a "parked" domain? 

For your 2 config.php files, do you have it set up so that:

Site A uses localhost and database 4images_siteA
Site B uses localhost and database 4images_siteB

Are you using two separate installations of the PHP & template files?  Are you using the same MySQL user for both config.php files?  If so, you MIGHT try creating a 2nd MySQL user.

We need more info to help
Title: Re: two installation in one server
Post by: mantra on May 21, 2005, 12:43:50 AM

Is one of these domains a "parked" domain? =>  NO I try this at localhost

For your 2 config.php files, do you have it set up so that:

Site A uses localhost and database 4images_siteA => yes
Site B uses localhost and database 4images_siteB=> yes

Are you using two separate installations of the PHP & template files?  => yes
Are you using the same MySQL user for both config.php files?  => yes


it seem like after the second log the site B  replace the cokie site A

i try change session.php in includes folder

define('COOKIE_NAME', '4images_');

with

define('COOKIE_NAME', 'Blahs_');

but still got same result :(




Title: Re: two installation in one server
Post by: Chris on May 21, 2005, 01:21:37 AM
Don't edit the PHP code!  This is a setup issue for sure.  I just don't know enough about the details to provide an answer yet.

A "parked" domain is one that shares the same web space (file system directory location) as another domain.  It has nothing to do with the name of the server box.

Instead, try to edit the includes/constants.php for each site.  Locate this:
Code: [Select]
// If 4images has problems to find out the right URL, define it here.
// define('SCRIPT_URL', 'http://www.yourdomain.com/4images'); //no trailing slash

Uncomment it and set the URL to the root of 4images (where the index.php is located)  Example:
Code: [Select]
// If 4images has problems to find out the right URL, define it here.
define('SCRIPT_URL', 'http://www.example.com/4images'); //no trailing slash

Also try to think about any other details regarding your web site set up.  Please provide more details if you can.  How about a URL to each web site?  No login information, just URLs.
Title: Re: two installation in one server
Post by: mantra on May 21, 2005, 01:54:24 AM

Also try to think about any other details regarding your web site set up.  Please provide more details if you can.  How about a URL to each web site?  No login information, just URLs. =>
each site i install as default 4images no mood .
after the  log  for site B  all page in admin for site A they  promt  me again  login page for admin and if you put username and password
the site not let me in still the same a login page.

site A locate at http://localhost/4images
site B locate at http://localhost/4images2

and i try change at constants.php with

define('SCRIPT_URL', 'http://localhost/4images'); //no trailing slash
define('SCRIPT_URL', 'http://localhost/4images2'); //no trailing slash

no luck still the same
Title: Re: two installation in one server
Post by: V@no on May 21, 2005, 02:33:48 AM
did u guys see my answer?
Title: Re: two installation in one server
Post by: mantra on May 22, 2005, 01:24:14 AM
did u guys see my answer? => YES  BOSS 8O

the point is, u can not use same domain for two different installations of 4images, unless they are linked some how...

but need for another way out , jan could you give me clue

Title: Re: two installation in one server
Post by: Chris on May 23, 2005, 03:30:30 PM
V@no is right.

u can not use same domain for two different installations of 4images

http://localhost/4images
http://localhost/4images2

These are the same domain "localhost".  You have to register a 2nd domain name like "localhost2"
Title: Re: two installation in one server
Post by: mantra on May 23, 2005, 10:09:54 PM
thanks for all time you guys,  :D :D
Title: Re: two installation in one server
Post by: V@no on June 03, 2005, 03:41:25 AM
hmmm...I've got an idea...what if u edit these lines in includes/sessions.php of your site B
Code: [Select]
define('COOKIE_NAME', '4images_');
define('COOKIE_PATH', '/');
replace 4images_ with 4images_b_
will it work?

IMO these settings should be placed in constants.php to begin with..
Title: Re: two installation in one server
Post by: Chris on June 04, 2005, 01:16:39 AM
Related topic:  http://www.4homepages.de/forum/index.php?topic=8188
Title: Re: two installation in one server
Post by: mantra on June 04, 2005, 07:13:43 AM
hmmm...I've got an idea...what if u edit these lines in includes/sessions.php of your site B
Code: [Select]
define('COOKIE_NAME', '4images_');
define('COOKIE_PATH', '/');
replace 4images_ with 4images_b_
will it work?

IMO these settings should be placed in constants.php to begin with..

No it doesn't work ....
Title: Re: two installation in one server
Post by: V@no on June 06, 2005, 07:03:22 AM
hmmm...I've got an idea...what if u edit these lines in includes/sessions.php of your site B
Code: [Select]
define('COOKIE_NAME', '4images_');
define('COOKIE_PATH', '/');
replace 4images_ with 4images_b_
will it work?

IMO these settings should be placed in constants.php to begin with..

No it doesn't work ....
wierd, it worked for me...
here is my setup:
two installations of 4images:
http://localhost/4images1
http://localhost/4images1/4images2
the code in sessions.php of 4images1 was left default
the code in sessions.php of 4images2 was changed to:
Code: [Select]
define('COOKIE_NAME', '4images2_');
define('COOKIE_PATH', '/4images2');
then I could login and stay logged at both 4images as two different members...
Title: Re: two installation in one server
Post by: Chris on June 06, 2005, 02:53:20 PM
I just tested this also and can verify that it works against two CLEAN installs of 4images 1.7.1
Title: Re: two installation in one server
Post by: mantra on June 07, 2005, 09:37:24 AM
I just tested this also and can verify that it works against two CLEAN installs of 4images 1.7.1


YES YES , somehow it's work fine now after the changes of session , Thanks :mrgreen: