I started a thread in viewtopic.php?f=1&t=96324&p=523920#p523920 and was encouraged to use the shell_exec command in order to execute a PHP script with no timeout. It was suggested that I could access a parameter using a (system?) variable called $argv[1] but I'm not able to get this working, nor can I find any hint as to how to correctly pass a parameter through a shell_exec command. I was given an example that uses a dash (-) before a parameter, but I cannot find any information to explain what is valid and what is not, nor whether $argv[1] value is something I must somehow define or manage.
Bottom line: I am back at Ground Zero. I need to create and run scripts to import some text files into a database. I cannot find any way to do this that does not require much more advanced knowledge of LAMP than I have -- and after spending dozens of hours, I cannot find any hint as to how to obtain the knowledge I need.
Thanks in advance for any help.
Using shell_exec command, parameters
Moderator: General Moderators
Re: Using shell_exec command, parameters
After more trial and error, I confirmed that the dash should NOT be included before the parameter.
My tedious "ten steps forward, nine steps back" experience is continuing.
My tedious "ten steps forward, nine steps back" experience is continuing.
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: Using shell_exec command, parameters
Are you trying to execute a PHP script without time outs? Just use:
Code: Select all
ini_set('max_execution_time',0);