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 8653103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:27:47+00:00 2026-06-12T14:27:47+00:00

Possible Duplicate: While I am debugging PHP Script in Eclipse, it doesn’t load mysql

  • 0

Possible Duplicate:
While I am debugging PHP Script in Eclipse, it doesn’t load mysql extension

How can I make phpunit scan the /etc/php5/cli/conf.d directory for ini files?

I am using phpunit, but it is very time-consuming to configure correctly. One issue I just encountered is that ini files for my php extensions do not seem to get loaded properly, when I Lauch phpunit as a “Run Configuration” from within Eclipse.
I basically followed this tutorial: http://pkp.sfu.ca/wiki/index.php/Configure_Eclipse_for_PHPUnit

When run from within eclipse (Menu Run…/Run Configurations…), then
the directory

/etc/php5/cli/conf.d 

which is linked to

/etc/php5/conf.d/

is not parsed.
Thus, for example, file

/etc/php5/conf.d/curl.ini 

is ignored.
I have to add the one-liner to the ini file

 echo "extension=curl.so" >> /etc/php5/cli/php.ini

which seems to solve the problem, but it is counterproductive, because it breaks modularization (and will be gone after the next distri / php upgrade)

To find this issue, I modified phpunit.php
by adding a call to phpinfo() to the beginning of the file.

Here’s the output.

PHP Version => 5.3.10-1ubuntu3.4

System => Linux wb3 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64
Build Date => Sep 12 2012 18:58:31
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /tmp/zend_debug/session6700026373526677062.tmp/php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)

When I inspect /tmp/zend_debug/session6700026373526677062.tmp/php.ini:

using
grep -C 2 extension

I got no output.

After adding extension=curl.so to /etc/php5/cli/php.ini
the curl extension is loaded when I run the phpunit Eclipse-Run-configuration

But the result is different when I run phpunit from the command line.
Now I get

phpunit --debug --verbose  MyClass 
PHP Warning:  Module 'curl' already loaded in Unknown on line 0

Update: (no answers yet)

I found a workaround for my problem:

I created a custom php.ini file in the filesystem, that contains all includes appended, and within Eclipse Preferences for PHP, I create a new configuration for the php5 interpreter, using my special-purpose php.ini.

Within Eclipse Run-Configuration Menu, , setting the Config Dialog Box, I simply point to the new php5-configuration.

But this does not solve the problem, so I’m still looking for answers. Is it an eclipse problem or a phpunit – problem? I have no clue at this time.

  • 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-06-12T14:27:48+00:00Added an answer on June 12, 2026 at 2:27 pm

    This is an expected behavior of Eclipse PDT. For more information, see the similar question and my answer.

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

Sidebar

Related Questions

Possible Duplicate: Call class instance method while debugging in eclipse Is there a way
Possible Duplicate: How can I make a while True break if certain key is
Possible Duplicate: Performance of try-catch in php While using try - catch blocks, even
Possible Duplicate: PHP convert nested array to single array while concatenating keys? Get array's
Possible Duplicate: How to make the + operator work while adding two Points to
Possible Duplicate: Python: Adding element to list while iterating This doesn't seem to work,
Possible Duplicate: PHP Walk through multidimensional array while preserving keys I have a deep
Possible Duplicate: How to avoid entering library's source files while debugging in Qt Creator
Possible Duplicate: How do I make a Div move up and down while Scrolling
Possible Duplicate: Can you remove elements from a std::list while iterating through it? I

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.