Welcome Guest. Please Login or Register  


You are here: Index > Webuzo > Bugs > Topic : Multiple PHP-Versions

1


Threaded Mode | Print  

 Multiple PHP-Versions (26 Replies, Read 224073 times)
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Hello,

I assumed to be able to have all php-Versions installed in Webuzo, leave 5.3. set as default and have the option tu select the php-version on the app-install-page of the web packages (joomla f. e. or something else)

So I installed PHP 5.4 and ran into the problem of webuzo constantly losing the login-session.
In Detail:
- I click on install in php 5.4-section,
- Installation runs quite smooth with no errors
- next, I click in Home which stll works,
- after that I click on a webapp and webuzo asks me to login
- so I log in again, click on a webapp and webuzo asks me to login, again

Same in Control Panel. I log in, click on any settings section and get asked to log in again.

So if the php-package is broken this shouldn't be that bad cause I assume this is fixable, but I wonder if it is possible to have multiple php-Versions installed, generally? If so how die I select the php-Version for any WebApp-Package individually? Do I have to reset the default php-version every time? This would be really bad.

-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
valley
Group: Webuzo Team
Post Group: Super Member
Posts: 1644
Status:
Hi,

Sir you can use the following guide to install system apps:
http://www.webuzo.com/wiki/Install_System_Apps

You can use the following guide to switch php versions:
http://webuzo.com/wiki/System_Utilities

Quote

Same in Control Panel. I log in, click on any settings section and get asked to log in again.


Try restarting the Webuzo service:
Code
Root > service webuzo restart


Quote

If so how die I select the php-Version for any WebApp-Package individually? Do I have to reset the default php-version every time?



Once the default is selected it is applicable for all of the applications.

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter

IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Quote From : valley October 26, 2013, 3:49 am
Hi,
Try restarting the Webuzo service:
Code
Root > service webuzo restart



