Jump to content

rar_open crashes apache!


bobbinsbro

Recommended Posts

hi all.

i am trying to extract a .rar file into a destination folder using this function:

 

function uncompRar($pathNname) {
$rh = rar_open($pathNname);
$list = rar_list($rh);
foreach ($list as $file){
	$entry = rar_entry_get($rh, $file);
	$entry->extract(getcwd().'/pics/'.$file);		
}
rar_close($rh);
}

 

every time i run this function, apache crashes, and restarts. i checked (by commenting out different lines) and found that the crash occurs at rar_open();

 

the lines from apache log re. the crash are:

This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team for more information.

[Mon Oct 27 22:54:32 2008] [notice] Parent: child process exited with status 255 -- Restarting.

[Mon Oct 27 22:54:32 2008] [notice] Apache/2.2.9 (Win32) PHP/5.2.6 configured -- resuming normal operations

 

help please!

 

i have php 5.2.6 with rar ext installed.

i have apache 2.2.9 running on vista home premium 32-bit.

Link to comment
https://forums.phpfreaks.com/topic/130339-rar_open-crashes-apache/
Share on other sites

I'm going to guess that there is not any other relevant information in the log because php error_reporting or logging is disabled. Start by putting the following two lines immediately after your first opening <?php tag -

 

ini_set ("display_errors", "1");
error_reporting(E_ALL);

- i have error reporting on, and they display to stdout. i tried adding what you suggested with no difference.

- the log is not the php error log (which has nothing logged in it as a result of this problem), but the apache error log.

- i got the .dll from the php installer, as the rar extension is bundled with the win32 php 5.2.6 installer.

 

i'll try to explain what happens better.

 

i run a script that passes the full path + file name of a .rar file to the function i posted. once the script attempts to rar_open(), the browser hangs for about 10 seconds with a "waiting for localhost" msg in the browser status bar. then i get a windows vista msg that httpd.exe (apache service) crashed and will restart. the output to the browser page is the same as what i get when i try to run a php file while my apache server is stopped.

 

i verified that the problem is with rar_open(). the rest of the script works just fine, as i use the same code (but with a different function call) to decompress zip files.

  • 1 month later...

I'm having the very same problem, and my environment looks to be very similar to yours (PHP 5.2.6, Apache 2.2.9, Vista HP).

Apache's error.log is not very helpful:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
[crit] Parent: child process exited with status 3 -- Aborting.

 

Did you ever find a solution to this issue?

Any help would be greatly appreciated.

Again, not very helpful.

 

Major results included a hotfix for WinXP not applicable to my environment, and disabling Vista's UAC, which does nothing to solve the issue.

 

Anyone ELSE want to take a crack at this?  I'm particularly interested in responses from anyone who has actually encountered this issue and resolved it...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.