Question: My setup is as follows: Windows 7, XAMPP with Apache and PHP enabled I have a PHP script in which I call an external program to do run a conversion. This external program is an EXE file, which requires 3 attributes:

* The source file
* The destination file
* Additional flags (conversion type etc)

When I use the command line tool built into XAMPP to execute my script, everything works fine. But when I use the exec() function in my PHP script, no output file is created. I'm pretty sure the conversion is actually happening (it takes about 5 seconds, about the same time it takes to run the PHP script).

I think it's a permissions thing, so I already moved the EXE file to the same folder as my PHP file and adjusted the permissions of the entire folder (I granted all permissions to all users). I also disabled the Windows UAC and tried to put the command in a BAT file. The file just is not created.

Any help or tips would be greatly appreciated!

My PHP code is as follows:

```
exec('c:\converter.exe c:\src.txt c:\dst.txt -f', $output);
print_r($output);

```

When I print out $output, the array turns out to be empty. When I put the exact same command in Command Prompt, the code works like a charm (no syntax errors). I use absolute paths as well.

Answer: 
The default driver for Capybara is Rack::Test. Your page probably requires javacript which means that Capybara's default driver is not rendering everything correctly. Just set `Capybara.default_driver = :selenium`. This way the javascript is run correctly. 

See also [link](http://www.opinionatedprogrammer.com/2011/02/capybara-and-selenium-with-rspec-and-rails-3/), which explains how to change the driver for only one testcase and not the whole test suite. Note that if you use selenium as the driver the method `save_and_open_page` probably won't work.
I needed to add to `spec_helper.rb` the line

```
require 'capybara/rspec'

```

and use default browser driver