Skip to content
Advertisement

php include_path=’.:/opt/cpanel/ea-php70/root/usr/share/pear’ error in cpanel

I was testing my php application on My wampServer (localhost) and its ALL works! But, when i uploaded this same application to my webserver i got this inssue:

PHP Fatal error: require_once(): Failed opening required ‘util/DB_Connect.php’ (include_path=’.:/opt/cpanel/ea-php70/root/usr/share/pear’) in /home/th27664/minierp.sistemaids.com.br/header.php on line 5

I have no idea why, because its the same files that i used to my localhost application

Here is part of my code:

<body class="animsition">
<?php 

        require_once 'header.php';
    require 'controller/controllerProduto.php';
        require 'controller/ControllerEmitente.php';
        $controle = new ControllerProduto();
        $ControleEmitente = new ControllerEmitente();

Important Detail: My header.php file is on the same folder of this file.

Thank you, very much!

Advertisement

Answer

Please try to use either root relative url like,

require_once ‘/home/youraccount/public_htm/yourdirectory/header.php’

or absolute url like

require_once ‘http://yoursite.com/yourdirectory/header.php

Don’t use document relative url.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement