I've a problem with PEAR (PHP). This is the error:
Warning: require_once(DB.php): failed to open stream: No such file or directory in /WWW/xxx.php on line 2
Fatal error: require_once(): Failed opening required 'DB.php' (include_path='.:/usr/share/php:/usr/share/pear') in /WWW/xxx.php on line 2
I've already installed PEAR (version 1.9.0)
In my PHP file the first two lines are these:
1- <?php
2- require_once('DB.php');
Where's the problem?
Thank you all!
You need to install the module:
pear install DB
Although this page gives a warning about this package being superseded (not deprecated) by MDB2.
You can also install module without using pear:
With Fedora/CentOS:
yum install php-pear-DB
With Debian/Ubuntu:
apt-get install php-db
--
Dario
Related
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20121212/raphf.so' - /usr/lib/php5/20121212/raphf.so:
cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20121212/propro.so' - /usr/lib/php5/20121212/propro.so:
cannot open shared object file: No such file or directory in Unknown on line 0
It's exactly saying what the error is. It can't open the libraries. Those libraries either dont exist in that folder or apache doesnt have the right to read them.
You need to install the propro and raph php extensions.
On Centos you'd do something like this
yum install php-raphf
yum install php-propro
For Ubuntu use apt-get
apt-get install php-raphf
apt-get install php-propro
Cakephp is my first PHP framework. I followed the instructions in Documentation / install. It seems everything was correct, but when i tried to run, i get errors:
Warning: require(/var/www/html/caketest/vendor/autoload.php): failed
to open stream: No such file or directory in
/var/www/html/caketest/config/bootstrap.php on line 23
Fatal error: require(): Failed opening required
'/var/www/html/caketest/vendor/autoload.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/html/caketest/config/bootstrap.php on line 23
im using ubuntu with php 5.5.9, pear is installed
I tried to find the solution but without sucsess.
How to correct these errors?
I found out that there was a missing package in my system. - php5-intl
It was written in official CakePHP install manual, and i checked it but looks like not well.
Install manual for php5-intl
http://php.net/manual/en/intl.setup.php
ps: restart apache after instalation
sudo /etc/init.d/apache2 restart
daloRadius is an open source and free software based on php, i downloaded it and trying to run it in waamp server, after the login page i am getting this error
include_once(DB.php): failed to open stream: No such file or directory in C:\wamp\www\daloradius-0.9-9\library\opendb.php
I have searched thoroughly the db.php file but couldnt find it in the folder, what should I do? Do Ii have to create the file?
I was working on a ubuntu 14 based freeradius setup and daloradius as web interface, encountered the same issue.
PHP Warning: include_once(DB.php): failed to open stream: No such
file or directory in /var/www/html/daloradius/library/opendb.php on
line 84
Installing php-db worked for me:
sudo apt-get install php-db
You are missing the PHP Pear DB library. Install the library via pear install DB
I am trying to use Visual PHPUnit https://github.com/NSinopoli/VisualPHPUnit/
My OS is OSX version 10.8.5.
I installed pear .It works well. I checked following the http://pear.php.net/manual/en/installation.checking.php#installation.checking.cli.phpdir
I installed phpunit via pear.
When I run I got the error
( ! ) Warning: require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in /Users/myname/Sites/VisualPHPUnit/app/config/bootstrap.php on line 83
( ! ) Fatal error: require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='.:/usr/share/pear/share/pear:/Users/myname/pear/share/pear:/usr/local/pear/share/pear:/Users/myname/Sites/VisualPHPUnit:/usr/local/pear/share') in /Users/myname/Sites/VisualPHPUnit/app/config/bootstrap.php on line 83
So is PHPUnit folder supposed to be under pear path or in my project path?
And is my phpunit installation problem?Any one help me?
To see where pear installed phpunit do
$ pear list phpunit/phpunit
I get this warning message in my php:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sqlite.so' - /usr/lib64/php/modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
How should I fix that? Where can I get this sqlite.so file?
You don't need to get it. Just remove the line referencing the shared object.
cd /etc/php5
grep -rinH sqlite .
Since PHP 5.4 sqlite is only available via PECL.
If you want to get the library, try sudo apt-get install php-sqlite or yum install php-sqlite or similar.
Two ideas: (Re-) install php-sqlite on your machine or remove the line which loads the sqlite.so. Mostly done by an extra config in /etc/php5/conf.d/
If you don't have shell access, call you system administrator and give him that error message.
The .so file was removed in Ubuntu 11.10 (bug report here), however you can still install it manually...
Download the old package: http://packages.ubuntu.com/natty-updates/php5-sqlite
Extracts sqlite.so to the required directory
Change it's ownership to root:root
you must have sure sqlite installed
goto /etc/php.d and find sqlite.ini
you must somethong like : extension=mysql.so
mysql.so must be in : /usr/lib64/php/modules/
if not you must install it
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so' - dlopen(/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so' - dlopen(/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so, 9): image not found in Unknown on line 0
I was getting this error/warning resolved it by uninstalling and installing redis
brew uninstall php54-redis
brew install php54-redis
I had the same warning when I wanted to install the symfony/security-bundle bundle in my Symfony 4 project:
composer require symfony/security-bundle
Here the warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/lib/php/modules/pdo_sqlite (/usr/lib/php/modules/pdo_sqlite: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_sqlite.so (/usr/lib/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
I checked my /etc/php/php.ini file and I uncommented the line extension=pdo_sqlite line. I had to install the package php-sqlite via my package manager because the file pdo_sqlite.so must be present in the /usr/lib/php/modules/ folder:
pacman -S php-sqlite
After, I typed again the composer command and the warning disappeared. I hope my answer can help you.