View previous topic :: View next topic |
Author |
Message |
Beginner -
Joined: 06 Oct 2010 Posts: 10 Location: Germany
|
Posted: Thu Jun 30, 2011 5:04 am Post subject: Problem with php exec() and Abyss X2 2.7 |
|
|
There is a problem when running the PHP commands exec() and system() with the Abbys webserver 2.7 with PHP 5.3.6.
Under the webserver version 2.6 works the command as expected.
With the following simple script, the error can be observed.
<?php
echo("Notepad is launched<br>");
system('notepad.exe');
echo("Notepad runs<br>");
?>
Under version 2.6 notepad.exe started and then finished the script.
The notepad.exe program window opens.
Under version 2.7 the script hangs in the line system('notepad.exe');
In taskmaneger you can see the notepad.exe process, it opens but no program window.
The script hangs until the notepad.exe process is killed in the taskmaneger.
My system is Windows 7 Professional 64 bit with X2 2.7.
I hope, you can help.
Thanks. _________________ http://www.photonensammler.eu |
|
Back to top |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Thu Jun 30, 2011 2:26 pm Post subject: |
|
|
[quote=You]The script hangs until the notepad.exe process is killed in the taskmaneger. [/quote]
That is the intended functionality of the system call. You'd have to do process forking to execute it in the background without impeding the execution of your script. _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
Beginner -
Joined: 06 Oct 2010 Posts: 10 Location: Germany
|
Posted: Thu Jun 30, 2011 3:48 pm Post subject: |
|
|
Toasty wrote: |
That is the intended functionality of the system call. You'd have to do process forking to execute it in the background without impeding the execution of your script. |
But why the program works as expected in version 2.6 ?
The start of notepad.exe is in the script just a simple example.
I discovered the error because my program is supposed to print a PDF document in the background.
The original call is system('"C:\Program Files\Tracker Software\PDF Viewer\PDFXCview.exe" /print'.$pdf_filename);
With Abyss 2.6 works the program, with Abyss 2.7 hangs the script, it will not print.
In task manager I can see the process PDFXchview.exe.
The execution of the script will continue only if I kill this process ...and nothing is printed. _________________ http://www.photonensammler.eu |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1295
|
Posted: Mon Jul 11, 2011 7:50 pm Post subject: |
|
|
Beginner,
We guess you were running Abyss Web Server 2.6 in your user session (launched as a normal application) but that you've installed 2.7 as a Windows Service.
When Abyss Web Server is running as a Windows Service, this means that the executable is inside a minimalist environment with no access to the desktop, the user interface (Windows and so on) or normal services (such as printing). So any application that requires or uses these user level features won't run normally. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
|