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 Link to comment https://forums.phpfreaks.com/topic/188974-pcltar-cant-create-new-tar/ 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" Link to comment https://forums.phpfreaks.com/topic/188974-pcltar-cant-create-new-tar/#findComment-999553 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.