skamasle / sk-php-selector Goto Github PK
View Code? Open in Web Editor NEWPHP selector for centos 7
PHP selector for centos 7
Can you do this to work on Ubuntu as well?
I really liked the idea.
If you can, please answer me.
Hello, what is the difference between files? I mean 2 and 3 ?
And btw I experienced a big problem with the php7.3 in my system, after some tests, I figured out was caused by the php7.3 template. The issue was a spred up of RAM usage, the RAM usage continued incrasing untill the VPS crashed (I have 8 GB RAM...) any idea? This doesn't happen with other php version...
Thank you.
php 8.1.3 version came as a load with vesta cp. then I installed php 7.4 version with sk-php-selector application. "bash sk-php-selector3.sh php74"
Currently, there are 2 web templates in my vesta panel, "default" and "sk-php74". When I select the "default" option, the php version is 7.4. When I select the option with "sk-php74", the php version is still 7.4. The "sk-php-selector" applet set the default package to 7.4. How can I fix this?
Thanks.
ln -s /etc/opt/remi/php55/php.ini /etc/php${1}.ini
ln -s /etc/opt/remi/php55/php.d /etc/php${1}.d
should be
ln -s /etc/opt/remi/php${1}/php.ini /etc/php${1}.ini
ln -s /etc/opt/remi/php${1}/php.d /etc/php${1}.d
is this working script? I tried and it didn't work.. I hd to reinstall whole vestacp to fix
can someone update this script to just install php56 ?
after install this plugin i got this error:
Error: named restart failed
when i add new domain i see that error and domain not working!. also error log of each domain is not showing anything.
sk-php-selector/sk-php-selector.sh
Line 88 in 15a1ab1
All websites shows
500
Internal Server Error
Logs:
Sat Feb 09 23:47:44 2019] [warn] [client ***] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Feb 09 23:47:44 2019] [error] [client ***] Premature end of script headers: test.php
httpd -V
Server version: Apache/2.2.15 (Unix)
Server built: Nov 15 2012 15:52:50
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
rpm httpd -V
.......T. /etc/httpd/conf.d/README
.......T. c /etc/httpd/conf.d/welcome.conf
S.5....T. c /etc/httpd/conf/httpd.conf
S.5....T. c /etc/logrotate.d/httpd
.M....... /var/log/httpd
Hi,
i have installed your tool, and now I have a doubt related about how can i specify the php version per folder instead or plus to the way that the php version by website is selected
something like to specify in the htaccess the AddHandler
In whm/cpanel i have something like:
AddHandler application/x-httpd-ea-php71 .php .php5 .phtml
Hi,
Is there a way to uninstall this script?
Thanks in advance.
----------------------- CENTOS 7 VESTACP VERSION 0.9.8-19 FRESH INSTALL -----------------------
You have remi repo installed and run:
CentOS Linux release 7.4.1708 (Core)
##########
Start installing aditional php version
##########
Actually you runing php 5.6, so I will skip it
Instaling PHP 5.4
........
PHP Ready!
Instaling PHP 5.5
.......
PHP Ready!
Skip php 5.6 actually installed
Installing PHP 7.0
.......
chmod: cannot access ‘/opt/remi/php70/root/var/lib/php/session’: No such file or directory
PHP Ready!
Installing PHP 7.1
.......
chmod: cannot access ‘/opt/remi/php71/root/var/lib/php/session’: No such file or directory
PHP Ready!
Installing PHP 7.2
.......
chmod: cannot access ‘/opt/remi/php72/root/var/lib/php/session’: No such file or directory
PHP Ready!
im new and beginner and i dont how to install this script can you explain to me how i can do it
I just used SK-PHP-Selector Script for VestaCP on CentOS 7 and it installed flawlessly, but there is one issue, I can change the PHP version for any website using the SK HTTPD template, but when I use the default HTTPD templates it shows PHP version 5.4 on web and phpMyAdmin & RoundCube does not work, but I can see the default version in the command line using "PHP -v" and it shows PHP 8.1, I tried removing .conf files from /etc/httpd/conf.d but then it just switches to just blank, no PHP at all.
I used sk-php-selector3.sh all
Thank you for script! 🙏
It’s very nice, I have used it for a few years.
But now when I start it, I get this error message:
Cant get actual php versión
Run php -v and ask on forum or [email protected]
Leaving instalation...
php -v
8.0.0
I think this script doesn’t know new 8 version PHP.
Could you update it?
Thanks!
Hi,
How am I able to give the user access to change the PHP Version?
By default there is no setting if you are logged on as the user but when I change the /usr/local/vesta/web/templates/user/edit_web.html and add the following code it won't work.
Please advice.
<tr> <td class="vst-text input-label"> <?php print __('Web Template') . "<span class='optional'>" .strtoupper($_SESSION['WEB_SYSTEM']) . "</span>";?> </td> </tr> <tr> <td> <select class="vst-list" name="v_template"> <?php foreach ($templates as $key => $value) { echo "\t\t\t\t<option value=\"".htmlentities($value)."\""; $svalue = "'".$value."'"; if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){ echo ' selected' ; } echo ">".htmlentities($value)."</option>\n"; } ?> </select> </td> </tr> <?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?> <tr> <td class="vst-text input-label"> <?php print __('Backend Template') . " <span class='optional'>" . strtoupper($_SESSION['WEB_BACKEND']) . "</span>";?> </td> </tr> <tr> <td> <select class="vst-list" name="v_backend_template"> <?php foreach ($backend_templates as $key => $value) { echo "\t\t\t\t<option value=\"".$value."\""; $svalue = "'".$value."'"; if ((!empty($v_backend_template)) && ( $value == $v_backend_template ) || ($svalue == $v_backend_template)){ echo ' selected' ; } if ((empty($v_backend_template)) && ($value == 'default')){ echo ' selected' ; } echo ">".htmlentities($value)."</option>\n"; } ?> </select> </td> </tr> <?php echo ""; }?>
Please add support for php 8.1
After use sk-php-selector2.sh (v beta 0.3) on Centos 6 and Vesta CP v0.9.8 (x86_64) with php v5.4 by default, you can select "sk-phpX" templates but sites continue runing with php v.5.4...
If you run "service httpd restart
" shows a warn "module php5_module is already loaded, skipping..."
In /etc/httpd/conf/httpd.conf include this line "Include conf.d/*.conf", so it trys include all files /etc/httpd/conf.d/*.conf
In this dir exists php.conf and the new file php56-php.conf (and others phpXX-php.conf) including this line "LoadModule php5_module ...", so I solved the problem for example with this:
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf-backup
Now, you I can run "service httpd restart
" ok and the sites run php version selected in template "sk-phpX"
----------------------- CENTOS 6.9 VESTACP VERSION 0.9.8-19 FRESH INSTALL -----------------------
[root@server2 /]# wget https://raw.githubusercontent.com/Skamasle/sk-php-selector/master/sk-php-selector2.sh
--2018-02-21 14:59:19-- https://raw.githubusercontent.com/Skamasle/sk-php-selector/master/sk-php-selector2.sh
Resolving raw.githubusercontent.com... 151.101.8.133
Connecting to raw.githubusercontent.com|151.101.8.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5180 (5.1K) [text/plain]
Saving to: “sk-php-selector2.sh”
100%[======================================>] 5,180 --.-K/s in 0s
2018-02-21 14:59:20 (114 MB/s) - “sk-php-selector2.sh” saved [5180/5180]
[root@server2 /]# bash sk-php-selector2.sh
sk-php-selector2.sh: line 84: syntax error near unexpected token }' sk-php-selector2.sh: line 84:
}'
Hi,
It seems because I already have php 7.2 installed, this plugin is not able to link a new 7.2
version.
##########
Start installing aditional php version
##########
Actually you runing php 7.2, so I will skip it
Skip PHP 7.2 actually installed
################################
Aditional PHP versión installed!
When I go to vestaCP, I do not find php 7.2 on my list as I would expect. Anyway, I can use the default so... cool!
Hi! How i can to add Imagick? (Centos 7)
I have change repo to CentOS standard base repo , with following command:
yum downgrade httpd-2.4.6-80.el7.centos.x86_64 httpd-tools-2.4.6-80.el7.centos.x86_64 mod_ssl-2.4.6-80.el7.centos.x86_64
then I run "bash sk-php-selecto2.sh all" to install new template
Then when I choose sk custom template (PHP54,70,71,72) , the web site show error:
Forbidden
You don't have permission to access /index.php on this server.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
in log file :
[fcgid:warn] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[core:error] End of script output before headers: index.php
However , The "default" template does not have problem....
(updated) after reboot the server , all sk template is disappear at VestaCP
Seem same as this problem:
https://forum.vestacp.com/viewtopic.php?f=19&t=10854&start=200#p71056
I know this does not comment form, but idk to ask with you.
Im new in this server (Centos), my server was installed Php7.3. And how to install this script from zero?
Could you please include support for php8 as well, please?
I would really appreciate if it can be done at the earliest 👍
The Install process saying;
Cant get actual php version
Run php -v and ask on forum or [email protected]
Leaving instalation...
And breaks away :(
Current VestaCP php getting installed;
PHP 8.0.1 (cli) (built: Jan 5 2021 13:54:54) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.1, Copyright (c) Zend Technologies
Thanks
why do you use an external source to download the script? It does not look safe.
from: curl -s http://mirror.skamasle.com/vestacp/PHP/sk-php${1}-centos.sh
to: curl -s https://raw.githubusercontent.com/Skamasle/sk-php-selector/master/sk-php${1}-centos.sh
Php 7.3 is out now! Please add it to the script :)
Installed VestaCP + installed PHP through your script.
When changing the template, php does not change.
Do you have plans to add support to php-fpm instead/plus to the php normal in the multiple versions?
I read something in the remi's blog that could be helpful, but i dont understand fine about that..
https://blog.remirepo.net/post/2016/04/16/My-PHP-Workstation
thanks for your work
pd. i use the apache + nginx stack
Hi, Since PHP 8 is officially released, Can you please add PHP 8?
That will be awesome!
I installed the latest version of centos 7. After which I ran your script, I got the templates, but the version that uses the West became 5.6.40 because of which I can’t get into phpMyAdmin. Tell me how can I fix this?
I can change the versions of PHP by using the vesta cp web option but it usually fails to restart the httpd even then resubmitting and manually enabling it changes the PHP version. But the problem occurs with phpMyAdmin. It usually gives the error of
404 Not Found The requested URL /phpmyadmin was not found on this server.
I tried various solutions found on vesta cp forum but non of them is working.
Link of threads which I referred:
sk-php-selector3.sh: line 36: syntax error near unexpected token `fi'
sk-php-selector3.sh: line 36: ` fi'
All scripts return 522 error
where config files of php versions are stored
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.