Page 1 of 1

php7* and mysqli

Posted: Fri Feb 24, 2017 8:26 pm
by Xino
Hi im trying to integrate my script into a plugin for vesta but im running into issues namely vesta itself (the panel), is there a way to make it run php7 with mysqli support on ubuntu and php7-fpm?

Thanks in advance

Re: php7* and mysqli

Posted: Fri Feb 24, 2017 9:59 pm
by Xino
Managed to get the panel running on php7-fpm with all modules loaded, now the problem appears to be the body of the panel thats f'd up... some pages are blank, some appear to not be parsing php

and the log file only generates this error.. the admin can login but a user cant.. lol

PHP message: PHP Notice: Undefined variable: user_combined_ip in /usr/local/vesta/web/inc/main.php on line 21" while reading response header from upstream, client: 8x.2xx.x3x.x1, server: _, request: "GET /login/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/vesta-php.sock:", host: "pluto.domain.com:8083", referrer: "https://pluto.domain.com:8083/list/dns/"

Whelp

Re: php7* and mysqli

Posted: Sun Jun 04, 2017 6:49 pm
by viraladmin
Thats not an error its a warning, and should have no effect on anything. To get rid of the warning you just need to define the variable.

Code: Select all

if($_SESSION['user_combined_ip'] != $user_combined_ip){
to

Code: Select all

if(!isset($_SESSION['user_combined_ip']) || $_SESSION['user_combined_ip'] != $user_combined_ip){
That message will cease to exist.

In terms of blank pages, thats not so easy to solve. I usually run through pages adding things like:

Code: Select all

echo '12345'; exit;
Through the code until I can trace exactly where the problems exist. Not exactly ideal - but there are times logging doesn't always solve things as there are no actual errors.... just unexpected behaviors.