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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:03:35+00:00 2026-06-14T15:03:35+00:00

Can someone with a working Zend/PHPUnit installation tell me how PHPUnit.bat should read? I

  • 0

Can someone with a working Zend/PHPUnit installation tell me how PHPUnit.bat should read?

I have installed PEAR and PHPUnit, but PHPUnit.bat appears to have an error in its code.

Having worked through a few issues, I no longer get ‘PHPUnit is not a recognised command’ error. But if I now call “PHPUnit” in the command line nothing at all happens except the command prompt reappears. Indicating some code may have run.

I did some reading and PEAR should be calling a .bat file in ‘c:\zend\zendServer\bin’. I opened this and there is a very short block of code.

if "%PHPBIN%" == "" set PHPBIN=c:\zend\zendserver\bin\php.exe
if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
GOTO RUN
:USE_PEAR_PATH
set PHPBIN=%PHP_PEAR_PHP_BIN%
:RUN
"%PHPBIN%" "C:\Zend\zendServer\bin\\phpunit" %*

The final line looks incorrect, notably the double slash. I have tried various derivations such as ‘bin\pear\phpunit etc’, but are not sure where this should be pointing.

Can anyone with a working ZendServer/PHPUnit installation tell me how this line should read.

Also, I should also ask, is calling ‘PHPunit‘ in the cmd line the best way to test if the package has installed correctly. Ideas appreciated. The PEAR install call suggested the install should be working fine.

UPDATE
I just created a new project through the zend framework CLI tool and got a note that PHPUnit was not found in my include_path. I have both PEAR and PHP on my include path do I need something else?

UPDATE
I found this post on a potential test Getting PHPUnit Working – Include Path not set correctly?, which provides a way to test phpUnit. I saved the suggested PHP script in my htdocs folder and tried to call it with PHPUnit. Once again no response, which seems to suggest that there is a n error in my PHPUnit.bat file.

  • 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-14T15:03:36+00:00Added an answer on June 14, 2026 at 3:03 pm

    Okay this has been a nightmare, but I think I have a solution for anyone facing the same issues.

    Question One: how do I test if PHPUNit is working.
    Answer: typing PHPUnit into the cmd line will give you a list of all the commands and so acts as a good test as to whether the install has worked.

    Question Two: What should PHPUnit.bat look like.

    The text above is correct and the extra slash in PHP.bat does not affect the output as ta.speot.is notes.

    Solution to get install working:

    The issue in this case related to an anomaly with Zend Server. A change to the php config file PHP.ini does not seem to get picked up by the server. It appears that Zend stores the path variables somewhere else. I noted that the changes to the include_path had not been picked up and changed it through the GUI server interface provided with the install.

    PHPUnit is now working correctly.

    For those struggling with an install I would add two lessons to add to the huge range of posts on the topic.

    1) if you have ever had Zend on your computer. Beware an uninstall leaves trace files that can complicate later installs.

    2) There is PHPUnit.ini file that gets saved in the c:\windows directory be sure to delete this before starting the install.

    3) The following link is an excellent set of instructions http://www.zendexperts.com/2011/06/21/how-to-install-zend-server-ce-pear-phpunit/.

    The only change I would make is when using go-pear.php to install PEAR, do not activate errors as suggested in the post, otherwise the interface does not seem to work and issues a large number of errors in the PEAR php.

    Hope this helps someone save a couple of days.

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

Sidebar

Related Questions

Can someone maybe tell me why this is not working? I have used echo
Can someone tell me how can I get MS Entity Framework working with PostgreSQL.
can someone help me with this? I have an AlertDialog box and its working
Can someone tell me why this accordion is not working? The ajax call works
Can someone please tell me why this isn't working? I would like to be
Can someone confirm that -checkResourceIsReachableAndReturnError: method of NSURL is working as expected. I have
Can someone tell me why my program is working weird. I am trying to
Can someone tell me why the below code is not working? public partial class
Can someone tell me why return false is not working? I just want to
can someone explain to me why this isn't working. logically it makes sense, but

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.