Jump to content

[Solved] Failed opening required Archive_Tar.php

Recommended Posts

This one gave me quite a headache. Scroll to the bottom of the post for the solution.


I tried to make some translations on a on shared hosting, when I received the

Failed opening required 'path/to/site/public_html/tools/tar/Archive_Tar.php'

message. I fired my FTP client - the file was not there. No problem, I reuploaded it. Tried again, same message. Checked directory, file is not there. WTF? I reuploaded it. This time I refreshed the view and, sure enough, the file disappeared. Thinking there's some misunderstanding with the server security, I started to cut text from within the file and reupload after every cut. Soon enough, I discovered that the server didn't like this expression from Archive_Tar.php:


I uploaded an Archive_Tar.php that contained only the expression above and the server promptly killed it. OK. In order to use the symlink() function on that server, it must not use the killing-trigger string from above.


One way is to use the call_user_func_array() PHP function. In, at line 1679 in /tools/tar/Admin_Tar.php, you have

if (!@symlink($v_header['link'], $v_header['filename'])) {

Replace it with

if (!@call_user_func_array('symlink', array($v_header['link'], $v_header['filename']))) {

Replace it, don't comment it, or else the server will still see the suposed threat and kill your Admin_Tar.php. It is still the same function, but thanks to the awesomeness of PHP we can just call it in a different way.

Link to comment
Share on other sites

  • 5 months later...
  • Create New...