PHP/Serevr Ouestion

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mrrobotto
Forum Commoner
Posts: 40
Joined: Thu Sep 26, 2002 9:30 pm
Contact:

PHP/Serevr Ouestion

Post by mrrobotto »

8) Win98SE, Is it possible to run different versions of php on the same system with two different servers? One version on one server and a different version on another?
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

sorry

Post by AVATAr »

what do you mean with servers??? (on windows 98???)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

you can change the .ini-file that php will use by setting the enviroment-var PHPRC. This can also be done within the httpd.conf of apache.
Now if you have two apache-server using two different httpd.conf, loading different php-modules, having two different settings for PHPRC, the answer is yes ;)
But the question remains: why?
mrrobotto
Forum Commoner
Posts: 40
Joined: Thu Sep 26, 2002 9:30 pm
Contact:

RE: Volka

Post by mrrobotto »

:) I thought I was right but wanted another opinion. The reason is, is that I installed Apache 1.3.27 and then php 4.2.37 which took me about 4 days to get it working then I found out that all the work that I have already done would not work in the latest version of php because the resister_global has been turned off.

The server that I have access to is running php 4.0.6 and all my work, works on that server. So when I first started this my intent was to be able to use what I had set up on my computer to be able to test my code before ftp it to the server that I have access to.

So rather than uninstalling the php version that I have currently working because it took me so long to get it working and I still plan on using it. I was going to install Apache 2.0 then install php version 4.1 and use it that way so my old work would still work and I could still write the code the way I have been and I could test it out on my computer before I ftp it to the server I have access to from the Internet.

However, that now sounds illogical because you mentioned the ini file and the httpd config file. So now I think that all I would have to do is just deactivate the ini file and the httpd config file in php 4.2.37 with the # sign and install the other version and set it up so that Apache 1.3.27 calls that ini file and httpd config and runs that version instead of the other version and I could switch back and forth as I wanted to. Do you concur?

This may all sound illogical but I have my reasons
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If you want to turn register_globals off you can do it by editting the php.ini file (register_globals = 1 instead of 0). Much easier than trying to run two webservers with different versions of PHP.

Mac
mrrobotto
Forum Commoner
Posts: 40
Joined: Thu Sep 26, 2002 9:30 pm
Contact:

RE: Twiglemac

Post by mrrobotto »

I thought that you might be able to change the setting in the ini file but wasn't sure. Thanks for the input.
Post Reply