Problem with php exec() and Abyss X2 2.7

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
Beginner
-


Joined: 06 Oct 2010
Posts: 10
Location: Germany

PostPosted: Thu Jun 30, 2011 5:04 am    Post subject: Problem with php exec() and Abyss X2 2.7 Reply with quote

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 View user's profile Send private message
Toasty
-


Joined: 21 Feb 2008
Posts: 298
Location: Chicago, IL

PostPosted: Thu Jun 30, 2011 2:26 pm    Post subject: Reply with quote

[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 View user's profile Send private message Visit poster's website
Beginner
-


Joined: 06 Oct 2010
Posts: 10
Location: Germany

PostPosted: Thu Jun 30, 2011 3:48 pm    Post subject: Reply with quote

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 View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Mon Jul 11, 2011 7:50 pm    Post subject: Reply with quote

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 View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group