Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Execute a perl script from PHP?

by kcott (Archbishop)
on Apr 02, 2016 at 11:16 UTC ( [id://1159362]=note: print w/replies, xml ) Need Help??


in reply to Execute a perl script from PHP?

G'day jtzako,

"ssh: illegal option -- M"

This sounds like a pathing issue. You have code somewhere that's expecting ssh to have an M option; however, the version of ssh that's been found (using PHP) has no such option. Presumably, your command line version, does have an M option.

From your update:

"If I run the script manually using my own login it works. However if I try to sudo -su to the web server's username it never connects ..."

That's a bit more evidence in favour of a pathing problem. Here's the type of thing that I think's happening:

$ which ssh /opt/local/bin/ssh $ ssh -V OpenSSH_5.9p1, OpenSSL 1.0.0e 6 Sep 2011 $ echo $PATH ...:/opt/local/bin:...:/usr/bin:... $ sudo su - Password: # which ssh /usr/bin/ssh # ssh -V OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 # echo $PATH ...:/usr/bin:...
"... the error_log I see some errors ..."

This is a good place to look when troubleshooting; another is access_log (see Log Files). You might also consider temporarily changing the LogLevel for more verbose feedback.

See also: Environment Variables in Apache; Apache Module mod_ssl; Apache HTTP Server Documentation.

— Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1159362]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-16 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found