PHP error for S3 backup

iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Installed and testing DB backup. Hangs here on manual backup. PHP error log shown. Also, first time setting up S3, I'm thinking there might be some other aspect on the Amazon side not completely setup? Ideas? Thanks in advance.
hangs.png
hangs.png  •  14KB


updated by @ilovehousemusic: 01/03/14 08:53:37PM
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Error:
<span class="php_Fatal">[20-Nov-2013 10:24:11 America/Vancouver] PHP Fatal error: Call to undefined function mime_content_type() in /home/xxxxxxx/public_html/modules/jrBackup/contrib/S3/S3.php on line 1807 [x 4]
brian
@brian
12 years ago
10,149 posts
Looks like your PHP does not have the mime type functions enabled - try adding those in and the error will go away.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
@Brian - I checked with my host, could you clarify where these Mime functions are enabled?

I'm on my cpanel > Advanced section and I see all the MIME Types, is there a particular one I'm looking for that should be enabled?

TIA
Brian
brian
@brian
12 years ago
10,149 posts
They are part of the "FileInfo" package:

http://us2.php.net/manual/en/book.fileinfo.php

I'm going to update the JR mime functions though to check first to see if those functions are enabled before attempting to use them, which will fix this for other users who may not have that installed.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
12 years ago
10,149 posts
Actually this is already checked for:

if (function_exists('mime_content_type')) {
    return mime_content_type($file);
}

so I am not sure why you would see that error - are you running an older version of the jrCore?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
I'm running JR5.1.2
brian
@brian
12 years ago
10,149 posts
Then you should never see that error - are you still seeing it?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Let me try to re-upload the core files and try again.
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Reuploaded core 5.1.2 files. Integrity check. From DB Backup > Tools > Selected only DB and I get successful backup. Selected only Profile backups and it hangs at the same spot. Have to wait for it to timeout for it to trip error log. Will verify that it's the same error. Only have 1 small audio file loaded on the profile it's hanging on.
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Same issue. Does anyone from JR Dev team want to see this first hand? LMK.

Thanks!
brian
@brian
12 years ago
10,149 posts
iLoveHouseMusic:
Same issue. Does anyone from JR Dev team want to see this first hand? LMK.

Thanks!

When you say "same issue" you mean you are still getting the Fatal error on the mime type function? Can you post the exact error here?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Same behaviour as in the first screen shot of this post. It just spins forever and no log of completed/successful backup. No mime error this time, it just never completes.

I did find one interesting thing though - I purchased this module within my site's marketplace. So, I see the module active on my site, but when i look on Jamroom > Your Licenses > Purchases, I don't see the module there. Could that be part of the problem?

I'm on 5.1.3 core now BTW
updated by @ilovehousemusic: 11/27/13 08:02:25AM
brian
@brian
12 years ago
10,149 posts
It's a free module so no need to purchase.

Something is not right - it's been running here on jamroom.net for almost 2 months now and is working well, so there's either something missing from your PHP config, or the config is wrong (check your S3 credentials in the config).

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
@brian - OK i'll double check all that. Thanks!
brian
@brian
12 years ago
10,149 posts
No problem - if you continue to see a problem let me know - I may need access to your system to get to the bottom if it.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
I recreated Auth ID & Key and re-tested. The S3 credentials are correct - In fact when you first set it up, it will error out if it's not able to upload the test file to S3. Is there any other setup required from the Amazon side?
brian
@brian
12 years ago
10,149 posts
Did you create the bucket in your S3 account?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Yes of course, I see the bucket there. I drill down and see one jpg...
brian
@brian
12 years ago
10,149 posts
Do you see any errors in the php error log or activity log? If not, then I would need access to your site to try to figure out what's up.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
I see this error "[29-Nov-2013 09:55:21 America/Vancouver] PHP Fatal error: Call to undefined function mime_content_type() in /home/****/public_html/modules/jrBackup/contrib/S3/S3.php on line 1807 [x 1]"

and the activity log never really trips a "Successful Backup" record.

