Function returning warning open_basedir restriction in effect. Filet

0

I have a function in PHP that checks if I have new requests in the system. if I have the return in ajax I will display a notification toas displayed the order number.

PHP function verifies NewPosted.php

<?php
include('../../class/mysql_crud.php');

$pedido = 0;


$db = new Database();
$db->connect();
$db->sql("SELECT * FROM lanc_pedidos WHERE status='1' and notificado='0'");
$res = $db->numRows();
    if ($res >= 1){
      $res = $db->getResult();
      foreach ($res as $output) {
        $pedido = $output["guid"];
      }

 $db->update('lanc_pedidos', array('notificado'=>1), 'guid='.$pedido);
 $res = $db->getResult();
 } else {
   $pedido = 0;
 }

if ($pedido > 10){
  echo 0;
} else {
  echo ($pedido);
}

Ajax function

var timeout = setTimeout(verificaNovoPedido, 2000);
function verificaNovoPedido(){
  $.ajax({
    url: "ajax/pedidos/verificaNovoPedido.php",
    type: "POST",
    success: function (dados){
      if (dados != 0){
        notifyMe(dados);
        reloadtableAllPedido();
      }
    }
  })
  timeout = setTimeout(verificaNovoPedido, 2000);
}

The Problem is that sometimes returning a warning, in this case:

  

Request received, Num:
↵ Warning : include () [function.include]: open_basedir restriction in effect. File (/home/u312527797/public_html/painel/class/mysql_crud.php) is not within the allowed path (s): (/home/u702782028:/tmp:/var/tmp:/opt/php-5.3/pear: / usr / local / bin) in /home/u312527797/public_html/painel/ajax/pedidos/verifyNewPart.php online 2

↵ < b> Warning : include (/home/u312527797/public_html/painel/class/mysql_crud.php) [function.include]: failed to open: Operation not allowed in / home / u312527797 / public_html /


Warning : include () [function.include]: Failed opening '../../class/mysql_crud.php' for inclusion (include_path = '.: / opt / php-5.3 / pear') in / home / u312527797 / public_html / pane / ajax / requests / verifyNew Request .php on line 2

↵ Fatal error : Class 'Database' not found in / home / u312527797 / public_html

Warning : include () [/ b> function.include]: open_basedir restriction in effect. File (/home/u312527797/public_html/painel/class/mysql_crud.php) is not within the allowed path (s): (/home/u702782028:/tmp:/var/tmp:/opt/php-5.3/pear: / usr / local / bin) in /home/u312527797/public_html/painel/ajax/pedidos/verifyNewPart.php online 2

↵ < b> Warning : include (/home/u312527797/public_html/painel/class/mysql_crud.php) [function.include]: failed to open: Operation not allowed in / home / u312527797 / public_html /


Warning : include () [function.include]: Failed opening '../../class/mysql_crud.php' for inclusion (include_path = '.: / opt / php-5.3 / pear') in / home / u312527797 / public_html / pane / ajax / requests / verifyNew Request .php on line 2

↵ Fatal error : Class 'Database' not found in / home / u312527797 / public_html

on line
btn-outline-info btn-sm 'Here

Could anyone help me solve this problem? Obrigaod

    
asked by anonymous 29.09.2016 / 20:36

1 answer

1

Edit your httpd.conf file (/etc/httpd/httpd.conf). Look for "open_basedir" and set it to "none" (php_admin_value open_basedir none)

In its line 2 the include fails and this generates a series of errors.

Font

    
29.09.2016 / 20:52