php7* and mysqli

Questions regarding the API
Application Programming Interface
Xino
Posts: 3
Joined: Fri Feb 24, 2017 5:44 pm

php7* and mysqli

Postby Xino » Fri Feb 24, 2017 8:26 pm

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

Xino
Posts: 3
Joined: Fri Feb 24, 2017 5:44 pm

Re: php7* and mysqli

Postby Xino » Fri Feb 24, 2017 9:59 pm

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

viraladmin
Posts: 29
Joined: Thu Apr 27, 2017 7:40 pm

Re: php7* and mysqli

Postby viraladmin » Sun Jun 04, 2017 6:49 pm

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.


Return to “Scripting / API”



Who is online

Users browsing this forum: No registered users and 4 guests