473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Multiple PHP installations

Hello,

OS : Windows 2000 Pro
Apache : 1.3.29
PHP : 4.3.6

From the install.txt file :

quote:
"Usually you would just copy it over to %SYSTEMROOT%\System32.
But if you want to have multiple PHP installations (for
whatever reason) this is a bad idea. For this circumstance the
safest thing is to let php4ts.dll reside in the same directory
where php4apache.dll is loaded from (see point 2 above)."

So I wonder how I can have at least 2 PHP installations on a single
computer, using a single Apache server.

For example I have 2 domains, http://localhost and
http://localhost_magic_quotes_off. The first one would use the default
php.ini file, the second one should use a php.ini file where the option
magic_quotes_gpc is set to Off :

quote:
"; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off"

How can I make Apache/php4apache.dll use the second php.ini file when the
second domain is used ? As it seems Apache only get this configuration file
from default paths, I don't know how to force it to get it from somewhere
else, specially when it comes to multiple PHP installations :

quote:
"Where do I have to put the php.ini ?
The php.ini files is only searched in two places:
1) in your Apache installation directory (e.g. c:\apache\apache)
2) in your %SYSTEMROOT% directory."

I decided to place the first one in the Apache installation directory.

I couldn't find anything about multiple installations in the manual.

JM
Jul 17 '05 #1
5 3616
*** Jean-Marc Molina wrote/escribió (Fri, 7 May 2004 18:15:19 +0200):
So I wonder how I can have at least 2 PHP installations on a single
computer, using a single Apache server.

For example I have 2 domains, http://localhost and
http://localhost_magic_quotes_off. The first one would use the default
php.ini file, the second one should use a php.ini file where the option
magic_quotes_gpc is set to Off :


It sounds much easier to just have different virtual hosts with different
configs:

<VirtualHost *:80>
DocumentRoot /home/foo/htdocs
ServerName foo.com
php_admin_flag magic_quotes_gpc on
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /home/blah/htdocs
ServerName blah.com
php_admin_flag magic_quotes_gpc off
</VirtualHost>

(I haven't tested it with magic_quotes_gpc directive)
--
--
-- Álvaro G. Vicario - Burgos, Spain
--
Jul 17 '05 #2
In article <40***********************@news.free.fr>, Jean-Marc Molina wrote:
For example I have 2 domains, http://localhost and
http://localhost_magic_quotes_off. The first one would use the default
php.ini file, the second one should use a php.ini file where the option
magic_quotes_gpc is set to Off :


A workaround:

<Virtualhost other>
php_value magic_quotes_gpc off
</Virtualhost>

--
http://home.mysth.be/~timvw
Jul 17 '05 #3
Alvaro, Tim,

Thanks !

I wasn't able to set the option from the Apache configuration file but using
a .htaccess file, it works.

..htaccess :
php_flag magic_quotes_gpc off

I don't know why it doesn't work from the httpd.conf file. Maybe because the
option has to be set in a <IfModule> tag... I tried to set it for my
VirtualHost.

Shame on me for not finding the info in the manual, I thought I knew it like
my own house :(.

Shame on me, shame on me,
JM

"Tim Van Wassenhove" <eu**@pi.be> wrote in message
news:2g************@uni-berlin.de...
In article <40***********************@news.free.fr>, Jean-Marc Molina

wrote:
For example I have 2 domains, http://localhost and
http://localhost_magic_quotes_off. The first one would use the default
php.ini file, the second one should use a php.ini file where the option
magic_quotes_gpc is set to Off :


A workaround:

<Virtualhost other>
php_value magic_quotes_gpc off
</Virtualhost>

--
http://home.mysth.be/~timvw

Jul 17 '05 #4
In article <40***********************@news.free.fr>, Jean-Marc Molina wrote:
Alvaro, Tim,

Thanks !

I wasn't able to set the option from the Apache configuration file but using
a .htaccess file, it works.

.htaccess :
php_flag magic_quotes_gpc off

I don't know why it doesn't work from the httpd.conf file. Maybe because the
option has to be set in a <IfModule> tag... I tried to set it for my
VirtualHost.


Have you restarted (so that the configuration files are reloaded) the
webserver after those changes?

--
http://home.mysth.be/~timvw
Jul 17 '05 #5
Hi Tim,
Have you restarted (so that the configuration files are reloaded) the

webserver after those changes?

Of course I did :). Anyway in this case I think it's better for me to stick
with the .htaccess file.

Thanks again for all your help, last time I asked, no one answered, I think
it was 2 or 3 years. Where were you ? ^^'. You won't believe it but my
solution was to rebuilt PHP from scratch!

JM
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Peter Clark | last post by:
Think of something like MyYahoo: a personalized portal with news aggregator, weather forecast, comics, etc. Now instead of visiting a web site, think of all of it being sent daily as an email. It...
3
by: Rune Hansen | last post by:
I've posted this question on the mod_python mailing list but didn't get much response, so I thought I'd post it here. (My first attempt connected to an unrelated thread..sorry....
4
by: Mark Duregon | last post by:
Hi, I am trying to create a Windows Service in C# that will install on a single box to support multiple environments. I have created the service and it works perfect. Now however, the client has...
0
by: Matthew Lunnon | last post by:
Hi all, We're running multiple PostgresQL database installations, each on a separate port. This works fine and psql -p <port number> template1 works and connects to the correct instance of...
4
by: Nic | last post by:
I have a requirement to setup DB2 on a 4 node cluster using Veritas (with the DB2 failover agent). I may have a requirement to have more than one database running on the cluster at a different...
0
by: CNN_news | last post by:
I would like to run multiple instances of TYPO3 (a cms written in PHP) on a single server. You can run multiple websites in two methods: multisite or multiple instances. In multiple...
2
by: j_nwb | last post by:
HI I have multiple python installations. 2.2, 2.3, 2.4. When I install a new package (pygtk2) , it always install in python 2.3. I changed the /usr/bin/python to be 2.4 binary. Still the same...
0
by: gaddam bala | last post by:
Hi all, I was trying to install (Scientific Python) scipy 0.3.2 in LINUX 3, but I am facing some problem.Please help me in resolving this issue. here are the steps that i have followed : ...
1
by: Kreshna | last post by:
I need to compile PostgreSQL 8.3.5 on CentOS 4.2. The CentOS already has PostgreSQL 7 installed as part of its default installation. For some reason, I cannot touch the existing PostgreSQL...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.