exec does not work, but same command in DOS does.
Posted: Mon Nov 03, 2008 3:36 pm
I think this has more to do with my apache configuration, but I'll start here hoping someone else has had a similar problem.
First off, I'm using wampserver on a pc. I have a script that prints labels to a printer connected to that pc. when I run the following command in DOS I successfully receive a label.
COPY label.zpl LPT1.
When I run the following script I do not receive a label.
exec("copy label.zpl LPT1", $output);
The result of $output is "0 file(s) copied".
There is an error in my apache log stating the following:
The system cannot find the file specified.
Can anyone offer some ideas as to why this would work in DOS, but not via the exec function?
Like I said, I think this is an apache config problem, but the part that puzzles me is that it worked just fine on a different computer and I don't recall having to change the apache config in order to get it to work.
Thanks in advance.
First off, I'm using wampserver on a pc. I have a script that prints labels to a printer connected to that pc. when I run the following command in DOS I successfully receive a label.
COPY label.zpl LPT1.
When I run the following script I do not receive a label.
exec("copy label.zpl LPT1", $output);
The result of $output is "0 file(s) copied".
There is an error in my apache log stating the following:
The system cannot find the file specified.
Can anyone offer some ideas as to why this would work in DOS, but not via the exec function?
Like I said, I think this is an apache config problem, but the part that puzzles me is that it worked just fine on a different computer and I don't recall having to change the apache config in order to get it to work.
Thanks in advance.