OK, seems to work butthe restart produces errors:
Code
Stopping nginx: Done...
Stopping php-fpm: /usr/local/emps/bin/fpmctl: line 46: [: 1480
2287: integer expression expected
php-fpm is stopped
Starting nginx: Done...
Starting php-fpm: /usr/local/emps/bin/fpmctl: line 24: [: 1480
2287: integer expression expected
php-fpm already running...


Quote

Once the default is selected it is applicable for all of the applications.


Doesn't make sense to me. Why have the option to have several php-version installed simultanious, but use only one overall?
F. e. if I install several webapps with php 5.3 - how do I know they will work with php 5.4?

-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Now there is exactly the problem i've spoken of. vtiger f.e. doesn't work under php 5.4 and 5.5:

Code
Deprecated: Assigning the return value of new by reference is deprecated in /home/neomis/public_html/support/adodb/adodb.inc.php on line 893

Deprecated: Assigning the return value of new by reference is deprecated in /home/neomis/public_html/support/adodb/adodb.inc.php on line 1919

Deprecated: Assigning the return value of new by reference is deprecated in /home/neomis/public_html/support/adodb/adodb.inc.php on line 1991

Deprecated: Assigning the return value of new by reference is deprecated in /home/neomis/public_html/support/adodb/adodb-xmlschema.inc.php on line 373

Deprecated: Assigning the return value of new by reference is deprecated in /home/neomis/public_html/support/adodb/adodb-xmlschema.inc.php on line 385

Strict Standards: Declaration of dbTable::create() should be compatible with dbObject::create() in /home/neomis/public_html/support/adodb/adodb-xmlschema.inc.php on line 605

Strict Standards: Declaration of dbIndex::create() should be compatible with dbObject::create() in /home/neomis/public_html/support/adodb/adodb-xmlschema.inc.php on line 769

Strict Standards: Declaration of dbData::create() should be compatible with dbObject::create() in /home/neomis/public_html/support/adodb/adodb-xmlschema.inc.php on line 956

Strict Standards: Declaration of dbQuerySet::create() should be compatible with dbObject::create() in /home/neomis/public_html/support/adodb/adodb-xmlschema.inc.php on line 1207

Strict Standards: Only variables should be assigned by reference in /home/neomis/public_html/support/include/database/PearDatabase.php on line 20

Strict Standards: Only variables should be assigned by reference in /home/neomis/public_html/support/include/database/PearDatabase.php on line 21

Strict Standards: Only variables should be assigned by reference in /home/neomis/public_html/support/include/database/PearDatabase.php on line 937

Strict Standards: Only variables should be assigned by reference in /home/neomis/public_html/support/include/database/PearDatabase.php on line 225

Fatal error: Cannot re-assign auto-global variable _FILES in /home/neomis/public_html/support/include/utils/CommonUtils.php on line 1395


So the whole feature seems to be useless. Bad thing.

-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
valley
Group: Webuzo Team
Post Group: Super Member
Posts: 1644
Status:
Quote

OK, seems to work butthe restart produces errors:

Please execute the following commands:
Code

Root > killall -9 php-fpm
Root > service webuzo restart


OR

Code

Root > service perl-fcgi stop
Root > service webuzo restart


This issue is already fixed and will be available in the next version of Webuzo

Quote

Doesn't make sense to me. Why have the option to have several php-version installed simultanious, but use only one overall?


Sir at the moment we have made a provision to switch among PHP versions common to all the web applications.
You can manually configure the .htaccess by yourself in your directories to make use of the particular php

Apache configuration files are located at :
Code
/usr/local/apps/apache/etc/


Quote

F. e. if I install several webapps with php 5.3 - how do I know they will work with php 5.4?

Check for  the script requirements or Use the above mentioned method.

Quote

So the whole feature seems to be useless. Bad thing

We have noted this requirement and have added this to our TO-DO list.


-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter

IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
[quote poster=valley date=1382781324][quote]
Sir at the moment we have made a provision to switch among PHP versions common to all the web applications.
You can manually configure the .htaccess by yourself in your directories to make use of the particular php

Apache configuration files are located at :
Code
/usr/local/apps/apache/etc/

[/quote]

That would be a workaround at least. Hadn't thought about ist. Thanks :)

-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
valley
Group: Webuzo Team
Post Group: Super Member
Posts: 1644
Status:
Quote

That would be a workaround at least. Hadn't thought about ist. Thanks :)


Please do update about your progress over the same.
Might be useful to others as well :)

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter

IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Hello,

I have a little bit time to look into this again and it seems it won't work in .htaccess either.

The thing is, you can put something like
<IfModule mod_suphp.c>
suPHP_ConfigPath /usr/local/apps/php54
</IfModule>
in the .htaccess-file and it will change _SERVER["PHPRC"] to    /usr/local/apps/php54.

But php 5.3 is still used because adding a handler like
AddHandler application/x-httpd-php54 .php
will brake the page and result in an error 500.

I assume this is because /usr/local/apps/apache/etc/conf.d/suphp.conf says to load suphp-module from /usr/local/apps/php53/lib/mod_suphp.so.
Loading a different module would affect all websites, of course. So this wouldn't be an option.

Does anyone have an idea to run a different php-version on a single website?

-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
I'm still missing the "edit"-button.

Anyways,

<IfModule mod_suphp.c>
suPHP_ConfigPath /usr/local/apps/php54/etc
</IfModule>

seems to do the trick.
Loaded Configuration File says    /usr/local/apps/php54/etc/php.ini

-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Argh.... PHPInfo says that the right php.ini is loaded, but extensions are not!
Also php53_log is still being used. What's the deal here!?


-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
valley
Group: Webuzo Team
Post Group: Super Member
Posts: 1644
Status:
Could you post the complete contents of the .htaccess file ?

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter

IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Quote From : valley November 19, 2014, 5:40 am
Could you post the complete contents of the .htaccess file ?


PHP Code

 <IfModule mod_suphp.c>
suPHP_ConfigPath /usr/local/apps/php54/etc
</IfModule>

<
IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond 
%{HTTPSoff
RewriteRule 
(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

RewriteEngine On
RewriteBase 
/
RewriteRule ^index.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -[OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule 
^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $[L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $[L]
RewriteRule index.php [L



-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Is there any progress here?

-----------------------
Don't you dare to ask for root details!
IP: --   

Multiple PHP-Versions
valley
Group: Webuzo Team
Post Group: Super Member
Posts: 1644
Status:
Did you check the logs after the changes ?

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter

IP: --   

Multiple PHP-Versions
codesight
Group: Member
Post Group: Working Newbie
Posts: 55
Status:
Sure. Suphp53.log is still used as if nothing changed. Which apperently not did, refering to phpinfo.

-----------------------
Don't you dare to ask for root details!
IP: --   

« Previous    Next »

Threaded Mode | Print  

1


Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 19, 2024, 3:56 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.137