robembra Posted January 19, 2010 Share Posted January 19, 2010 Hi, I have found this class from http://www.phpconcept.net that create tars aswell as extracting them. Extracting works great but i cant create a tar. I am using the following code: $p_tarname = "backup_new.tgz"; $p_list = array("/home/sites/me/public_html/forum"); $p_mode = "tgz"; $output = PclTarCreate($p_tarname, $p_list, $p_mode, $p_add_dir, $p_remove_dir); print("<pre>".print_r($output,true)."</pre>"); With the error: Warning: is_file() [function.is-file]: Stat failed for /home/sites/me/public_html/forum/docs/../docs/../docs/../docs/../../s7/. (errno=13 - Permission denied) in /home/sites/me/public_html/lib/pcltar.lib.php on line 1415 Warning: is_file() [function.is-file]: Stat failed for /home/sites/me/public_html/forum/docs/../docs/../docs/../docs/../../s7/test.tgz (errno=13 - Permission denied) in /home/sites/me/public_html/lib/pcltar.lib.php on line 1415 Warning: opendir(/home/sites/me/public_html/forum/docs/../docs/../docs/../docs/../../../..) [function.opendir]: failed to open dir: Permission denied in /home/sites/me/public_html/lib/pcltar.lib.php on line 1409 Warning: readdir(): supplied argument is not a valid Directory resource in /home/sites/me/public_html/lib/pcltar.lib.php on line 1410 Warning: readdir(): supplied argument is not a valid Directory resource in /home/sites/me/public_html/lib/pcltar.lib.php on line 1411 Warning: readdir(): supplied argument is not a valid Directory resource in /home/sites/me/public_html/lib/pcltar.lib.php on line 1412 The dir s7 it not even in th forum dir so im trully confused Any help greatful thanks Quote Link to comment Share on other sites More sharing options...
jskywalker Posted January 21, 2010 Share Posted January 21, 2010 make sure your $p_list does not contain any links to "../*" .... directory's higher in tree than "/home/sites/me/public_html/forum" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.