bmaid Posted May 13, 2007 Share Posted May 13, 2007 Hi, I am new to this forums and php. I have a php script that needs monitoring of one of its feature. This monitoring can be done by PIDs? My programmer said - 'we can monitor the script by getting PIDs (either from posix or shell, i don't know wha these means...) from server so we can know the script running that particular feature'. Can these getting PIDs allowed by hosts? not a security risk to script? Using PIDs is common among php coders? I don't know coding. So asking your opinions please. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/ Share on other sites More sharing options...
bmaid Posted May 13, 2007 Author Share Posted May 13, 2007 Anybody please???? Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-252241 Share on other sites More sharing options...
Wuhtzu Posted May 13, 2007 Share Posted May 13, 2007 I personally don't understand what you are asking about. What exactly do you mean by "monitoring of one of its features"? Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-252258 Share on other sites More sharing options...
bmaid Posted May 14, 2007 Author Share Posted May 14, 2007 More simply put, is it common to use PIDs with php scripts? Thanks Wuhtzu! Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-252470 Share on other sites More sharing options...
Wuhtzu Posted May 14, 2007 Share Posted May 14, 2007 PID's? To me PID means either "Process ID" or "Page ID" and ID's for pages are very common: index.php?pid=contact, index.php?pid=home and I don't think that's what you mean, so I think you have to explain more about what you wanna use them for. The monitoring thing Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-252601 Share on other sites More sharing options...
bmaid Posted May 14, 2007 Author Share Posted May 14, 2007 PID means (atleast in my concern) are Process IDs. System gives a number to each process? The feature is: the script creates certain webpages in my area at certain interval and delete them after certain interval. So to stop script to create second set of pages while there are first set of pages, it needs some checking. right? So PIDs are advisable to use php scripts? Thanks Wuhtzu! Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-252673 Share on other sites More sharing options...
Wuhtzu Posted May 14, 2007 Share Posted May 14, 2007 Well if PID means Process ID I don't see how you intend to use with PHP. Process ID's do not exist for a php-script since they aren't processes and a PHP script can't run it self at a specific time. It needs to be requested by a user or a task manager like cron. So lets say you have "createwebpage.php" and "deletehomepage.php" you can set a task manager each script with a specific time interval. You have to explain your self in more detail and maybe present some code Wuhtzu Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-252680 Share on other sites More sharing options...
bmaid Posted May 14, 2007 Author Share Posted May 14, 2007 Wuhtzu, I am affraid I am not explaining it... I just want to know PIDs (that are run by server) can be ALLOWED/ADVICED to be used by php scripts without any problems? Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-252722 Share on other sites More sharing options...
Wuhtzu Posted May 15, 2007 Share Posted May 15, 2007 Okay, then I can't answer your question. I don't what you would use them for... certainly not monitor anything that has to do with the script. You could monitor some other software to check if its running or so... Look at http://no2.php.net/manual/en/function.proc-get-status.php http://no2.php.net/manual/en/function.proc-open.php Good luck Wuhtzu Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-253351 Share on other sites More sharing options...
trq Posted May 15, 2007 Share Posted May 15, 2007 Your really not being clear with the description of your problem. Are these php scripts being run through a server or are they standalone scripts? If the later, yes its possible to get the PID of each script. Otherwise, your PID's are going to be child processes of the server, and allot more difficult to track down. Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-253382 Share on other sites More sharing options...
Wuhtzu Posted May 15, 2007 Share Posted May 15, 2007 And what will they be used for, the PID's? Alot of things can be advisable in one situation and advised against in another. Quote Link to comment https://forums.phpfreaks.com/topic/51176-question-about-pids-please-help/#findComment-253435 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.