Run multiple versions of php

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
jxxaxxy
-


Joined: 11 Nov 2010
Posts: 42

PostPosted: Fri May 18, 2012 10:21 pm    Post subject: Run multiple versions of php Reply with quote

Hey guys. I have been trying to work on some php scripts that are not ready for php 5.4.

I setup a sub domain so I can run the different version of php and seems to work okay for a while.

Then the next day while I try to access other sites I host. They start giving me white pages of death if it attaches to a mysql database and also pages that to not rely on a database the page loads but some php.ini settings to not seem to be active. It will state that I did not setup the date.time setting. How ever I double checked and I did set it to "America/Chicago". Then I tried the other sub domain and it will no longer work either. If I change all the domains to use a single php version then it works fine no more issues no more timeouts, and everything works as it should. It seems as if abyss is not keeping the fastcgi totally seperate from each other. Anyone else fully test out running a couple of php versions.

I am using abyss 2.7 and the three versions I was using was 5.2.17, 5.3.12, and 5.4.2.

Like I said when i changed everything back to 5.3.12 all the problems have went away.
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Sun May 20, 2012 11:15 pm    Post subject: Re: Run multiple versions of php Reply with quote

jxxaxxy,

Try running a simple phpinfo script on each of the hosts and check the line which lists the php.ini that is actually being used. Chances are that your different setups of PHP are sharing the same php.ini.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
jxxaxxy
-


Joined: 11 Nov 2010
Posts: 42

PostPosted: Mon May 21, 2012 9:00 pm    Post subject: Reply with quote

I do agree with sharing the same php.ini. How would you keep them from doing that?
Back to top View user's profile Send private message
aprelium-support
-


Joined: 20 Feb 2009
Posts: 356

PostPosted: Wed May 23, 2012 3:48 pm    Post subject: Reply with quote

jxxaxxy wrote:
I do agree with sharing the same php.ini. How would you keep them from doing that?


Our preconfigured packages use the php.ini which is in their installation directory. As far as we know, default builds of PHP on Windows will look for php.ini first in the directory where php-cgi.exe is located and then move to search it in other directories (Windows directory, etc...).

You can also use the -c as an argument to php-cgi.exe to set the directory where the php.ini is located.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Visit poster's website
jxxaxxy
-


Joined: 11 Nov 2010
Posts: 42

PostPosted: Wed May 23, 2012 4:20 pm    Post subject: Reply with quote

I did use the preconfigs but they seem to blur together after a while. Like i said they work at firs then next thing you know both stop working. As for the -c Do I put that on the same line as picking the exe.

For example C:\php\php-cgi.exe -c

It is still odd even though both are setup with there own php.ini and seperate folders that it would run fine for a bit and stop working. How ever when you restart the server by killing the service and start it back up. It totally stops working all together.
Back to top View user's profile Send private message
aprelium-support
-


Joined: 20 Feb 2009
Posts: 356

PostPosted: Tue May 29, 2012 4:21 pm    Post subject: Reply with quote

jxxaxxy,

When declaring PHP, follow the instructions in http://www.aprelium.com/abyssws/php5win.html . The only difference is that you'll have to enter in the Arguments field:

Code:
-c c:\path\to\dirofphp-ini

_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group