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
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);

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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