Note that there are some explanatory texts on larger screens.

plurals
  1. PORunning php script from comand line
    primarykey
    data
    text
    <p>SO I'm trying to get a php script file to run from command line. This is a test of the command as when I have it working i should be able to make a scheduled task using that command to run the script every five minutes. Oddly enough when running it from the command line I get an error but if I were to navigate to the php file through my browser it works for its intended purpose. </p> <p>Here's the command I'm running:</p> <pre><code>Z:\&gt;php -f "C:\inetpub\wwwroot\IT Helpdesk\inc\mail\hesk_pop3.php" </code></pre> <p>And here's the output:</p> <pre><code>´╗┐The temporary directory "C:\inetpub\wwwroot\IT Helpdesk/attachments/44b767c4d f322d255695e8ef356f4d0f" doesn't exist. </code></pre> <p>I can't work out why it would run on the browser fine but not in the command line. Is it my command? If I run it again I get a different message:</p> <pre><code>´╗┐The temporary directory "C:\inetpub\wwwroot\IT Helpdesk/attachments/26ff3c6dd b0e3c84e0b36bd5543ad270" doesn't exist. </code></pre> <p>The php script seems to be trying to create a temporary directory which makes me think that it could be a permission issue with the file. Does the command prompt run under my user account or a system account?</p> <p>Any help on where I might be going wrong would be much appreciated</p> <p>EDIT</p> <p>Seems I was on the right track thinking about permissions. I gave user accounts modification control over the file (oddly I didn't have it despite being admin). This meant that the script could run through the command line which is exactly what I need.</p> <p>Thanks for putting up with my ramblings. Sometimes trying to explain your problem helps to understand it! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload