By Scott Lavelle on Sunday, 30 April 2017
Posted in General
Replies 7
Likes 0
Views 306
Votes 0
This is not on my "real" supported site, as I'm trying out php7 on a test site before moving anything to it. So I don't know if I'd call this a support request or a bug report.

I have php7, Jooml 2.7, and EasyBlog 5.1.6 running on this site.
From the back end, on a PC, I have no problem adding new posts, with or without pics. From the front end, same goes, with a post or quickpost - all working normally.

However, when I use an Android phone and try to do the same thing from the front or back end, it will not upload an image. If I upload an image with the mobile device in the media manager of the core Joomla, it loads fine. I cannot load an image in EasyBlog on a mobile device at all.

However, if I use EasyApache on the server to turn this site/account to PHP 5.6, the mobile uploads work as expected.

Since the php is a server-side thing, I don't think that the specific mobile device I'm suing can have any bearing on the issue, and since the uploads work in the standard core Joomla media manager, I don't think it is a server or Joomla issue. Since this is only an issue with the PHP 7, mobile device, in EasyBlog, it seems like EasyBlog is the problem.

Looking forward to your thoughts.
I was actually able to resolve this by increasing the MEMORY_LIMIT variable on my php7 setup. Looks like my php56 was set higher, so I'm sure that's why this was working there, though I'm still confused as to why I had to increase this to work from mobile when using the exact smae image/size worked on the laptop/desktop side.

Either way, looks like this is fixed with an increase to 128mb. Note that this is not related to the upload size - just to the memory size.

For others, I was able to see that this was being exceeded when looging at the error_log IN the ADMINISTRATOR folder, where it showed PHP Fatal error: Allowed memory size of 67108864 bytes exhausted.

Hope this helps others and that someone can explain to me why this worked at 64M for desktop/laptop but not mobile.
·
Monday, 01 May 2017 01:03
·
0 Likes
·
0 Votes
·
0 Comments
·
I believe it has something to do with your upload_max_size settings in your php.ini. Is the settings the same with Easy Apache versus the stock PHP setup?
·
Sunday, 30 April 2017 13:47
·
0 Likes
·
0 Votes
·
0 Comments
·
I don't think that's the issue for two reasons. First, I have the max upload and max post size set at 10mb which has is larger than this image at 4.4mb. Second, I can use the same image that I am using from the phone upload from my pc and it works perfectly with everything else being the same.

Seems completely strange because it's the same site accessed with pc and phone, so I don't get it. I'm going to try an iPhone today to see if it acts any different.
·
Sunday, 30 April 2017 19:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Scott,

We have never had such issues with PHP7 and most of our customers are running on PHP7 without any issues. Since your PHP7 setup runs on a different setup as compared to your EasyApache, I am leaning towards the different configuration file but to be honest, I am just suspecting only as I don't really have any evidence to back this up.

Perhaps if you could provide us with the access for the site that is having problems with PHP7 and also the image file that you were trying to upload, we'll try to see if we can identify the root cause of it.
·
Sunday, 30 April 2017 22:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, my PHP7 is WITHIN EasyApache, for what that's worth.

I have tried to do the same thing on iPhone today as I was trying on my Android to be sure that it wasn't an Android specific issue. iPhone, using Chrome browser does exactly the same thing - upload failed. When I try to do this on iPhone using Safari, I can't even click the upload button - it does nothing.

I provided login credentials to the site and FTP in the original post of this issue, so you should have access to that. The image file I'm trying to upload is anything taken by the camera on the phone or anything previously taken by the camera and stored in the file structure.

I also loaded up on SurfaceBook and used the camera on here to take a quick shot and then upload that via the same mechanism and THAT worked as well.

This seems only to be a mobile browser issue, using the same wireless network as well. I don't see anything in the apache error_log for the site either, doing a refresh on that at the same time as trying to upload the image from the phone.

Confused...
·
Monday, 01 May 2017 00:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Scott,

Thanks for updating me on this and I am glad that we got to the bottom of this. Based on what you have told me, I believe the image taken with your mobile devices are much higher resolutions as compared to the images that you were using on your desktop to upload (But strange though because you mentioned that you had used similar image on your desktop)

When an image is much larger in dimensions, the GD library in PHP uses more memory because it basically needs to create a temporary canvas and these temporary canvases uses the temporary memory storage on php. A lower memory limit would mean that GD isn't allowed to create those canvases.
·
Monday, 01 May 2017 01:11
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post