This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

PHP version changer
#1
[Not Solved] PHP version changer
PHP version changer
Php_Ver.zpp Google drive
Php_Ver.zpp
Working on Windows
if anyone has tested it plz let me know i know im having a issue with writing if its null in vh_custom_tx but if was written b4 it writes to it no issue could be with my concat  my zpp to big to upload here as it has 3 PHP versions in it
Code:
$sql = "UPDATE x_vhosts SET vh_php_tx='$name',vh_custom_tx= SUBSTRING_INDEX(vh_custom_tx,'# STARTPhp', 1),vh_custom_tx= CONCAT_WS(vh_custom_tx,'','$ver')  WHERE vh_id_pk=$id";

Code:
vh_custom_tx
I use concat so i dont overwrite existing data vhost as i noticed lets encrypt does it. doesn't keep the existing stuff removes it . In which we don't want to do we want to keep or existing data in vhost and only over write the php version . Which this does that it searches for and replaces vh_custom_tx= SUBSTRING_INDEX(vh_custom_tx,'# STARTPhp', 1)
Note i'm running a windows server so look at code i'm sure be easy to make functional with linux
Reply
Thanks given by:
#2
[Not Solved] RE: PHP version changer
(02-17-2021, 06:24 AM)ccr1969 Wrote: PHP version changer
Php_Ver.zpp
if anyone has tested it plz let me know i know im having a issue with writing if its null in vh_custom_tx but if was written b4 it writes to it no issue could be with my concat  my zpp to big to upload here as it has 3 PHP versions in it
Code:
$sql = "UPDATE x_vhosts SET vh_php_tx='$name',vh_custom_tx= SUBSTRING_INDEX(vh_custom_tx,'# STARTPhp', 1),vh_custom_tx= CONCAT_WS(vh_custom_tx,'','$ver')  WHERE vh_id_pk=$id";

Code:
vh_custom_tx
I use concat so i dont overwrite existing data vhost as i noticed lets encrypt does it. doesn't keep the existing stuff removes it . In which we don't want to do we want to keep or existing data in vhost and only over write the php version . Which this does that it searches for and replaces vh_custom_tx= SUBSTRING_INDEX(vh_custom_tx,'# STARTPhp', 1)
Note i'm running a windows server so look at code i'm sure be easy to make functional with linux

Fixed the issue will now write value if Null
Code:
// Where the magic happens
$sql = "UPDATE x_vhosts SET vh_php_tx='$name',vh_custom_tx= COALESCE(vh_custom_tx , '' ),vh_custom_tx= SUBSTRING_INDEX(vh_custom_tx,'# STARTPhp', 1),vh_custom_tx= CONCAT(vh_custom_tx,'','$ver') WHERE vh_id_pk=$id";
Reply
Thanks given by:
#3
[Not Solved] RE: PHP version changer change to work with linux i think no linux to test on
Quote:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Php</title>
</head>

