Jump to content

Mental Blockage


matfish

Recommended Posts

Hi,

 

trying to run a .php script (on the same server) using a .sh script.

 

I thought it was something like

#!/bin/bash
curl "http://www.domain.com/script.php"

 

but it's saying "curl command not found" - but curl is on the server.. Mental blockage as I've done something similar before - any help?

 

Many thanks

Link to comment
https://forums.phpfreaks.com/topic/172681-mental-blockage/
Share on other sites

Sounds like you aren't using the absolute path to curl.  Try:

/usr/bin/curl

instead of just curl.

 

The reason for this is since you just a shebang in your script, it isn't importing the PATH variable correctly.  This will fix the "command not found" issue anyways- I'm not getting into whether curl or wget is the best way to do what you're trying to do.

Link to comment
https://forums.phpfreaks.com/topic/172681-mental-blockage/#findComment-914435
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.