0

So I just made a question about symbols, but yeah, while the symbols are now working properly, there is still a problem with UNIX commands.

The thing is, whenever I input a value that starts with / and follows with a UNIX command, the host responds with - 501 Method Not Implemented.

What causes this, how to prevent this, and am I right that this happens because of MySQL in CLI environment?

Yes, here in Latvia currency is "Lats", abbreviated to "Ls" and our client tend to seperate values like - "Ls 3 for students, Ls 2 for retirees /Ls 1 for children". And the /Ls there screws it all up.

Thanks in advance!

0

1 Answer 1

1

http://php.net/manual/en/function.escapeshellcmd.php

However, if you're passing queries to Mysql via a command line, then you're defniitely doing it VERY VERY wrong. The mysql functions in PHP communicate directly with the database via sockets (either unix-domain or TCP). There should NEVER be a shell/command line involved in the process anywhere.

Sign up to request clarification or add additional context in comments.

1 Comment

Not my creation, linked question gives a bit more in-depth look into the situation. But yes, that's what I was looking for. Never had a problem with that, because I'm never using CLI/Sockets for my projects, therefore the question. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.