Jump to content

php and Eclipse


gally

Recommended Posts

I wrote a scrit which mounts an external device, makes some backups then umount the device.

Everything works ok when I run the script under Eclipse PHP debugger but fails to unmount the device if I run it as localhost.

 

this is the code

 

$umount = '/bin/umount -f '.$drive;
....
u_mount($umount, $error=512);
....

 

This is the called function

function u_mount($cmd, $error) {
    $output = array();
    $return_var = 0;
    $return_var = exec($cmd, $output, $return_var);
    $return_var = $return_var + $error;
   .... some checks 
}

 

In both cases (Eclipse and localhost) $return_var is always 0 but in localhost the umount is not executed and the device is still mounted

 

Any idea?

 

Thanks in advance

Gally

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/230020-php-and-eclipse/
Share on other sites

I am not sure if this will fix your problem or not. I never tried this:

usermod -G users www-data

 

Then add the user option to fstab

/dev/sda1        /foo/foo     ext3     user,noauto,umask=0002    0   0

 

/foo/foo needs to change to your mount point and ext3 may not be the file system type.

And /dev/sda1 may not be your device.

Link to comment
https://forums.phpfreaks.com/topic/230020-php-and-eclipse/#findComment-1184808
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.