Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7614529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:25:34+00:00 2026-05-31T02:25:34+00:00

I installed PHPUnit 3.6.10 recently. I don’t understand what is wrong with the include_path

  • 0

I installed PHPUnit 3.6.10 recently.

I don’t understand what is wrong with the include_path in php.ini file

the php.ini files being used are as follows

Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
Additional .ini files parsed:      /etc/php5/cli/conf.d/curl.ini,
/etc/php5/cli/conf.d/mysql.ini,
/etc/php5/cli/conf.d/mysqli.ini,
/etc/php5/cli/conf.d/pdo.ini,
/etc/php5/cli/conf.d/pdo_mysql.ini

another file being used by Apache2 is /etc/php5/apache2/php.ini

I have changed the include paths both in cli/php.ini and apache2/php.ini

the include path which I wrote in php.ini is

include_path = ".:/home/username/pear/share/pear:/usr/share/php

previously the include path was

include_path = .:/usr/share/php:/usr/share/pear

but the error form PHPUnit is this way

    PHP Warning:  require_once(PHPUnit/Framework.php): failed to open stream: No such file or directory in /home/username/public_html/PHP-Library/APITest.php on line 14
PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Framework.php' (include_path='.:/home/username/pear/share/pear') in /home/username/public_html/PHP-Library/APITest.php on line 14

This is written in the APITest.php file

require_once 'PHPUnit/Framework.php';

Could anybody explain what the problem is? Is there any other place where I need to make changes in php.ini?

Update

when I run below command

$ php -c /path/to/php.ini -r 'echo get_include_path()."\n";'
.:/usr/share/php:/usr/share/pear

update 2
When I remove require and extend PHPUnit_Framework_TestCase I get the following error
in apache2 logs I found

[Sun Mar 11 14:54:58 2012] [error] [client 127.0.0.1] PHP Fatal error:  Class 'PHPUnit_Framework_TestCase' not found in /home/username/public_html/phplib/APITest.php on line 15
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:25:36+00:00Added an answer on May 31, 2026 at 2:25 am

    PHPUnit 3.6 has its own autoloader that is responsible for making all of the classes available without using require. Simply extend the test case in your tests without worrying about PHPUnit.

    class MyTest extends PHPUnit_Framework_TestCase { ... }
    

    Update

    When running your tests through the browser, you’re bypassing the phpunit executable which sets up the autoloader. Add

    require_once 'PHPUnit/Autoload.php';
    

    to your index.php script (or whatever runs the tests).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have PHPUnit and xdebug installed, and in my php.ini files for CLI I've
I installed PHPUnit and my Test class looks like this: require_once 'PHPUnit/Framework/TestCase.php'; class Test
I've just installed PHPUnit and wrote a quick class which I saved to C:\PHP
I've installed pear using this guide http://t-machine.org/index.php/2008/12/28/how-to-install-pear-on-os-x-105/ In /etc/php.ini my include_path = .:/usr/local/PEAR PHPUnit
I'm using PHPUnit to try to unit test some PHP files that are part
C:\Program Files\PHP>pear install phpunit/PHPUnit Did not download optional dependencies: ezc/ConsoleTools, use --alldeps to download
I have installed PHPUnit on Windows 7, with PHP and Pear. I have a
So I have manually installed PHPUnit by downloading the files from pear.phpunit.de and extracting
i installed PHPUnit via pear and cannot find the phpunit.bat file to add to
Just installed the latest SDK for iPhone 2.1. When I go to File ->

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.