By Mario on Tuesday, 18 February 2014
Posted in General Issues
Replies 13
Likes 0
Views 1K
Votes 0
I think there is a bug when enabling Amazon S3 as remote storage in Ireland region.

I enabled it, run the cron manually, photos were uploaded successfully, but the url generated when displaying the picture had a small misconfiguration.

The url was: http://.s3-eu-west-1.amazonaws.com/........../media/com_easysocial/avatars/users/12695/d70397ab5e4b02661c1217b92b49d3b7_medium.jpg

That dot just before the beginning of the url made photos broken.

After a lot of search I found the file administrator\components\com_easysocial\includes\storage\adapters\amazon\amazon.php and around line 117 in function getPermalink I changed this
$url 	= 'http://' . $base . '.' . $this->region . '/';
to this
$url 	= 'http://' . $base . $this->region . '/';
and worked fine.

Can you please verify me if this is the right solution and if there was actually an issue?

Also, I have set up the cron to run automatically every 5 minutes and although I'm getting email notification that it is running, it doesn't seem to run as no pictures are uploaded to S3 and no emails are sent.
When I run the cron manually (having enabled secure cron job) it is working.

In server cron job, do I have to enter the cron url with the secure phrase or without it? (having tried with both although and didn't work)
Hello Marios,

Hm, the first segment should actually be the buck path. What did you set for the "Bucket path" ? In other words, the URL should look like marios.s3-eu-west-1.amazonaws.com (If you configured the bucket path to be marios)
·
Tuesday, 18 February 2014 10:48
·
0 Likes
·
0 Votes
·
0 Comments
·
It wouldn't be right because the path of a photo is: http://s3-eu-west-1.amazonaws.com/BUCKETPATH/media/com_easysocial/photos/2/2/e385c75cddddf271b83cdd6959e611cd_large.jpg
and not http://BUCKETPATH.s3-eu-west-1.amazonaws.com/media/com_easysocial/photos/2/2/e385c75cddddf271b83cdd6959e611cd_large.jpg

So, where is the problem?
·
Tuesday, 18 February 2014 17:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marios,

Amazon S3 allows you to actually alias the path as you can see here, http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html . Can you provide us with the back end and FTP access so that I can check on this?

I tested this locally and it works fine for me.
·
Tuesday, 18 February 2014 23:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again.

Can you also please check some fatal errors (and some warnings) we're getting? Some users complaint that when they were editing their profile and saving they we re getting a "Forbidden You don't have permission to access / on this server." error.

Also, what I care a lot is the cron, because right now there are 6500 emails in the queue.
Can you please help me with that also?

------------------------

[18-Feb-2014 16:47:52 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3 bytes) in /public_html/libraries/joomla/database/driver/mysqli.php on line 513
[18-Feb-2014 16:47:54 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 425984 bytes) in /public_html/components/com_easysocial/themes/wireframe/followers/default.items.php on line 36
[18-Feb-2014 16:48:04 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 458752 bytes) in /public_html/components/com_easysocial/themes/wireframe/followers/default.items.php on line 36
[18-Feb-2014 17:03:52 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /public_html/libraries/joomla/database/driver/mysqli.php on line 513

[18-Feb-2014 19:30:06 UTC] PHP Warning: Unable to open source image in /public_html/administrator/components/com_easysocial/includes/image/adapters/asido/class.driver.php on line 594
[18-Feb-2014 19:30:06 UTC] PHP Warning: Failed to initialize image operations in /public_html/administrator/components/com_easysocial/includes/image/adapters/asido/class.image.php on line 233
[18-Feb-2014 19:30:06 UTC] PHP Warning: getimagesize(/public_html/media/com_easysocial/photos/460/742/22b3d1390240dcd206e34107c8bed9cb_original.png): failed to open stream: No such file or directory in /public_html/administrator/components/com_easysocial/includes/image/image.php on line 117
[18-Feb-2014 19:30:06 UTC] PHP Warning: Not storing source file "/public_html/media/com_easysocial/photos/460/742/22b3d1390240dcd206e34107c8bed9cb_original.png", because it is not readable in /public_html/administrator/components/com_easysocial/includes/image/adapters/asido/class.image.php on line 102
[18-Feb-2014 19:30:06 UTC] PHP Warning: getimagesize(): Filename cannot be empty in /public_html/administrator/components/com_easysocial/includes/image/adapters/asido/class.asido.php on line 698
[18-Feb-2014 19:30:06 UTC] PHP Warning: Division by zero in /public_html/administrator/components/com_easysocial/includes/image/adapters/asido/class.asido.php on line 703

[18-Feb-2014 20:50:01 UTC] PHP Warning: SocialAmazonLibrary::inputFile(): Unable to open input file: /public_html/media/com_easysocial/photos/250/369/9e9c1ec1a8ca29f080490bfd9377f0ef_original.jpg in /public_html/administrator/components/com_easysocial/includes/storage/adapters/amazon/lib.php on line 338
·
Wednesday, 19 February 2014 05:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marios,

Hm, for some reason I cannot access your site. Is there some sort of DNS entry that I need to add in my hosts file?
·
Wednesday, 19 February 2014 12:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi.

Sorry, i entered wrong password.

Is there any safer way to give you the passes?
I'm a little "afraid" because there is no SSL here.
·
Wednesday, 19 February 2014 17:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marios,

Hm, the problem is not with the password but with the URL as I cannot access the site :P You can contact me on Skype if you want. My Skype address is marklee_777
·
Thursday, 20 February 2014 22:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi again.

I'm sorry for the delay of the answer.

I have two issues regarding the cron.


  1. The cron isn't executed at all if I add the command as you describe in the documentation


  1. I'm keep getting the following error when I manually run cron url and the images are not uploaded to Amazon:
  2. [05-Mar-2014 11:44:16 UTC] PHP Warning: SocialAmazonLibrary::inputFile(): Unable to open input file: ../../public_html/media/com_easysocial/photos/252/371/051f12f29d2d6b1d3838d9a4ab7306d2_featured.jpg in /../../public_html/administrator/components/com_easysocial/includes/storage/adapters/amazon/lib.php on line 338


Can you please help to solve these two issues?
·
Wednesday, 05 March 2014 20:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marios,

It looks like some files are actually not available on the site as it probably has already pushed over to Amazon. I can't really tell just by looking at the error message here. As for the cron not submitting, what do you meant by that? Is there an error?
·
Wednesday, 05 March 2014 21:37
·
0 Likes
·
0 Votes
·
0 Comments
·
If the files have already been uploaded then why there are so many errors?
Is it trying to upload the same files again and again?

As for the cron, there is no error (as far as I can see) but simply it is not running (for example no mails are sent).
·
Thursday, 06 March 2014 00:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marios,

Hm, based on the error message, it does look like some of the photos on the server is actually already uploaded to Amazon but for some reasons they are not being updated to use "amazon" as a storage in the database. I have actually fine tuned the process of synchronizing photos in EasySocial 1.2 and it will be less prone to these kind of errors. Perhaps you want to wait for 1.2.0 and give it a try?

Otherwise, I could help you to troubleshoot this now but I cannot access the site currently
·
Thursday, 06 March 2014 14:51
·
0 Likes
·
0 Votes
·
0 Comments
·
If it's possible I would like this to be solved.

It may has to do with my original post here regarding the "wrong url".

Please let me know which country you are in because the firewall of the server might have denied the country.
·
Friday, 07 March 2014 22:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marios,

i am connecting from Malaysia
·
Friday, 07 March 2014 23:03
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post