Giter VIP home page Giter VIP logo

sk-php-selector's People

Contributors

samaphp avatar skamasle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sk-php-selector's Issues

Files

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.

Default PHP Version Problem

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.

Bug in php ini linking

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

Error: named restart failed

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.

version = beta 0.4 FastCGI Error

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

select php version per directory

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

Uninstall

Hi,
Is there a way to uninstall this script?
Thanks in advance.

chmod: cannot access ‘/opt/remi/php70/root/var/lib/php/session’: No such file or directory

----------------------- 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!

i cant install it

im new and beginner and i dont how to install this script can you explain to me how i can do it

  • if there specific code i can add it to Putty or what !!

Default PHP version issue. CentOS 7 | VestaCP

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

Php 8.0

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!

Users unable to change php

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 ""; }?>

module php5_module is already loaded, skipping...

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 syntax error near unexpected token

----------------------- 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: }'

php 7.2 already installed

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!

it show error after I upgrade my apache to 2.4.80

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

How to install this script completely?

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?

php8 support please

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

Php does not change

Installed VestaCP + installed PHP through your script.
When changing the template, php does not change.

Add PHP 8

Hi, Since PHP 8 is officially released, Can you please add PHP 8?
That will be awesome!

phpmyadmin use php 5.6.40

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?

Able to change the versions but phymyadmin issue

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:

  1. https://forum.vestacp.com/viewtopic.php?f=10&t=19134&sid=60a0b4c2f18ebb467fd0640ec369cd8c&start=20

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.