|
How can a PHP script start another PHP script, and then exit, leaving the other script running?
Also, is there any way for the 2nd script to inform the PHP script when it reaches a particular line?
Started by Jeremy Rudd on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Exec("./somescript.php &");
Additionally, if that doesn't and then calling....
<?php ob_end_clean(); header using php's OS execution functions with & .
And then close the connection, while your script keeps running until it's done.
|
|
Hmmmm... ok, so I'm trying to do exactly the same thing as in my previous python question, but in php. See my previous (answered) question
So lets say that php script from previous question does something and then runs another php script on the same server...
Started by Phil on
, 7 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
However, that comment', and also it seems the....
If a user will be using a web browser to reach the php script, I would use ajax to call the second in the PHP documentation ) and include the other script as your post-processing.
|
|
How can I run several PHP scripts from within another PHP script, like a batch file? I don't think include will work, if I understand what include is doing; because each of the files I'm running will redeclare some of the same functions, etc. What I want...
Started by Charles on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
For example, your://www.php.net/manual....
script could do:
<?php exec('php -q script1.php'); exec('php -q script2.php'); ?>
Exec has someYou could use the exec() function to invoke each script as an external command.
|
Ask your Facebook Friends
|
I have a series of php scripts that I want to run in a particular order. I tried using:
<?php exec('file1.php'); exec('file2.php'); exec('file3.php'); ?>
to accomplish this, but just got a series of errors. If I run them from the command line, they...
Started by phpN00b on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If the state of each script is well isolated;?php system("php -f path/to/your/script/file1.php"); system("php -f path/to/your/script/file2.php"); system....
php file1.php') Or, just use a shell script if on *nix.
|
|
How would I go about running a php script when I pressed say an "update" button, in which then it would run say script x1.php (which has no echo's or or other output, successes or failed) then update the current page (I know the update part can be done...
Started by Mint on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Button" onclick="go();" value= "Update" /> function go() { $.ajax( { type: "POST", url: "script x1.php", data: data, // data to send to above script page if any cache: false, success: function(response) { // update code for your page....
|
|
How do I make python (local) run php script on a remote server ?
I don't want to process its output with python script or anything, just execute it and meanwhile quit python (while php script will be already working and doing its job).
edit: What I'm ...
Started by Phil on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Import subprocess def php(script_path): p = subprocess.Popen(['php', script_path] )
If python is ....
Paraphrase the answer to http://stackoverflow.com/questions/1060436/how-do-i-include-a-php-script-in-python .
|
|
I need to change the server date by running a bash script called by php. When i invoke the bash script from shell it works, but if i call it via php then it doesn't work. The bash script is run as root.
php script code:
<?php $time = $_POST['input_...
Started by Tutul on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
First, I assume you realize that PHP script is susceptible to command injectionIf you run....
Running the PHP script from the command-line as root or through a web interface? When you access the PHP web server as root.
|
|
Is there a way to change PHP core value "allow_url_fopen" in the PHP script?
On my hosting it is set to 'off' and I need it 'on'.
Started by Mark V on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
File System Configuraion....
Note: This setting can only be set in php.ini due to security reasons .
You're out of luck unless you have access to the php.ini
allow_url_fopen boolean
.. .
No :
Note: This setting can only be set in php.ini due to security reasons .
|
|
I am templatizing my php.ini using PHP. I have a script to set up a development environment by generating httpd.conf, apachectl, and php.ini from templates using a CLI PHP script. Unfortunately there are literal <? and <?php strings in php.ini (...
Started by nohat on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You are asking how you can embed interpreted <....
This:
<?php echo "<?php"; ?>
Will output:
<?php
A quick & simple solution would parsed, simply replace those unique markers back with the corresponding php tag.
|
|
Running Fedora 9/10, Apache 2, PHP 5...
Can I run a shell script as root, from a PHP script using exec()?
Do I just give Apache root priveleges, and then add "sudo" in front of them command?
Specifically, I'm trying to start and stop a background script...
Started by SkippyFire on
, 7 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
So make;?php $handle = fsockopen("udp://localhost",12345); fwrite($handle,"Start Script"); fclose($handleThat would be huge....
A security risk, because anyone could create a PHP script and run your shell script in turn.
|