cmd.php always opens separate Windows

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
JGeorge
Posts: 2
Joined: Fri Feb 04, 2005 8:11 am

cmd.php always opens separate Windows

Post by JGeorge »

Hello,

I am using the cmd.php poller with PHP 5 and for each polling cycle,
I get about three cmd- windows at my screen which disappear when
the command finishes.
I had a look at poller.php in the ...\cati\lib - directory and I found that
the statement " pclose(popen("start \"Cactiplus\" /I /B \"" . $filename . "\" " . $args, "r")); " is executed.

But the switches /I and /B should avoid the opening of new windos !!??
:oops:

some ideas ??
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Don't run the poller as the same user that you are logged in as. :)

That is the solution I have seen many people post.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
JGeorge
Posts: 2
Joined: Fri Feb 04, 2005 8:11 am

Post by JGeorge »

Hi Rony,

this is the solution for this problem. !!
Thanks a lot
eddievenus
Cacti User
Posts: 60
Joined: Mon Jul 18, 2005 7:01 pm

Post by eddievenus »

I am having the same problem I believe.

I am using 8 processes and I get 8 windows that pop up. All saying Cactiplus across the top. They run, obviously doing their job since my graphs are all showing the right data. However in 8.6f which I was at before, this did not happen. Only since I upgraded to 8.6g. I do not want to go back, since I know I am not the only one running this on XP, but everyone else seems to be working right.

I tried to make a new user for this task in Task Manager. That worked for a bit I thought, but I was wrong, the boxes came back. Then I read that it needed to be the system account. So I set it to that. Same effect. Then I though why not just try other accounts. None seem to make any difference.

How else do I run the poller as another user.

When I look at the user that the poller is actually running under, using process explorer, it is running as the system account. or at least that is what php.exe and cmd.exe run as.

Please help, this is terribly annoying, especially since this machine is RDPd into by a number of people all day, and it seems that the first one to log in gets this problem. Until they log out, then it becomes the first to log in again.

Thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You happen to be running Apache under your user account? That will probably generate 'black windows' when Cacti graphs are created. Same fix, run the apache service under a different user account.
eddievenus
Cacti User
Posts: 60
Joined: Mon Jul 18, 2005 7:01 pm

Post by eddievenus »

I hate posting something just to figure it out a minute later.

I have been working on this for days now. (a few minutes at a time mostly) and not found any way to stop it. Finally I post, then while looking at the previous post I notice that my bin\poller.php is different than the one posted by JGeorge.

Mine was like this
pclose(popen("start \"Cactiplus\" /I \"" . $filename . "\" " . $args, "r"));
so I added the /B so that it is now like this
pclose(popen("start \"Cactiplus\" /I /B \"" . $filename . "\" " . $args, "r"));

and it works just like it used to.

Hooray.

Thanks JGeorge for posting that info, you inadvertantly fixed my problem.
eddievenus
Cacti User
Posts: 60
Joined: Mon Jul 18, 2005 7:01 pm

Post by eddievenus »

BSOD2600

No apache, IIS 5.1
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests