Find Jobs
Hire Freelancers

create zip file on server using PEAR on PHP 5.1.6

$10-30 USD

Cancelled
Posted about 10 years ago

$10-30 USD

Paid on delivery
I need to create .zip files on a server running PHP 5.1.6. Recompiling PHP is currently not an option. However, PEAR is installed and can create zip files, but I can't get it to work. The code below throws an error regarding missing second parameter: &$innerWriter The PEAR support docs are no help in solving what "&$innerWriter" needs to be. What I'm looking for is one working example on our server that can create zip files using php with PEAR. <? include ('/usr/share/pear/File/Archive/Writer/[login to view URL]'); $obj = new File_Archive_Writer_Zip('[login to view URL]'); // name of zip file $files = array('[login to view URL]','[login to view URL]'); // files to store if($obj->create($files)) { echo 'Created successfully!'; }else{ echo 'Error in file creation'; } ?> returns: Fatal error: Call to a member function newFile() on a non-object in /usr/share/pear/File/Archive/Writer/[login to view URL] on line 77 Do you know how to make this work?
Project ID: 5723989

About the project

3 proposals
Remote project
Active 10 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $32 USD for this job
User Avatar
Hello, With 99% completion rate, 650+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 average rating, can be verified on my profile page !!)... you can never go wrong choosing me :) I look forward to your reply. Thanks. Kind Regards, Rajesh Soni
$33 USD in 1 day
5.0 (466 reviews)
7.4
7.4
User Avatar
i can help you on this. i can help you on this. i can help you on this. i can help you on this. i can help you on this. i can help you on this. i can help you on this. i can help you on this. i can help you on this.
$24 USD in 3 days
5.0 (188 reviews)
7.0
7.0
User Avatar
Hello, I can fix that right now. an FTP is required please. Also, did you try the ZipArchive object? Best Regards ================================= =================================
$40 USD in 0 day
4.7 (155 reviews)
5.9
5.9

About the client

Flag of UNITED STATES
United States
5.0
3
Member since Apr 24, 2007

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.