how to set develop environment for zend framework

2019-09-12 07:20发布

问题:

hey guys I need your help for setting environment for zendframe work ? I have installed my netbeans in D: drive under D:/program files/netbeans. and the zend framework is under D: drive. and my wamp package is installed under c:/wamp. now what i need is to configure these all for my development?

I searched google, stackoverflow and every blog i could for the whole day. but all that I got is a error given below.

'"php.exe"' is not recognized as an internal or external command, operable program or batch file.

tell me how can I solve this ? what should I do ? Do I need to set all these under one roof or I need to upgrade my PHP version ???

Yes My config is written below.

WAMP Server 2.0c with PHP 5.2.6, MySQL 5.0.51b, Apache 2.2.8.

Netbeans 7.1.1 and Zend framework 1.11.11

回答1:

Add php.exe to your environment variable PATH. If you add the directory where php.exe is installed to your PATH environment variable (you may need to log out for it to take effect), it should work.

See this tutorial



回答2:

You may actually specify the path to PHP interpreter within Netbeans, in Options - PHP - General tab.

Perhaps you should set up the include_path as well to make Zend modules (at least autoloading one) recognizable.



回答3:

Update to a more up-to-date version of PHP first.

Then, ensure that PHP is on your environment PATH variable. You can look up on google how to do that.

You'll have to install phpunit too after you get that setup. WAMP might come with it but I doubt it. Usually this is easy if you have pear. You can get the pear commands from the phpunit site.

If you don't have pear you'll have to install that. Download a 'go-pear.phar' file that is appropriate to you. You usually install it by running php go-pear.phar' and then you can use pear it install phpunit.

You can then call it a day OR you can continue setting up Netbeans to automatically use phpunit.

If you don't setup netbeans then you'll have to just use phpunit on the command line.

After the pear phpunit install just run phpunit on the command line and you should get some sort of 'help' output.

Edit : Step by step details.

I'm going to assume you have xdebug, php, netbeans installed from your comments. It seems like your only issue is installing phpunit.

Here goes.

  1. Open up a command prompt

  2. Open a browser window.

  3. In your browser go to http://pear.php.net/go-pear

  4. Save the text file that comes up into the directory php is installed in.

  5. Go to the php directory php is installed in via the cd command on the terminal.

  6. Type in the command php go-pear.phar

  7. Follow the installation instructions for pear and pick the options that make the most sense. I just install everything in the php directory so php and pear live in the same place.

  8. After pear is installed type in the following commands ( from the phpunit install website : http://www.phpunit.de/manual/current/en/installation.html ) You might have to use sudo here, if you're on windows maybe not.

    pear config-set auto_discover 1

    pear install pear.phpunit.de/PHPUnit

9 Run phpunit -h on the command line and you should get some help message. If you're on windows you might have to open up a new command line prompt before you try this.