Re: Exec() function not doing as I want (OSX)
On Sep 23, 3:36 pm, Maarten <b...@blah.comw rote:
Also this should not apply to Mac OSX, but on Vista with Xampp, to get
executables to run from the exec() in php, I had to chase down cmd.exe
in the windows\system3 2 folder and set it to always run as
administrator before any exe's were executable using exec(). Maybe
something similar on the mac?
Bill H
On Sep 23, 3:36 pm, Maarten <b...@blah.comw rote:
Bill H wrote:
>
>
>
>
>
>
>
>
>
>
>
I changed the code to:
>
$discOutput = exec('cd /dev/rdisk2; /Volumes/Users/maarten/discid',
$ooutpuut);
>
Also have I changed the permission of discid to 555. No change, however.
The problem remains. Both returned variable/array are empty.
>
Maarten- Hide quoted text -
>
- Show quoted text -
On Sep 19, 3:35 pm, Maarten <b...@blah.comw rote:
Howdy,
Recently I switched from a Windows PC to Mac OS-X 10.5 (php v5.2.6) and
I have a little problem with one function within my cd-management script.
I have a little problem with one function within my cd-management script.
For extracting a bit of info from my cd's I have an executable which I
execute with exec():
execute with exec():
$discOutput = exec('./discid /dev/rdisk2');
The executable is in the same directory as the php script is in. When I
run the same line from Terminal within that same directory it gives me
the output I want, php doesn't give me any ouput at all.
run the same line from Terminal within that same directory it gives me
the output I want, php doesn't give me any ouput at all.
Asking exec() for output on a basic function like 'ls' does return a
value, so the function is active. I guess somehow I am not pointing to
the discid executable correctly, but I don't see what is wrong.
value, so the function is active. I guess somehow I am not pointing to
the discid executable correctly, but I don't see what is wrong.
Can someone tell me what I am doing wrong?
Thanks in advance, Maarten
I had a similar issue when runnning a script in linux under apache. It
took awhile for me to figure out I had to "cd" to the directory I
wanted to work in and use an absolute path to the exe that is being
executed. You may want to try something like this:
took awhile for me to figure out I had to "cd" to the directory I
wanted to work in and use an absolute path to the exe that is being
executed. You may want to try something like this:
$discOutput = exec('cd /dev/rdisk2;[fullpathto discid]/discid');
Bill H
I changed the code to:
>
$discOutput = exec('cd /dev/rdisk2; /Volumes/Users/maarten/discid',
$ooutpuut);
>
Also have I changed the permission of discid to 555. No change, however.
The problem remains. Both returned variable/array are empty.
>
Maarten- Hide quoted text -
>
- Show quoted text -
executables to run from the exec() in php, I had to chase down cmd.exe
in the windows\system3 2 folder and set it to always run as
administrator before any exe's were executable using exec(). Maybe
something similar on the mac?
Bill H
Comment