A few things to try:
- Make sure you have error output enabled (including those pesky E_NOTICEs)
- As others mentioned, if mkdir returns false, it's a failure. Do you have write access?
- Are you really passing 'path/to/directory'? If yes, does 'path/to/' already exist? If 'path/to/' doesn't exist, you need to pass the third bool param as true, the docs are pretty clear on what it does.