Let me know how you want me to get you the login credentials. Thanks!
brian
@brian
12 years ago
10,149 posts
Ahh - the mime_content_type error is coming from the S3.php script which is a "contrib" script. I should be able to modify that and put in a work around. I'll post an update here when I have release it to the marketplace.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
12 years ago
10,149 posts
This is fixed in version 1.0.2 of the DB and System backup module - update should be available in your Marketplace -> System Update.

Let me know if you see any more issues.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
K. Running 5.1.4 core, and DB backup 1.02 module, I also recreated the bucket and access keys. I can run a successful backup now, within Jamroom. When I look at my Amazon bucket, I dont see any files. I do see the IT_WORKS.txt test file created at module setup.

So 2 questions:
1) How long does it take for S3 to update file contents
2) Is there any other setup on the S3 side required other than "Create Bucket"? Permissions?

Nothing of significance in activity, debug, or error log.

Ideas? TIA!
brian
@brian
12 years ago
10,149 posts
Hmm - no if you see the "it works" text file, then it should work. Do you see a "media" directory in your S3 bucket?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
No media directory in S3 bucket. Just checked again (waited a few hours) since backup was successful.
brian
@brian
12 years ago
10,149 posts
I just ran a manual backup here just to double check it was not something only affecting the manual backup, and everything worked 100%.

Without access to your system unfortunately I have no idea why it is not working on your system - I can only suspect that something is either not configured right, or something else is blocking your system from accessing S3.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 12/02/13 01:00:24PM
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
How did you go through setting up the bucket in S3? Did you do anything special?
brian
@brian
12 years ago
10,149 posts
The bucket just must exist - the module does not create it.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
I think i figured out something. I de-activated the module, and re-activated it. In the global settings I see my OLD AWS keys and OLD bucket name. I enter the correct info, and it saves successfully, but then the old info pops up in the Global fields (See video) Then, I run a backup and it says successful. But, it's a false positive because nothing is being sent to S3. So basically it appears that it's not taking my newly created AWS info.

https://www.youtube.com/watch?v=xok6tFCj5T8
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Check out the video and let me know what you think! =)
brian
@brian
12 years ago
10,149 posts
Is your browser set to "remember" form entries for you? I can't duplicate the issue you are seeing here.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
lemme try a different browser...
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Question - if I delete the module, will it also delete the db tables? I want to delete and reupload the module. I tried it with IE, auto fill disabled. Same issue.
brian
@brian
12 years ago
10,149 posts
No - it's not going to delete the settings from the settings table. I've never once seen this, so something is messed up. Go into the jr_jrcore_settings table and look at the actual values - I have a feeling they either are not being saved, or something on your computer is replacing the values.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
I'm in the jr_jrcore_setting table and I dont see anything related to backup/restore module. What am I looking for exactly? Would you like my login credentials?
brian
@brian
12 years ago
10,149 posts
Yes - email me your URL and admin login and what your S3 creds are supposed to be.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
emailed to brian at jamroom
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Hi - just reporting back here. Whatever you did fixed the issue. I was able to create completely new keys, and bucket. Updated the module w/ the new info. Ran successful backup with no issues. case closed. Moving on! =) Thanks for all your help.
brian
@brian
12 years ago
10,149 posts
Awesome - glad to hear it.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
Thanks! I'm going to give the log watch module a try now. From what I can tell the backups run on daily maintenance, so I'm setting the log rule to look for "daily_maintenance completed".

It applies to all NEW logs right (not past ones)?
brian
@brian
12 years ago
10,149 posts
iLoveHouseMusic:
It applies to all NEW logs right (not past ones)?

Yes - it only applies to new logs, but the rule browser lets you "test" the rule against the existing activity log so you can tweak it until you get it right.

For the S3 backup, you'll want to search for:

daily backup to S3/bucket_name completed

replace "bucket_name" with your actual bucket name.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 12/04/13 10:10:37AM
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
12 years ago
517 posts
ah ok great!

Tags