Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    run sh-script over php

    have a sh script that copy a email-file (web0p9) to a other folder and set new rights so i can read it in php.
    the sh-script works in the shell but not when i run it over php.
    WHY ?

  2. #2
    Linux Newbie
    Join Date
    Apr 2005
    South America
    How do you call the script form within php?

    I might be shooting in the dark, but when php runs (actually, controled by apache) it does it through a different user account that the one you have ran the script with, i.e the apache process is a different user from the one you log into your box, so It might be a permissions problem

  3. #3
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    You need to make the shell script executable and change ownership to the apache user (you can find this out in your httpd.conf). Then use the system() or passthru() functions.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts