AliBZ
AliBZ

Reputation: 4099

Run exec function in PHP

I am using exec function to run a bat file and change the default printer. exec file is doing fine, bat file alone is doing fine, but the printer doesn't change when I'm calling the bat file via exec function. I put "echo 1" in the bat file. Browser showed "1" but my printer didn't change. I really need a miracle to solve this !! my OS is Microsoft Server 2003. any ideas?

Upvotes: 0

Views: 884

Answers (1)

Matthew Scharley
Matthew Scharley

Reputation: 132274

Sounds like a permissions issue. The user your web server is running as can run the batch file, but the batch file doesn't have permissions to change the printer (and is failing quietly).

Upvotes: 1

Related Questions