Author Topic: two installation in one server  (Read 21327 times)

0 Members and 1 Guest are viewing this topic.

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
two installation in one server
« 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 ?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: two installation in one server
« Reply #1 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...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: two installation in one server
« Reply #2 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

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: two installation in one server
« Reply #3 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 :(





Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: two installation in one server
« Reply #4 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.

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: two installation in one server
« Reply #5 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: two installation in one server
« Reply #6 on: May 21, 2005, 02:33:48 AM »
did u guys see my answer?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: two installation in one server
« Reply #7 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


Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: two installation in one server
« Reply #8 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"

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: two installation in one server
« Reply #9 on: May 23, 2005, 10:09:54 PM »
thanks for all time you guys,  :D :D

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: two installation in one server
« Reply #10 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..
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: two installation in one server
« Reply #11 on: June 04, 2005, 01:16:39 AM »

Offline mantra

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
    • DREAM WITH MANTRA
Re: two installation in one server
« Reply #12 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 ....

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: two installation in one server
« Reply #13 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...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: two installation in one server
« Reply #14 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