Showing posts with label Yii. Show all posts
Showing posts with label Yii. Show all posts

Install and Configure cURL on Windows

How to install and configure cURL on windows for DOS?

Problem configuring cURL on windows? Download cURL library or alternative download for win 7 64 bit. Click and run setup, it will install all software and certificates automatically in 
C:\Users\Name\AppData\Local\Apps\cURL folder.

If everything worked then you need only to setup environment variable to use it from command prompt. Follow these steps to configure.

Right click on Computer->Advanced system settings->Advanced Tab->Environment Variables->System Variables->Path->Edit->Variable value

Now paste here full path of curl.exe just adding a `;` in last

e.g. %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

Then paste in last like this

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Users\Anamika\AppData\Local\Apps\cURL\bin\curl.exe;

Now open command prompt ant type curl you will see something like this

curl:  try 'curl --help' or 'curl --manual' for more information.

That's it.


Installing PhpUnit on windows

How to install PHPUnit on windows?

Before proceed you must ask, "what is PHPUnit?". Well, I was learning Yii, a web application MVC framework and read about a program that can automatically test our application as a real user, that program is PHPUnit developed by Sebastian Bergmann. This program is written as php classes and can automate testing work for you like unit test and functional test. Then I decided to install and use it as it is not bundled with php.

So here are some help for you if you wish to go with PHPUnit.

If you want to download file for windows check this. But best way is to install via cmd. Its simple and fast.

1-Open cmd (press window key +r. Then type cmd and then press enter key)
2.Go to php path in your installation (if you have installed xampp in d drive then type in cmd prompt cd d: then press enter. Now type cd xampp\php then press enter )
2-check your php version (type php -v)
3-Now check if PHPUnit is installed or not (type phpunit -v)
4-if it shows something like PHPUnit 3.7.21 by Sebastian Bergmann. then you have already installed it.


In case you don't have installed it type following commands

pear channel-update pear.php.net
pear upgrade-all
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear update-channels

These will take some time so be patient. You can see progress in cmd. Once it all finishes run this command

pear install --alldeps --force phpunit/PHPUnit

It will download phpunit in your xampp. You can check it now as in step 4.
Enjoy.