<body>
<?php
 
 if(isset($_GET['names']))
    {
               $name=$_GET['names'];
                            }     
 $ver=('# STARTPhp,
         <Files ~ "\.php$">
         Options Indexes FollowSymLinks ExecCGI
         SetHandler fcgid-script
         FcgidWrapper "C:/Sentora/panel/modules/Php_Ver/php/'.$name.'/php-cgi.exe .php"
         SetHandler fcgid-script       
         FcgidWrapper "C:/Sentora/panel/modules/Php_Ver/php/'.$name.'/php-cgi.exe .html"
         </Files>
        # ENDPhp' );
          
$name = print_r($name, true);
$ver = print_r($ver, true); // $results now contains output from print_r
?>
Directory Sentora\panel\modules\php_ver\hooks\1a.php
i think changing only the letter's  in red to your path in Linux may let this work on Linux system...
i guess testing is only way to know Good Luck And Share your results
Php_Ver.zpp Google drive
Reply
Thanks given by:
#4
[Not Solved] RE: PHP version changer Ubuntu-14.04.6
created a vs with Ubuntu to test on everything goes good till i try to do update i get the permission error. I Am new to this Ubuntu how do i fix permissions ?


Forbidden
You don't have permission to access /modules/Php_Ver/hooks/1s.php on this server.

Apache Server at 10.0.0.10 Port 80
Reply
Thanks given by:
#5
[Not Solved] RE: PHP version changer Ubuntu-14.04.6
This is what i would do
open Treminal
type:

Code:
sudo -i
then root password
then
Code:
sudo nautilu
file manager will open.
go to file /etc/sentora/panel/modules/Php_Ver/hooks/ and change permissions on the file with right click on the Properties button to
[Image: 07:07:27.png]
Reply
Thanks given by:
#6
[Not Solved] RE: PHP version changer
Can you add PHP 5.3.10 to the list to ?
I have some clients that use my hosting because no one uses PHP 5.3.10 any more on there servers and they do not want to pay someone big $$ to upgrade there old script.
Reply
Thanks given by:
#7
[Not Solved] RE: PHP version changer
[Image: ubuntu.png]
(02-22-2021, 06:25 AM)spoonman Wrote: Can you add PHP 5.3.10 to the list to ?
I have some clients that use my hosting because no one uses PHP 5.3.10 any more on there servers and they do not want to pay someone big $$ to upgrade there old script.
test for ubuntu php changer file
https://runner.ga/showpost.php?p=342&postcount=1
it can be added
updated zpp for anyone that tested new update this one writes properly on Ubuntu
Reply
Thanks given by:
#8
[Not Solved] version changer tested on ubuntu 14 workingRE: PHP version changer
PHP version changer tested on ubuntu working

version changer tested on ubuntu 14 working


[Image: wol_error.gif]
Click this bar to view the full image.
[Image: phpinfo.png]


Read And Follow Carefully
There is edits that need to be done !!!


make sure you have installed: sudo apt-get install libapache2-mod-fcgid

Find Php realeases here

https://www.php.net/releases/
Step 1


mkdir /opt/56
mkdir /usr/local/src/php56-build
cd /usr/local/src/php56-build
wget https://www.php.net/distributions/php-5.6.40.tar.bz2
tar jxf php-5.6.40.tar.bz2
cd /usr/local/src/php56-build/php-5.6.40/
Step 2


Configure and build PHP 5.6.40 as follows (you can adjust the ./configure command to your needs, take a look at
./configure --help
what you want with php or just
When you execute ./configure, add the following argument: --prefix=/opt/56
so like this
./configure --prefix=/opt/56 so it don't over write existing php it installs to 56 not anywhere else
make
make install
Step 3


Copy php.ini and php-cgi
cp /usr/local/src/php56-build/php-5.6.40/php.ini-production /opt/56/php.ini
cp /opt/56/bin/php-cgi /opt/56/
Step 4


Now we must add this over write existing data cd /etc/apache2/mods-available
use your editor to edit the file fcgid.conf
add this to your fcgid.conf
<IfModule mod_fcgid.c>
MaxRequestLen 1000000000
IPCCommTimeout 9999
IPCConnectTimeout 100
FcgidBusyTimeout 600
IPCConnectTimeout 600
FcgidZombieScanInterval 30
FcgidIdleTimeout 40
FcgidProcessLifeTime 30
FcgidMaxProcesses 120
FcgidMaxProcessesPerClass 120
FcgidMinProcessesPerClass 60
FcgidConnectTimeout 600
FcgidIOTimeout 600
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10
</IfModule>
Step 5
service apache2 restart
Done
Repeat steps if you want diffrent php versions adding say php 5.3.29 follow steps 1 thru 3 changing folder to work with 5.3 example : mkdir /opt/56 to mkdir /opt/53 change all to match the 53
You can change directory or add more Php Folders Etc by editing module.zpm just look at lay out you should figure it out Example:<option value="53">php 5.3.29</option> to say 54 or 72 than create folder 54 0r 72 what ever you changed option to than were it says php 5.3.29 change that to match new version
Thats it now go test it
[Image: attachment.php?attachmentid=47&stc=1&thu...1614053640]   [Image: attachment.php?attachmentid=48&stc=1&thu...1614053640]Attached Thumbnails



You can get more information on it at Runner[/b]


Attached Files Thumbnail(s)
       

.zpp   php_ver.zpp (Size: 46.26 KB / Downloads: 0)
Reply
Thanks given by:
#9
[Not Solved] RE: version changer tested on ubuntu 14 workingRE: PHP version changer
(02-23-2021, 09:09 AM)ccr1969 Wrote: PHP version changer tested on ubuntu working

version changer tested on ubuntu 14 working

I keep screwing it up on ubuntu 12 but i will figure it out.
Reply
Thanks given by:
#10
[Not Solved] RE: version changer tested on ubuntu 14 workingRE: PHP version changer
(02-23-2021, 09:20 PM)spoonman Wrote: I keep screwing it up on ubuntu 12 but i will figure it out.

Just follow instructions as its working make sure you re download the php_ver zpp again as its updated
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
PHP version changer Theo 60 74 542 01-31-2021, 01:45 PM
Last Post: ccr1969
Sentastico MediaWiki Requires Newer Version of PHP? dsmarter 1 2 713 08-19-2017, 03:45 AM
Last Post: TGates
How to install Select PHP Version cangkirhost 5 9 807 11-03-2016, 12:03 PM
Last Post: cangkirhost

Forum Jump:


Users browsing this thread: 2 Guest(s)