could not execute a file generated by php from terminal

I am trying to execute a file from terminal generated by PHP.
When i manually type the file, its executing the perfect. But when it is generated by PHP program, it throws an error.

The permission of both files are same.

I have attached image with error in terminal.
The code is related to import of MySQL database to ElasticSearch Cluster.

enter image description here

Asked By: Rafee

||

Check for trailing spaces after the terminal backslashes .

There should not be any!

Answered By: czapa.ols

If the permissions are indeed the same, run this:

diff -c normal.script php-output.script

File names are self explanatory I believe.

Answered By: xyz
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.