Go Back   Runner > Coding Corner > Php

Php PHP is a general-purpose scripting language especially suited to web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-22-2021, 05:08 PM
Runner's Avatar
Runner Runner is offline
Administrator
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 318
Send a message via Skype™ to Runner
Default PHP version changer tested on ubuntu working

version changer tested on ubuntu 14 working

upload php_ver.zpp






Read And Follow Carefully

There is edits that need to be done !!!

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

as root and install the packages required to build the Php extension.

php 7 will complain

add this

sudo apt-get -y install gcc make autoconf libc-dev libsqlite3-dev libxml2-dev pkg-config





Find Php realeases here

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



Step 1



mkdir /opt/80

mkdir /usr/local/src/php80-build

cd /usr/local/src/php80-build

wget https://www.php.net/distributions/php-8.0.2.tar.bz2

tar jxf php-8.0.2.tar.bz2

cd /usr/local/src/php80-build/php-8.0.2/




Step 2
Configure and build PHP 8.0.2 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/80

so like this

./configure --prefix=/opt/80 so it don't over write existing php it installs to 80 not anywhere else

make -j2 #i have 4 cores but use 2 i7 proccesor

make install




Step 3
Copy php.ini and php-cgi

cp /usr/local/src/php80-build/php-8.0.2/php.ini-production /opt/80/php.ini

cp /opt/80/bin/php-cgi /opt/80/


service apache2 restart

Done

Repeat steps if you want diffrent php versions adding say php 8.0.2 follow steps 1 thru 3 changing folder to work with 5.3 example : mkdir /opt/80 to mkdir /opt/80 change all to match the 80




add this to your fcgid.conf /etc/apache2/mods_available


<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

Must do edits
  1. 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 it

Attached Images
File Type: jpg Screenshot_2021-02-22 PHP 7 4 14 - phpinfo()(2).jpg (17.2 KB, 8 views)
File Type: jpg Screenshot_2021-02-28 PHP 7 4 14 - phpinfo().jpg (64.5 KB, 5 views)
Attached Files
File Type: zpp php_ver.zpp (46.3 KB, 8 views)
Reply With Quote
  #2  
Old 02-27-2021, 04:00 AM
Runner's Avatar
Runner Runner is offline
Administrator
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 318
Send a message via Skype™ to Runner
Default sentora for Ubuntu MODULE_ZPM.zpp

MODULE_ZPM.zpp this is for just admin in sentora for Ubuntu to add delete PHP versions from PHP changer
Attached Files
File Type: zpp MODULE_ZPM.zpp (3.8 KB, 2 views)
Reply With Quote
  #3  
Old 03-28-2021, 04:30 PM
player's Avatar
player player is offline
Junior Member
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 21
Default

Hey Runner can you help me or anyone I can't get this to work on ubuntu 14 I really want this to work or does it not work I think I followed steps correctly
Has anyone even tried this yet ?
Reply With Quote
  #4  
Old 03-28-2021, 05:15 PM
Runner's Avatar
Runner Runner is offline
Administrator
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 318
Send a message via Skype™ to Runner
Default

Quote:
Originally Posted by player View Post
Hey Runner can you help me or anyone I can't get this to work on ubuntu 14 I really want this to work or does it not work I think I followed steps correctly
Has anyone even tried this yet ?
make sure you downloaded latest version posted on site in this thread make sure its called php_ver.zpp

not php_ver(1).zpp my first mistake lol

if so rename and remove other just follow instructions
Reply With Quote
  #5  
Old 03-29-2021, 10:52 AM
player's Avatar
player player is offline
Junior Member
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 21
Default

Still having no luck
Reply With Quote
  #6  
Old 03-29-2021, 01:17 PM
Runner's Avatar
Runner Runner is offline
Administrator
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 318
Send a message via Skype™ to Runner
Default

Quote:
Originally Posted by player View Post
Still having no luck

need more details i just tested again on my virtual server and all went well
Reply With Quote
  #7  
Old 03-30-2021, 01:16 PM
player's Avatar
player player is offline
Junior Member
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 21
Default

its working
i forgot this after pulling my hair out
make sure you have installed: sudo apt-get install libapache2-mod-fcgid

I must admit now this was worth trying Good Job Runner
My clients will love it

Last edited by player; 03-30-2021 at 01:18 PM.
Reply With Quote
  #8  
Old 04-02-2021, 11:52 AM
Runner's Avatar
Runner Runner is offline
Administrator
 
Join Date: Nov 2020
Location: Moose Jaw
Posts: 318
Send a message via Skype™ to Runner
Default

Quote:
Originally Posted by player View Post
its working
i forgot this after pulling my hair out
make sure you have installed: sudo apt-get install libapache2-mod-fcgid

I must admit now this was worth trying Good Job Runner
My clients will love it
always double check lol

thanks for testing it
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:55 PM.


Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright ©2020 - 2021, Runner
Ad Management plugin by RedTyger