Wordpress server change error - php

I uploaded my WordPress directory from localhost to server but the following error occurs
Warning: require_once(/home/greenvalleyfruits/greenvalleyfruits.com/sctc/wp-includes/wp-db.php): failed to open stream: No such file or directory in/home/greenvalleyfruits/greenvalleyfruits.com/sctc/wp-includes/load.php on line 345`
Fatal error: require_once(): Failed opening required '/home/greenvalleyfruits/greenvalleyfruits.com/sctc/wp-includes/wp-db.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in/home/greenvalleyfruits/greenvalleyfruits.com/sctc/wp-includes/load.php on line 345

Related

PHP Fatal error: require()

I have a website that works perfect in my localhost with xampp, but... I uploaded it to a few free websites hosting (000webhost and hostinger) and when i try to open it, got this message:
Warning: require(core/libs/smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/u327900732/public_html/www/index.php on line 7
Fatal error: require(): Failed opening required 'core/libs/smarty/Smarty.class.php' (include_path='.:/opt/php-5.5/pear') in /home/u327900732/public_html/www/index.php on line 7
This is the code:
<?php
session_start();
$view = isset($_GET['view']) ? $_GET['view'] : 'index';
require_once('core/libs/smarty/Smarty.class.php');
require('core/models/class.Conexion.php');
if(file_exists('core/controllers/'.$view.'Controller.php')){
include('core/controllers/'.$view.'Controller.php');
}else {
include('core/controllers/errorcontroller.php');
}
?>
I checked that file one hundred times and it is there.
I found and tried this solutions:
Changing Require for Include:
Warning: include(core/libs/smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/u327900732/public_html/www/index.php on line 7
Warning: include(): Failed opening 'core/libs/smarty/Smarty.class.php' for inclusion (include_path='.:/opt/php-5.5/pear') in /home/u327900732/public_html/www/index.php on line 7
Fatal error: Class 'Smarty' not found in /home/u327900732/public_html/www/core/controllers/indexController.php on line 3
require(chdir(dirname(FILE)) . 'core/libs/smarty/Smarty.class.php');
Warning: require(1core/libs/smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/u327900732/public_html/www/index.php on line 7
Fatal error: require(): Failed opening required '1core/libs/smarty/Smarty.class.php' (include_path='.:/opt/php-5.5/pear') in /home/u327900732/public_html/www/index.php on line 7
Changing line 7 for
require_once($_SERVER['DOCUMENT_ROOT'].'/core/libs/smarty/Smarty.class.php');
Warning: require_once(/home/u327900732/public_html/core/libs/smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/u327900732/public_html/www/index.php on line 7
Fatal error: require_once(): Failed opening required '/home/u327900732/public_html/core/libs/smarty/Smarty.class.php' (include_path='.:/opt/php-5.5/pear') in /home/u327900732/public_html/www/index.php on line 7
I tried adding './' to the path but it still doesn't work. I repeat, the site works perfect in my localhost. Help please!
Trying to use complete url to test your url. Or check in your browser to check the file exist or not. Like here:
http://host.com/core/libs/smarty/Smarty.class.php
I think it will show error that show your file isn't exist there.

My Laravel 4 app shows errors when uploaded to my website

I am new to Laravel 4. When I upload my app to my website it shows errors. How should I configure it to fix it?
Warning: require(__DIR__/../bootstrap/autoload.php) [function.require]: failed to open stream: No such file or directory in /home/a4651312/public_html/laravel/public/index.php on line 21
PHP Error Message Fatal error: require() [function.require]: Failed opening required '__DIR__/../bootstrap/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a4651312/public_html/laravel/public/index.php on line 21.
I put my app (name laravel) in public_htmt and sent a link from default.html to public.

link path solution in localhost environment: http:// wrapper is disabled in the server configuration by allow_url_include=0

I have seen this question asked and answered many times, but I can't seem to get a solution for myself
Here is my basic folder structure:
http://localhost/cms/
To grab all my code I have a utilities file located here:
http://localhost/cms/includes/utilities.inc.php
and within that file I have requires()s to include classes, as such:
require('classes/Post.php');
require('classes/User.php');
require('classes/Comments.php');
require('classes/Category.php');
when I try and include my http://localhost/cms/includes/utilities.inc.php file into the following directory it doesn't work! http://localhost/cms/admin/
when I try I get this error:
Warning: require(classes/Post.php): failed to open stream: No such file or directory in C:\xampp\htdocs\cms\includes\utilities.inc.php on line 12
Fatal error: require(): Failed opening required 'classes/Post.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cms\includes\utilities.inc.php on line 12
When Using Absolute Paths In My Utility File:
require('http://localhost/cms/classes/Post.php');
require('http://localhost/cms/classes/User.php');
require('http://localhost/cms/classes/Comments.php');
require('http://localhost/cms/classes/Category.php');
I get the following error:
Warning: require(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in C:\xampp\htdocs\cms\includes\utilities.inc.php on line 12
Warning: require(http://localhost/cms/classes/Post.php): failed to open stream: no suitable wrapper could be found in C:\xampp\htdocs\cms\includes\utilities.inc.php on line 12
Fatal error: require(): Failed opening required 'http://localhost/cms/classes/Post.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cms\includes\utilities.inc.php on line 12
How can I get a system that will link properly (preferably WITHOUT anything PEAR related)?

WP-admin is not working, showing php errors

Warning: require(wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/tratam79/public_html/masoarafebra.ro/wp-admin/index.php on line 17
Warning: require(wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/tratam79/public_html/masoarafebra.ro/wp-admin/index.php on line 17
Fatal error: require() [function.require]: Failed opening required 'wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tratam79/public_html/masoarafebra.ro/wp-admin/index.php on line 17
Those are the errors I get when trying to access wp-admin. As of now I've tried forging the full URL to the files. Any ideas?
It could be your wordpress file is missing or not accessible. If you just upload it, it might be it is not uploaded completely.

Error loading CMSMS website

I just uploaded a CMSMS website, but cannot view the website. Am getting the error:
Warning:
require(/home/inkbran1/public_html/century21nigeria/lib/smarty/Smarty.class.php)
[function.require]: failed to open stream: No such file or directory
in /home/inkbran1/public_html/century21nigeria/include.php on line 153
Fatal error: require() [function.require]: Failed opening required
'/home/inkbran1/public_html/century21nigeria/lib/smarty/Smarty.class.php'
(include_path='.:/usr/lib/php:/usr/local/lib/php') in
/home/inkbran1/public_html/century21nigeria/include.php on line 153
Please, what can i do? I am a PHP dummy.
Make sure that the file Smarty.class.php is in the directory listed in the error message.

Categories