We help IT Professionals succeed at work.

Could you guys debug my php file. I'm getting warning message

giridharanbtech
giridharanbtech used Ask the Experts™
on
First of all this script is about remote upload to amazon s3.

I grabbed the code explained in this tutorial. That tutorial explained about file upload to amazon s3 bucket from our local PC.

But i want remote upload. So i modified the code like this. But i'm getting error message.

This is the error i'm getting.

Warning: S3::inputFile(): Unable to open input file: 4e4aca9e87af7612683548f6edb5267790c92aee in public_html/amazons3/S3.php on line 222 Something went wrong while uploading your file... sorry.
This is my modified code.  Original code can be found here

I also uploaded s3.php file in pastebin for better understanding.

It can be found here

 Line 222 causing that warning.

This is the code.

private static function __triggerError($message, $file, $line, $code = 0)
        {
                if (self::$useExceptions)
                        throw new S3Exception($message, $file, $line, $code);
                else
                        trigger_error($message, E_USER_WARNING);
        }

Open in new window


Line 222 is

trigger_error($message, E_USER_WARNING);

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Freelancer
Top Expert 2010
Commented:
That warning is usually raised if you try to access a file without permiisions. Are you sure to have permission to open that file?

Author

Commented:
Yes i have

Author

Commented:
Can i give you ftp details?  So you can check whats wrong in my code. Thanks
Most Valuable Expert 2011
Top Expert 2016

Commented:
Couple of things that might help.  Add error_reporting(E_ALL); to the top of the PHP scripts and let's see if we get anything useful from that.  Also, could you please post the scripts in the EE code snippet?  That way we get information that is easy to copy and has line numbers, etc.  

You can post the FTP information here or send it by email to the address in my public profile.  You can change the passwords any time you want.  It should not be a problem, but I would still recommend a complete image backup before we start testing and a complete restore after.

Thanks, ~Ray
http://www.experts-exchange.com/M_3774417.html

Author

Commented:
@Ray_Paseur

Thankyou, I'm hoping that you will fix my errors. I sent ftp details to your mail.  Thanks
Marco GasiFreelancer
Top Expert 2010

Commented:
Are you sure to want to award points to me? It really was a permissions issue?