# \[PHP\] Path names in exec()

**URL:** <https://forum.kirupa.com/t/php-path-names-in-exec/220905>\
**Category:** programming\
**Created:** [March 30, 2007, 9:13am UTC](https://forum.kirupa.com/t/php-path-names-in-exec/220905 "2007-03-30T09:13:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theHollow](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thehollow/32/106_2.png) [@theHollow](https://forum.kirupa.com/u/theHollow)\
**Post date:** [March 30, 2007, 9:13am UTC](https://forum.kirupa.com/t/php-path-names-in-exec/220905/1 "2007-03-30T09:13:26Z")

</div>

I’m trying run htpasswd.exe from a php page on localhost. I wanted to use php’s crypt function but windows only allows the MD5 passwords. I can run the program fine from DOS but when i try the full path name in the exec function i get:

‘c:\Program’ is not recognized as an internal or external command,

I’ve even tried urlencoding the path name but that doesnt work. I haven’t tried moving the htpasswd.exe file to the same file as the php script but I don’t want to do that.

Does anyone have any suggestions?
