Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

can't start Windows processes the background with phpcli

Featured Replies

I have the both the Uniserver and WAMP5 running. The following line starts a process in the background with the WAMP5 installation, but with the Uniserver, the process starts in the foreground with the title of the command window set to "bla".

 

pclose(popen("start \"bla\" \"".$path_phpexe.$phpexe."\" -f W:/www/services/xmlrpc.php " . $args, "r"));

 

Any suggestions?

  • Author

So the title is set to blah?

 

yes. I'm no expert on the windows start command, but I'm assuming that bla are switches, one of which puts the process into the background.

 

regardless, the same script on the same desktop works fine with WAMP5, but not the uniserver.

 

WAMP5 = php5.2.1

uniserver = php 5.1.1

 

Is that the reason, or am I doing something wrong?

  • Author

oooooo.. oooo... so your problem is the fact that the windows command window shows? does it stay?

 

Yes, the command window shows with the title set to 'bla', the switches. The command window closes when the process is complete.

 

With WAMP5, the process starts in the background, without a command window.

pclose(popen("start \"bla\" \"".$path_phpexe.$phpexe."\" -f W:/www/services/xmlrpc.php " . $args, "r"));

 

The start command starts a new command window, the first parameter, if in quotes, is taken as the Title hence the reason you see "bla" in the title bar.

 

The line looks wrong why use start! popen should just run the program as is with the "r" argument

 

Try this and see if it works

 

pclose(popen("$path_phpexe.$phpexe."\" -f W:/www/services/xmlrpc.php " . $args, "r"));

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.