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!
3
Answers
Please try to use either
root relative url
like,or
absolute url
likeDon’t use
document relative url
.maybe the problem is in the
.htaccess
file. If you use html extension files and write inside on php, in.htaccess
you should add:AddType application / x-httpd-php5 .html
I modified the system default config (yaml below) for php-fpm in cPanel to set the php
open_basedir
as a security measure. Since doing that, I also got theinclude_path
error you had.To fix, add this:
Mind the indentation.
To:
Then, for good measure, I force WHM to rehandle the file by using the WHM steps:
Hope that helps!