mikeytown2
mikeytown2

Reputation: 1764

Running a php cli script and I'm getting Argument list too long

I did encounter this error bash: ...: Argument list too long but I reduced the number of arguments and I have this error: exec: 90: /usr/bin/php: Argument list too long. how can I increase the argument list in PHP?

Upvotes: 2

Views: 2110

Answers (1)

Jeffrey Kevin Pry
Jeffrey Kevin Pry

Reputation: 3296

It isn't PHP causing that error it's bash. It only allows so many arguments. There are ways around it however. Most likely the script is doing something like if you execute "md5sum *" in a directory with 5,000 files, you'll get the same error; even though the only argument you passed is *. 5,000 filenames are passed.

Check here:

http://www.linuxjournal.com/article/6060

Good luck!

Upvotes: 4

Related Questions