ToonMariner Posted January 17, 2007 Share Posted January 17, 2007 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. Quote Link to comment Share on other sites More sharing options...
utexas_pjm Posted January 17, 2007 Share Posted January 17, 2007 You need a *nix system in order to fork processes. I'm not sure that the tutorial conveyed that.Best,Patrick Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted January 18, 2007 Author Share Posted January 18, 2007 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? Quote Link to comment Share on other sites More sharing options...
trq Posted January 18, 2007 Share Posted January 18, 2007 [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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.