PHP version changer 02-17-2021, 06:24 AM (This post was last modified: 02-23-2021, 09:20 AM by ccr1969.)
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
RE: PHP version changer 02-18-2021, 02:41 PM (This post was last modified: 02-19-2021, 07:35 AM by ccr1969.)
(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";
RE: PHP version changer change to work with linux i think no linux to test on 02-19-2021, 05:53 AM (This post was last modified: 02-19-2021, 05:58 AM by ccr1969.)
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>
$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
RE: PHP version changer Ubuntu-14.04.6 02-21-2021, 03:44 PM
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
RE: PHP version changer Ubuntu-14.04.6 02-21-2021, 10:23 PM (This post was last modified: 02-22-2021, 06:31 AM by spoonman.)
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
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.
RE: PHP version changer 02-22-2021, 06:38 AM (This post was last modified: 02-22-2021, 05:20 PM by ccr1969.)
(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.
version changer tested on ubuntu 14 workingRE: PHP version changer 02-23-2021, 09:09 AM (This post was last modified: 02-25-2021, 05:44 AM by ccr1969.)
PHP version changer tested on ubuntu working
version changer tested on ubuntu 14 working
Click this bar to view the full image.
Read And Follow Carefully There is edits that need to be done !!!
make sure you have installed: sudo apt-get install libapache2-mod-fcgid
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
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