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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.