Output:
Popular on Instagram
Warning: require_once(Zend/loader.php): failed to open stream: No such file or directory in E:\Programs\XAMPP\htdocs\hashtag\list1.php on line 7
Fatal error: require_once(): Failed opening required 'Zend/loader.php' (include_path='.;E:\Programs\XAMPP\php\PEAR') in E:\Programs\XAMPP\htdocs\hashtag\list1.php on line 7
Code:
require_once 'Zend/loader.php';
Zend_Loader::loadClass('Zend_Http_Client');
I've searched a lot but I cannot understand the procedure to solve the issue.
Related
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.
Warning: require(_header.php): failed to open stream: No such file or directory in C:\xampp\htdocs\pages\index.php on line 1
Fatal error: require(): Failed opening required '_header.php' (include_path='C:\xampp\htdocs\classes;C:\xampp\htdocs\pages;C:\xampp\htdocs\mod;C:\xampp\htdocs\inc;;.C:\xampp\php\pear\PEAR') in C:\xampp\htdocs\pages\index.php on line 1
I got this error?
Any one can tell how can I fix this?
I'm getting this error:
Warning: require(/home/wiseman/public_html/path/to/facebook-php-sdk-v4/autoload.php): failed to open stream: No such file or directory in /home/wiseman/public_html/facebook.php on line 3
Fatal error: require(): Failed opening required '/home/wiseman/public_html/path/to/facebook-php-sdk-v4/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/wiseman/public_html/facebook.php on line 3
The sdk has been installed by the host server and I can see the autoload file in exactly the path it's looking for. Anyone know what the problem could be? I'm new to working with facebook and am really green so be gentle! :)
I have downloaded the Twilio PHP library but I am getting an error when I try to include the library in my code.
Below is the error I get:
Warning: require(twilio-lib.php) [function.require]: failed to open stream: No such file or directory in /websites-dev/dev.icalapp.rogersdigitalmedia.com/testing.php on line 11
Fatal error: require() [function.require]: Failed opening required 'twilio-lib.php' (include_path='.:/usr/share/pear:/usr/share/php') in /websites-dev/dev.icalapp.rogersdigitalmedia.com/testing.php on line 11
Someone fudged up somewhere - there is no such twilio-lib.php file in Twilio's PHP library.
Try removing the line in your downloaded PHP that looks exactly or similar to the following:
require "twilio-lib.php";
I'm trying out the zend framework classes for the first time. I am interested in using some of the individual classes for now.
Reading the documentation and some other q's here and in blogs I've tried three ways to load the classes
//attempt 1 - using zend loader
require_once('library\Zend\Loader.php');
Zend_Loader::loadClass('Zend_Date');
//attempt 2 - direct class load
require_once('library\Zend\Date.php');
// attempt 3 - auto load
set_include_path('D:\wamp\www\testPages\zend_test\library\Zend' . PATH_SEPARATOR . get_include_path());
require_once 'Loader\Autoloader.php';
$date = new Zend_Date();
// Output of the desired date
print $date->get();
my folder structure is:
zend_test(folder)
-- testLoad.php (the above code lives there)
-- library(folder)
--- zend(doler)
---- (the zend libs and sub folders)
I get the following error messages:
attempt 1
Warning: include(Zend\Date.php) [function.include]: failed to open stream: No such file or directory in D:\wamp\www\testPages\zend_test\library\Zend\Loader.php on line 83
Warning: include() [function.include]: Failed opening 'Zend\Date.php' for inclusion (include_path='.;C:\php5\pear') in D:\wamp\www\testPages\zend_test\library\Zend\Loader.php on line 83
Warning: require_once(Zend/Exception.php) [function.require-once]: failed to open stream: No such file or directory in D:\wamp\www\testPages\zend_test\library\Zend\Loader.php on line 87
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Exception.php' (include_path='.;C:\php5\pear') in D:\wamp\www\testPages\zend_test\library\Zend\Loader.php on line 87
attempt2
Warning: require_once(Zend/Date/DateObject.php) [function.require-once]: failed to open stream: No such file or directory in D:\wamp\www\testPages\zend_test\library\Zend\Date.php on line 25
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Date/DateObject.php' (include_path='.;C:\php5\pear') in D:\wamp\www\testPages\zend_test\library\Zend\Date.php on line 25
atempt3
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in D:\wamp\www\testPages\zend_test\library\Zend\Loader\Autoloader.php on line 24
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='D:\wamp\www\testPages\zend_test\library\Zend;.;C:\php5\pear') in D:\wamp\www\testPages\zend_test\library\Zend\Loader\Autoloader.php on line 24
Am i missing something?
Your include path should read:
include_path='D:\wamp\www\testPages\zend_test\library;.;C:\php5\pear
When it tries to load the class Zend_Date it looks for a folder called Zend in the include path, with a file called Date.php in it.
All 3 of your methods should work with this corrected, and I recommend attempt 3.
used method 3 and did this to get it working:
set_include_path('D:/wamp/www/zendTest/library/');
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader::loadClass('Zend_Date'); //or whatever zen class
in php.ini remove ";" before line include_Path and restart your wamp!