Lewis Posted April 25, 2017 Share Posted April 25, 2017 hello all, i recently moved a processwire site from cpanel hosting to virtualmin hosting. everything is working fine, except of the upload of featured image in an article. Field type is image, and i have disabled overwriting of existing files. when i try to upload an image, it goes to 100%, i save the page but i cant see the image. when i search the filesystem for the specific filename, i can see it inside /site/assets/files/1703/... Can anyone help me with this issue ? Link to comment Share on other sites More sharing options...
Lewis Posted April 25, 2017 Author Share Posted April 25, 2017 i upgraded the installation to the latest and checked the file/directory permissions.. Link to comment Share on other sites More sharing options...
LostKobrakai Posted April 25, 2017 Share Posted April 25, 2017 Can you show us the code where the images are used in your template and/or the markup, which does get rendered? Link to comment Share on other sites More sharing options...
dotnetic Posted April 25, 2017 Share Posted April 25, 2017 According to your information it seems your file is uploaded. Where is the image not visible? In the admin (backend) or frontend? Link to comment Share on other sites More sharing options...
Lewis Posted April 25, 2017 Author Share Posted April 25, 2017 1 hour ago, jmartsch said: According to your information it seems your file is uploaded. Where is the image not visible? In the admin (backend) or frontend? nowhere is visible.. in the first screen shot, you see that theoretically the file is uploaded, i save, i reload the page and there is no file.. Link to comment Share on other sites More sharing options...
Lewis Posted April 25, 2017 Author Share Posted April 25, 2017 2 hours ago, LostKobrakai said: Can you show us the code where the images are used in your template and/or the markup, which does get rendered? this is supposed to be the rendered page with the image.. http://www.1055rock.gr/news/plastic-machinery-single-different-days-charlatans-johnny-marr/ below you can see some screenshots of the usage of field "image" with title "Featured Image" in the template.. Link to comment Share on other sites More sharing options...
szabesz Posted April 25, 2017 Share Posted April 25, 2017 Maybe its unrelated, but you can give it a try: Meaning form 5.6 and above you must have: always_populate_raw_post_data = -1 Link to comment Share on other sites More sharing options...
Lewis Posted April 25, 2017 Author Share Posted April 25, 2017 6 minutes ago, szabesz said: Maybe its unrelated, but you can give it a try: Meaning form 5.6 and above you must have: always_populate_raw_post_data = -1 where can i find this setting to try ? 1 Link to comment Share on other sites More sharing options...
Lewis Posted April 25, 2017 Author Share Posted April 25, 2017 14 minutes ago, szabesz said: Maybe its unrelated, but you can give it a try: Meaning form 5.6 and above you must have: always_populate_raw_post_data = -1 it doesnt work.. Link to comment Share on other sites More sharing options...
abdus Posted April 25, 2017 Share Posted April 25, 2017 1 minute ago, Lewis said: where can i find this setting to try ? First check your php version with php --version, because this directive was removed in PHP 7.0 If you're on PHP 5.x, you must have root access to php.ini to change this setting. On debian based systems (tried on Ubuntu) you can find the location of php.ini using locate php.ini and edit fpm/php.ini (if you're using nginx or some other http server/proxy) or cli/php.ini if you're using cli version (apache) 1 Link to comment Share on other sites More sharing options...
Lewis Posted April 25, 2017 Author Share Posted April 25, 2017 here you can see my phpinfo.. http://1055rock.gr/zzz.php Link to comment Share on other sites More sharing options...
abdus Posted April 25, 2017 Share Posted April 25, 2017 @Lewis, php configuration is handled by /home/dim1055/etc/php5/php.ini file, add that directive to end of the file. In case it doesnt work, (probably wont as you're on PHP v5.6.30) this STO answer seems to answer why it didnt work/how to get it working. https://magento.stackexchange.com/a/93490 FYI, you shouldn't expose phpinfo() to public, it reveals sensitive/potentially dangerous info about your system. Link to comment Share on other sites More sharing options...
Lewis Posted April 25, 2017 Author Share Posted April 25, 2017 4 minutes ago, abdus said: @Lewis, php configuration is handled by /home/dim1055/etc/php5/php.ini file, add that directive to end of the file. In case it doesnt work, (probably wont as you're on PHP v5.6.30) this STO answer seems to answer why it didnt work/how to get it working. https://magento.stackexchange.com/a/93490 FYI, you shouldn't expose phpinfo() to public, it reveals sensitive/potentially dangerous info about your system. i did the change in /home/dim1055/etc/php5/php.ini but upload images still is not working.. i revealed my phpinfo just for debug purposes.. Link to comment Share on other sites More sharing options...
abdus Posted April 25, 2017 Share Posted April 25, 2017 (Did you restart PHP service?) Any other pages or templates have working image uploads? When you delete the pagefiles directory (/site/assets/files/213 etc), can PW create and upload the file inside? 1 Link to comment Share on other sites More sharing options...
Lewis Posted April 26, 2017 Author Share Posted April 26, 2017 3 hours ago, abdus said: (Did you restart PHP service?) Any other pages or templates have working image uploads? When you delete the pagefiles directory (/site/assets/files/213 etc), can PW create and upload the file inside? i restarted the services.. i deleted the directory, PW created and uploaded the file, but i cannot see it neither in backend, nor in frontend.. i noticed strange dates in uploaded files, as you see in the attached file.. Link to comment Share on other sites More sharing options...
matjazp Posted April 26, 2017 Share Posted April 26, 2017 Are there any javascript errors on upload (check with browser's dev tools)? Any other pages or templates have working image uploads or is this behaviour specific to this page only? Image is smaller that 2M (looks it is)? Any clues in PW log files? Try chmod -R 777 /site/assets/files/1234 to see if there are permissions problems. 1 Link to comment Share on other sites More sharing options...
abdus Posted April 26, 2017 Share Posted April 26, 2017 6 hours ago, Lewis said: i restarted the services.. i deleted the directory, PW created and uploaded the file, but i cannot see it neither in backend, nor in frontend.. i noticed strange dates in uploaded files, as you see in the attached file.. Shouldn't files be owned by www-data user & group? In most setups (unless overriden) web service and php run as www-data (and user and files should be owned by www-data group). What does php run as in your case? https://unix.stackexchange.com/a/30191 Also what does date return in bash? and date() in PHP? Link to comment Share on other sites More sharing options...
dotnetic Posted April 26, 2017 Share Posted April 26, 2017 It seems like a permission problem with uploaded files so ProcessWire can´t access them. Link to comment Share on other sites More sharing options...
dotnetic Posted April 26, 2017 Share Posted April 26, 2017 Another problem, or maybe THE problem is, that you seem to not have GD lib installed. As you can see on https://processwire.com/about/requirements/ this is required. Install it, and I think your problem is gone. 3 Link to comment Share on other sites More sharing options...
Lewis Posted April 26, 2017 Author Share Posted April 26, 2017 2 hours ago, jmartsch said: Another problem, or maybe THE problem is, that you seem to not have GD lib installed. As you can see on https://processwire.com/about/requirements/ this is required. Install it, and I think your problem is gone. this is the answer GD was the problem, since it was a fresh install, i hadn't installed it... thank you all for the support !!! 1 Link to comment Share on other sites More sharing options...
joebaich Posted April 28, 2017 Share Posted April 28, 2017 I have a similar but different issue on uploading multiple image files using the drag and drop facility or selecting them the 'Choose File' button. The files upload fine and the matching number of thumbnails appear in the Images section. However, when I Save the page, all but the first of the uploaded file thumbnails disappear. All the original image files and asssociated api generated image files are present in assets/files subfolder where you would expect them. GD2 lib is installed in PHP 7. This happens on all the PW sites I have on this host. I don't use another so can't compare. It has been like this for me since I took up PW 5 years ago on successive versions . It's not a huge issue in that I can upload the image files one at a time and then all is well. Any hints or clues as to why this happens and how to fix it? Link to comment Share on other sites More sharing options...
LostKobrakai Posted May 2, 2017 Share Posted May 2, 2017 On 28.4.2017 at 7:01 PM, joebaich said: The files upload fine and the matching number of thumbnails appear in the Images section. However, when I Save the page, all but the first of the uploaded file thumbnails disappear. The thumbnails are not generated server side on the initial upload, but directly in the browser from the local filesystem. So that's not really a success indicator of any sorts. Try inspecting the ajax requests for the file uploads with the browser dev tools. 1 Link to comment Share on other sites More sharing options...
joebaich Posted May 2, 2017 Share Posted May 2, 2017 Ahhhh Haaaa! That give me something to go on. Most grateful for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now