Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Scripting / API
  • Search

php7* and mysqli

Questions regarding the API
Application Programming Interface
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
Xino
Posts: 3
Joined: Fri Feb 24, 2017 5:44 pm

php7* and mysqli
  • Quote

Post by 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
Top

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

Re: php7* and mysqli
  • Quote

Post by 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
Top

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

Os: Ubuntu 15x
Web: apache + nginx
Re: php7* and mysqli
  • Quote

Post by 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.
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “Scripting / API”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password