Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP Zip error [bad paths?]
Old 10-11-2007, 09:34 PM PHP Zip error [bad paths?]
taelmx's Avatar
Novice Talker

Posts: 10
Trades: 0
Code:
Warning:  rename(/tmp/phpftp/mget-1192151901/phpFtp-download.zip,/tmp/phpftp/phpFtp-download.zip): No such file or directory in /home/content/t/a/e/taelmx/html/RTO_Upload/inc/FtpClient.inc on line 1239
That's the error message I'm getting...I think I have a bad path set for the zip module, it's currently "usr/bin/zip -r". It also might be the temp folder that's not working. I'm using godaddy hosting also, I sent them a support ticket asking where they have theses paths. It might be something completely different though...
taelmx is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-12-2007, 04:24 AM Re: PHP Zip error [bad paths?]
Galaxian's Avatar
Rich Powell

Posts: 842
Name: Rich Powell
Location: United Kingdom
Trades: 0
Could I see more of the code please?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please help get the new
Please login or register to view this content. Registration is FREE
forum started for Webmasters like you!

Galaxian is offline
Reply With Quote
View Public Profile Visit Galaxian's homepage!
 
Old 10-12-2007, 01:40 PM Re: PHP Zip error [bad paths?]
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
use is_file to check the file exits ...
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 10-12-2007, 08:26 PM Re: PHP Zip error [bad paths?]
taelmx's Avatar
Novice Talker

Posts: 10
Trades: 0
Quote:
Originally Posted by solomongaby View Post
use is_file to check the file exits ...
I already know that the file isn't there, I think that's either because there isn't a zip module there or because the temporary path isn't valid.

Here is a snippet of the script:

PHP Code:
  /* *****************************************************************
   * Directories
   * *****************************************************************/

  /* Temporary directory for downloads */
    
$GLOBALS['FTP_DOWNLOAD_DIR'] = '/tmp/phpftp';

  
/* Temporary directory for uploads */
    
$GLOBALS['FTP_UPLOAD_DIR']   = '/tmp/phpftp';

  
/* *****************************************************************
   * Downloading
   * *****************************************************************/

  /* Default archive name and extension 
   *
   * The extension can be either : 
   *
   *  - zip
   *  - tar.gz
   *  - tar.bz2
   */
    
$GLOBALS['FTP_DEFAULT_ARCHIVE_NAME'] = 'phpFtp-download';
    
$GLOBALS['FTP_DEFAULT_ARCHIVE_TYPE'] = 'zip';

  
/*
   * Configuration for commands to pack and unpack archives.
   * You may want to look at the _unpackArchive() method in
   * inc/asPhpFtpClient.inc, to understand how these are peiced together
   */

  /* Command to build zip file */
  
$GLOBALS['FTP_ZIP_CMD']  = '/usr/bin/zip -r';

  
/* Command to build tar archive */
  
$GLOBALS['FTP_TAR_CMD']  = '/bin/tar -c';

  
/* Command to compress using bzip2 compression */
  
$GLOBALS['FTP_BZIP_CMD'] = '/bin/bzip2';

  
/* Command to compress using gzip compression */
  
$GLOBALS['FTP_GZIP_CMD'] = '/bin/gzip';    

  
/* Command to unpack a zip file */
    
$GLOBALS['FTP_UNZIP_CMD']  = '/usr/bin/unzip';

  
/* Command to unpack a tar archive */
     
$GLOBALS['FTP_UNTAR_CMD']  = '/bin/tar -x';

  
/* Command to uncompress bzip'd file */
  
$GLOBALS['FTP_UNBZIP_CMD'] = '/bin/bunzip2 -c';

  
/* Command to uncompress gzip'd file */
  
$GLOBALS['FTP_UNGZIP_CMD'] = '/bin/gunzip -c'
If the temporary directory or the zip command were wrong, it would make sense that it would give an error saying that the file cannot be found...

Also, I got a reply from Godaddy support:

Code:
Thank you for contacting Online Support. Please note you do not have shell access on the server. If you wish to create a zip file, it would be necessary to first download the files, at which point you can zip them on your local machine. We apologize for any inconvenience this may cause.
Their response was pretty much useless...=_____=
taelmx is offline
Reply With Quote
View Public Profile
 
Old 10-13-2007, 12:36 PM Re: PHP Zip error [bad paths?]
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
what do you need to zip the files for ?

i would recomend to zip/archive them with a software you install ... meaning use a php class or pear, this way you will not depend on you're server at all and you could save the files in you're own directory within you're acces rights
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 10-14-2007, 12:17 AM Re: PHP Zip error [bad paths?]
taelmx's Avatar
Novice Talker

Posts: 10
Trades: 0
I can't zip them on my local machine, because the file needs to be on the server (without manually zipping it and uploading it). As far as a PHP Class...that might work if it's something I could altar with Godaddy's server privileges.

Basically I have a PHP based FTP client script on the server. It should allow you to download selected files from a server as a zip file, and upload multiple files.

(If there is a more 'user friendly' (PHP, Java, Flash, etc) FTP script that you know of, please recomend it...=])

Last edited by taelmx; 10-14-2007 at 12:22 AM..
taelmx is offline
Reply With Quote
View Public Profile
 
Old 10-15-2007, 04:22 PM Re: PHP Zip error [bad paths?]
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
try this ones
http://www.planet-source-code.com/vb...d=957&lngWId=8
http://www.weberdev.com/get_example-4499.html
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Old 10-15-2007, 05:01 PM Re: PHP Zip error [bad paths?]
taelmx's Avatar
Novice Talker

Posts: 10
Trades: 0
Thanks! I think these will work! Now just to do a little editting...
taelmx is offline
Reply With Quote
View Public Profile
 
Old 10-16-2007, 03:46 PM Re: PHP Zip error [bad paths?]
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
you welcome ... talkupation is appreciated
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Reply     « Reply to PHP Zip error [bad paths?]
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.98742 seconds with 12 queries