phpseclib gives me a strange erros - php

Im trying to use this, but it just gives me this errors and i have no clue how to fix that..
Warning: include_once(Math/BigInteger.php): failed to open stream: No
such file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 891
Warning: include_once(): Failed opening 'Math/BigInteger.php' for
inclusion (include_path='.:/usr/share/php:/usr/share/pear') in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 891
Warning: include_once(Crypt/Random.php): failed to open stream: No
such file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 895
Warning: include_once(): Failed opening 'Crypt/Random.php' for
inclusion (include_path='.:/usr/share/php:/usr/share/pear') in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 895
Warning: include_once(Crypt/Hash.php): failed to open stream: No such
file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 899
Warning: include_once(): Failed opening 'Crypt/Hash.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 899
Warning: include_once(Crypt/Base.php): failed to open stream: No such
file or directory in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 904
Warning: include_once(): Failed opening 'Crypt/Base.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 904
Fatal error: Call to undefined function
phpseclib_resolve_include_path() in
/home/www/sfs_web/statistics/_public/_functions/Server/Net/SSH2.php on
line 1226
include('Net/SSH2.php');
$ssh = new Net_SSH2('host');
if (!$ssh->login('user', 'pass')) {
echo('Login Failed');
}
$ssh->exec('the cmd line...");
$ssh->disconnect();

phpseclib is probably not in your include_path. Quoting phpseclib.sourceforge.net,
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');
include('Net/SSH2.php');
?>
You'll need to adjust that as appropriate. If phpseclib is in the vendor/phpseclib directory then do 'vendor/phpseclib' instead, etc.

Yep, you need set_include_path.
And, in my way I've replace in ssh2.php all include directive
include_once(Math/BigInteger.php)
on
stream_resolve_include_path(Math/*****.php)

For CodeIgniter <=3,
set_include_path(get_include_path() . PATH_SEPARATOR . APPPATH.'libraries/phpseclib');

Related

failed to open stream: No such file or directory Warning: require_once Fatal error: require_once():

Warning: require_once(/home/kronaglobal/public_html/system/startup.php): failed to open stream: No such file or directory in C:\xampp\htdocs\kronaglobal\index.php on line 22
Fatal error: require_once(): Failed opening required '/home/kronaglobal/public_html/system/startup.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\kronaglobal\index.php on line 22
Please help if anyone know this.

How to fix this gettallheaders.php error in laravel?

I am making a laravel instragram clone website but suddenly after some development When i run php artisan serve this error occurs .
PHP Warning: require(I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php): failed to open stream: No such file or directory in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
Warning: require(I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php): failed to open stream: No such file or directory in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required 'I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php' (include_path='C:\xampp\php\PEAR') in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
Fatal error: require(): Failed opening required 'I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php' (include_path='C:\xampp\php\PEAR') in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
I:\LARAVEL\laravel-instagram-clone>php artisan serve
PHP Warning: require(I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php): failed to open stream: No such file or directory in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
Warning: require(I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php): failed to open stream: No such file or directory in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
PHP Fatal error: require(): Failed opening required 'I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php' (include_path='C:\xampp\php\PEAR') in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
Fatal error: require(): Failed opening required 'I:\LARAVEL\laravel-instagram-clone\vendor\composer/../ralouphie/getallheaders/src/getallheaders.php' (include_path='C:\xampp\php\PEAR') in I:\LARAVEL\laravel-instagram-clone\vendor\composer\autoload_real.php on line 66
Seems composer dependencies are missing.
Open terminal, browse to root of the project directory then Try run.
composer install

include_once failed to open stream and Warning: include_once(): Failed opening.for inclusion (include_path='.:/usr/share/pear:/usr/share/php')

I am getting below error . I have already tried with dir , document root, require_once and require.
This error i am getting in Live Server.
Warning: include_once(/storage/ssd1/655/2980655/public_html/Lib/DB//MysqliDb.php): failed to open stream: No such file or directory in /storage/ssd1/655/2980655/public_html/index.php on line 8
Warning: include_once(): Failed opening '/storage/ssd1/655/2980655/public_html/Lib/DB//MysqliDb.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /storage/ssd1/655/2980655/public_html/index.php on line 8
Thank you in Advance.

unable to connect multiple database in codeigniter

i have two database in a single project. I am trying to connect with the second database for generating one query but it is throwing error on my console. Please help me with this problem
Below Model code i used
//---------connecting with 2nd db--------------------------------------------
public function fetch_all_approved_template_list($limit,$start)
{
$dsn = 'mysql://fitappweb:fitappweb#localhost/fitneapp_webapp';
$dsnDB = $this->load->database($dsn, TRUE);
$dsnDB->limit($limit, $start);
$query = $dsnDB->order_by('routine_id', 'DESC')->join('userdetails', 'userdetails.user_id = template_routines.creater_id')->get_where('template_routines',array('status_code'=>'1'));
$data=array();
if ($query->num_rows() > 0)
{
foreach ($query->result() as $row) {
$data[] = $row;
}
return $data;
}
return false;
}
Error On the browser window
Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(): Failed opening 'application/errors/error_php.php' for inclusion (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(): Failed opening 'application/errors/error_php.php' for inclusion (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(): Failed opening 'application/errors/error_php.php' for inclusion (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(): Failed opening 'application/errors/error_php.php' for inclusion (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(): Failed opening 'application/errors/error_php.php' for inclusion (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(): Failed opening 'application/errors/error_php.php' for inclusion (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(application/errors/error_php.php): failed to open stream: No such file or directory in D:\xampp\htdocs\system\core\Exceptions.php on line 182
Warning: include(): Failed opening 'application/errors/error_php.php' for inclusion (include_path='.;D:\xampp\php\PEAR') in D:\xampp\htdocs\system\core\Exceptions.php on line 182
error_php.php in a codeigniter application usually contains:
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
<h4>A PHP Error was encountered</h4>
<p>Severity: <?php echo $severity; ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
</div>
you can place this in your application/errors/error_php.php file. And you will get more details as to what the errors being generated are.
Have you tried setting up the group name in the config file?
After that then you would only have to call it by the group name
$this->load->database('group_name');
Check application/config/databases.php for setting up your database next you can load the database using
$this->load->database('group_name',TRUE);
Read this to manually connect :
http://ellislab.com/codeigniter/user-guide/database/connecting.html
You need to pass an array when loading your DB.
I wouldn't advise connecting manually but your choice.

About PHP Dig And Install

I am working on something and it is not working. I am getting this error:
Warning: include(../includes/config.php) [function.include]: failed to open stream: No such file or directory in /home/valerie2/public_html/elinkswap/snorris/install.php on line 24
Warning: include(../includes/config.php) [function.include]: failed to open stream: No such file or directory in /home/valerie2/public_html/elinkswap/snorris/install.php on line 24
Warning: include() [function.include]: Failed opening '../includes/config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/valerie2/public_html/elinkswap/snorris/install.php on line 24
Warning: include(../libs/auth.php) [function.include]: failed to open stream: No such file or directory in /home/valerie2/public_html/elinkswap/snorris/install.php on line 25
Warning: include(../libs/auth.php) [function.include]: failed to open stream: No such file or directory in /home/valerie2/public_html/elinkswap/snorris/install.php on line 25
Warning: include() [function.include]: Failed opening '../libs/auth.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/valerie2/public_html/elinkswap/snorris/install.php on line 25
Fatal error: Call to undefined function phpdighttpvars() in /home/valerie2/public_html/elinkswap/snorris/install.php on line 27
Here is the code that it is getting the error:
24. include $relative_script_path.'./includes/config.php';
25. include $relative_script_path.'./libs/auth.php';
26.
27. extract( phpdigHttpVars(
array('step'=>'integer',
Ok on line 24 where the include is there is a dot I put that in there cause sometimes it will help. But it didn't have one there before and I still had the error. I am not understanding why I can not get these to work. Can someone help me understand?
The actual file it is looking for is
$relative_script_path.'./includes/config.php';
One way to debug is to die with that path, then you can check what it's really looking for:
die($relative_script_path.'./includes/config.php');
The page should stop at that point and display the entire file path. You usually then see what the error could be.

Categories