Hey Guys, My issue I have recently migrated to ubuntu 18.04 server with nginx 1.15.7, ispconfig 3 (latest) and (now) php7.2. Before that the server ran on php7.0. So I thought of having it a bit cleared up and uninstalled php7.0 (yeah, wasn't too smart). This does mean, that ispconfig does not find PHP anymore. After I changed path to socket in nginx/sites-enabled/ for my sites and ispconfig the sites do run again (on php7.2) but ispconfig has an issue with it due to permissive errors: 249 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/usr/local/ispconfig/interface/lib/config.inc.php): failed to open stream: Permission denied in /usr/local/ispconfig/interface/web/index.php on line 31 What I basically did to produce it was to change php-fpm socket to /run/php/php7.2-fpm.sock which works for regular websites but not for ispconfig. Questions How can I reconfigure ISPConfig to get new php version? Updating the version of ISPConfig did not change it. Installing is not permitted due to already having some installation I recognised that every website had it's own socket before (likewise web11.sock), how can I re-establish this usage again? Thanks for ideas Bent
Hey ahrasis, Thx for your answer. But where? This does mean ispconfig is broken and produces a http 500. See my posted error above. -> this must be somewhere terminal-wise. Where? Cheers, Bent
BTW changing nginx conf in site-enabled (as I did) is not valid. ISPConfig would override it as soon as it's working again correctly. Basically I'm looking fo a way to fix ISPConfig.
1) Install the correct PHP version for the OS again, that's the one that you can find on the perfect server guide four OS. 2) then do a manual ISPConfig update with reconfigure services = yes: Code: cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3.1.13.tar.gz tar xvfz ISPConfig-3.1.13.tar.gz cd ispconfig3_install/install php -q update.php You can run older and newer PHP version than the version that ships with the OS as additional PHP version (either manually compiled or from a PPA repo like ondrej), but do not change the default PHP as this will break the system.
Hey Till, Thx for your answer. Unfortunately this did not work out. ISPConfig still does not know where to go for correct php socket. I hoped that an update (with reconfiguring) will fix the nginx file for ispconfig (for correct php-fpm socket). But that's what I did. In my naive world I though easily to replace PHP with another version. Can I reinstall ISPConfig? Is there an uninstall script? Or should I go through the folders and delete by hand? Os is there another option to setup again correct nginx conf to have IPSConfig run again? Cheers, Bent
Have you changed the default PHP version back to the original for Ubuntu 18.04? Code: update-alternatives --config php If you have installed that original PHP back and done the update-alternatives, try again manual ISPConfig update.
I did not change default PHP for Ubuntu 18.04: Code: update-alternatives --config php: There is only one alternative in link group php (providing /usr/bin/php): /usr/bin/php7.2 Nothing to configure. So my history was to upgrade from 16.04 to 18.04 which sets PHP7.0 to deprecated one.
Have you gone through the Perfect Server Guide for Ubuntu 18.04? You need to do that after upgrade from Ubuntu 16.04 to 18.04. https://www.howtoforge.com/tutorial...pureftpd-bind-postfix-doveot-and-ispconfig/2/ Check you have PHP modules installed and config files as described in the manua.
Hey Teleman, Thx for this suggestion. I tried https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18-04-nginx-bind-dovecot-and-ispconfig-3/ and got same result. Is there a way to re-initialise ngnix configuration for ispconfig? Currently I still get Code: 2018/12/02 19:58:38 [error] 19256#19256: *3596 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/usr/local/ispconfig/interface /lib/config.inc.php): failed to open stream: Permission denied in /usr/local/ispconfig/interface/web/index.php on line 31 PHP message: PHP Fatal error: require_once(): Failed opening required '../lib/config.inc.php' (include_path='.:/usr/share/php') in /usr/local /ispconfig/interface/web/index.php on line 31" while reading response header from upstream, client: 31.17.211.231, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: " XXXXX" My nginx site-enabled for ispconfig: Code: location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/run/php/php7.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_buffer_size 128k; fastcgi_buffers 256 4k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_read_timeout 1200; fastcgi_param HTTP_PROXY ""; } What I changed after upgrade of ubuntu was fastcgi_pass unix:/run/php/php7.2-fpm.sock; Cheers
No. This is in ISPConfig CP > System > Additional PHP Versions. My reply is only for websites php version only. For ISPConfig php version refer to @till 's reply.
Hey guys, @till @Taleman as far as I see I ran through installation guide https://www.howtoforge.com/tutorial/perfect-server-ubuntu-18-04-nginx-bind-dovecot-and-ispconfig-3 mulitple times for upgraded server from ubuntu 16.04. Error still persists that nginx is not able to access /usr/local/ispconfig/interface/web/index.php. May the issue be hidden somewhere here? With which user should nginx usually access ispconfig? Afaik ngnix is using a different one: (/var/log/nginx/error.log) I still fear the complete reinstall of servers so I would like to find the issue Any suggestions still not yet tried? Regards, Bent
Now that correct PHP version is installed with proper setup, have you tried what @till suggested in #5? The update.php should work now and lets you reconfigure services and ISPConfig should work.
Hey Guys, Thx for your answers, as it turned out: ISPConfig is creating php configs for every vhost in /etc/php/php7.0/fpm/pool.d/ispconfig.conf. So I found that reinstallation only created one conf for apps (/etc/php/php7.2/fpm/pool.d/apps.conf) but not for all vhosts and ispconfig itself. In these conf's sockets for each vhost is defined for which php is listening and nginx must reference to it. So I moved old vhost confs in pool.d of php7.0 to 7.2 (and changed listen): and changed vhost config in nginx sites-available for ispconfig: -> so now ispconfig is working again. It fixes automatically all nginx vhosts (as I tried to change some and missed undoing so). I found this solution due to my already mentioned question why nginx was complaining about the right to open /usr/local/ispconfig/interface/web/. One Question remains: What happens if I'm creating new sites (aka vhosts)? Will nginx know of current php version? Where can I set this up? Can I? Best, Bent
I didn't re-read the thread to make sure I'm following everything, but I think what you want is the default php version settings under System > Server Config > {server} > Web > PHP Settings.