Re: [PHP] One set of php for multiple subdomains

2003-03-18 Thread Ernest E Vogelsinger
At 23:43 17.03.2003, Radu Manole said:
[snip]
>Hi guys,
>
>I have 2 scripts located in a directory and 3 dirs with 3 subdomain.
>Something like this.
>
>/scripts
>- input.php
>- output.php
>
>/user1  -> subdomain user1.mysite.com
>/user2  -> subdomain user2.mysite.com
>/user3  -> subdomain user3.mysite.com
>
>What can I do to execute the input.php script from any subdomain and get
>output.php (response) in the same subdomain?
>Do I need to copy the "scripts" directory in each subdomain dir?
[snip] 

If you're on *nix you can simply create symbolic links to the directory:

ln -s /scripts /user1/scripts
ln -s /scripts /user2/scripts
ln -s /scripts /user3/scripts

Now all 3 user directory will contain a symbolic link to the /scripts
directory, within their domain tree.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] One set of php for multiple subdomains

2003-03-18 Thread David T-G
Radu --

...and then Radu Manole said...
% 
% Hi guys,

Hi!


% 
% I have 2 scripts located in a directory and 3 dirs with 3 subdomain.
% Something like this.
% 
% /scripts
% - input.php
% - output.php

OK...


% 
% /user1  -> subdomain user1.mysite.com
% /user2  -> subdomain user2.mysite.com
% /user3  -> subdomain user3.mysite.com

Also OK...


% 
% What can I do to execute the input.php script from any subdomain and get
% output.php (response) in the same subdomain?
% Do I need to copy the "scripts" directory in each subdomain dir?

In order to call the script like

  http://user1.mysite.com/input.php

you'll have to have input.php under that site's DOCUMENT_ROOT directory.
You could do this with a symbolic link or you could just have a simple
wrapper

  $ cd /user1
  $ cat input.php
  

and then put all of the meat in the /scripts dir.  We do this on our
server where we have about 80 sites that use our web gallery software and
all of our clients get the new version when we publish it to our central
location.  Meanwhile, we can point test sites elsewhere (eg /scripts/test
containing input.php and output.php) just by updating that little wrapper
in a jiffy.

Once you're in your input.php script, you can also include any other
script or file.  I don't know just what you mean about executing the
input script ... and getting the output script, since usually one runs
the script and the script generates the output.  Let us know if you have
more questions, though, and we'll try to help :-)


% 
% many thanks,
% Radu


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] One set of php for multiple subdomains

2003-03-17 Thread Radu Manole
Hi guys,

I have 2 scripts located in a directory and 3 dirs with 3 subdomain.
Something like this.

/scripts
- input.php
- output.php

/user1  -> subdomain user1.mysite.com
/user2  -> subdomain user2.mysite.com
/user3  -> subdomain user3.mysite.com

What can I do to execute the input.php script from any subdomain and get
output.php (response) in the same subdomain?
Do I need to copy the "scripts" directory in each subdomain dir?

many thanks,
Radu


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php