Jump to content

Forking


ToonMariner

Recommended Posts

Just read the forking article in thr tutorial...

[url=http://www.phpfreaks.com/tutorials/71/0.php]http://www.phpfreaks.com/tutorials/71/0.php[/url]

Now I have no idea if I have the command line available (I honestly do not have a clue about the cli for php never had to use it) how can I fnd out whether I have the correct tools available AND if you look on the second page of that tutorial there are some paths - one for the executable and one for the script I want to run. How do ensure I have the correct paths here (where can I find out what they shoudl be if they are wrong)

Sorry for being a bellend on this but any help much appreciated.
Link to comment
https://forums.phpfreaks.com/topic/34555-forking/
Share on other sites

The site is hosted on a linux server so it should be. The script that calls the fork runs fine but obviously it has no way of checking if it was successful OR if there was an error in either of the paths entered. Now I am sending mail with the fork which doesn't arrive - is this because I can't fork on the server or because the paths are incorrect?

If the paths are incorrect how do I find the correct path to php and how to make sure the path to my script is correct in relation to which directory the fork starts looking?
Link to comment
https://forums.phpfreaks.com/topic/34555-forking/#findComment-163604
Share on other sites

[quote]how do I find the correct path to php[/quote]

There are a few ways. This simplest would be to use slocate.

[code]
<?php
  $out = exec('slocate php');
  echo $out;
?>
[/code]

If slocate is not installed on the system (highly unlikely) you'll need to view your available paths, then search through them.
Link to comment
https://forums.phpfreaks.com/topic/34555-forking/#findComment-163606
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.