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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.