Welcome Guest. Please Login or Register  


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

1


Threaded Mode | Print  

 Multiple PHP-Versions (25 Replies, Read 119859 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: --   

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

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:
Sir I shall replicate this on my test server and provide a solution ASAP.

Apology for the delay and trouble.

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

IP: --   

Multiple PHP-Versions
jcsv75
Group: Member
Post Group: Newbie
Posts: 6
Status:
This is an old thread but I am having similar issues. I am running PHP 7.2 on my webuzo VPS. No issues there, however there is one Wordpress plugin that still runs on PHP 5.6.

How can I modify the .htaccess so that PHP 5.6 is used only for this specific WordPress install?

Thanks a lot!
IP: --   

Multiple PHP-Versions
webuzo_manager
Group: Member
Post Group: Elite Member
Posts: 269
Status:
Hi jcsv75,

Currently, that's not possible through .htaccess in Webuzo but we will be providing a solution in future releases to allow for this capability.
IP: --   

Multiple PHP-Versions
trondandre
Group: Member
Post Group: Newbie
Posts: 4
Status:
Quote From : webuzo_manager September 17, 2018, 7:00 am
Hi jcsv75,

Currently, that's not possible through .htaccess in Webuzo but we will be providing a solution in future releases to allow for this capability.



Hi, when can we expect this provide you think?

Regard
Trond André
IP: --   

Multiple PHP-Versions
Dhanya
Group: Member
Post Group: Working Member
Posts: 201
Status:
Hi trondandre,

At the moment, we don't have option to enable multiple PHP versions on different domains. But we will try to include it in future versions.
IP: --   

Multiple PHP-Versions
trondandre
Group: Member
Post Group: Newbie
Posts: 4
Status:
Yes i can se that but i meen: when can we espect this in the future :)
IP: --   

Multiple PHP-Versions
Dhanya
Group: Member
Post Group: Working Member
Posts: 201
Status:
Hi trondandre,

Because of some issues we couldn't add this in past, but we will try our best to add in later versions.

Thank you for your patience.
IP: --   

Multiple PHP-Versions
trondandre
Group: Member
Post Group: Newbie
Posts: 4
Status:
Is this possible soon?

Regards
Trond André
IP: --   

Multiple PHP-Versions
vbarlakoski
Group: Member
Post Group: Newbie
Posts: 1
Status:
WOW, 5 years later, no solution provided. Is it gonna happen, at all?
IP: --   

Multiple PHP-Versions
daniel.bair
Group: Member
Post Group: Newbie
Posts: 2
Status:
This is my solution:
First edit /usr/local/apps/php56/bin/fpmctl56
Code
sudo vi /usr/local/apps/php56/bin/fpmctl56
And modify it like this:
Code
pidfile=/var/run/php-fpm56.pid
OPTIONS="-R --pid /var/run/php-fpm56.pid --fpm-config /usr/local/apps/php56/etc/php-fpm.conf -c /usr/local/apps/php56/etc/php.ini"
After that run:
Code
sudo /usr/local/apps/php56/bin/fpmctl56 start

Then edit your .htaccess and add this:
Code
# Use PHP5.6 as default
<FilesMatch \.php$>
        <If "-f %{REQUEST_FILENAME}">
                SetHandler "proxy:unix:/usr/local/apps/php56/var/php56_9000.sock|fcgi://localhost"     
        </If>
</FilesMatch>

This works for me, and it keeps going with updates to Apache (but of course will not with updates to PHP 5.6 - you will have to make the /usr/local/apps/php56/bin/fpmctl56 edits again then).
Reason: I had set the default PHP to 7.2 due to security reasons, but one subdomain needed PHP 5.6 to work.
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 July 5, 2020, 9:44 am.

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