Uploading images

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Uploading images

Post by kanklovitch » 2021-05-08 16:26

Hi All
I'm back with more questions after a years absence and still loving AppGini. For some reason I haven't been able to upload images anymore, even small ones. I get this message "Couldn't save the uploaded file. Try chmoding the upload folder '/' to 777." I changed the CHMOD for the images folder to 777 but it still doesn't work. Which folder needs to be changed to 777?

Thanks guys, I am guessing the answer will be easy.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Uploading images

Post by onoehring » 2021-05-08 17:07

Hi,

probably 777 is not the best choice. What about 666 or 660?
I also doubt, that permissions are the problem - as it seems, that you were able in the past to upload images.
Is your webspace full?
Did you take a look at the server error.log file?

Olaf

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Uploading images

Post by kanklovitch » 2021-05-08 18:09

hi Super Hero
I tried 666 and 660 for the image directory but I still says change to 777. Is it the image directory that I have to set? I haven't been able to find the server error.log file. Does it reside on my computer or is it on the server.

Thanks for your help.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Uploading images

Post by onoehring » 2021-05-09 06:32

Hi,

the server error.log is whereever your server is: If you are using a local installation (xampp, uniformserver) it should be local - if your application is already online, you should find it online, maybe in the webfrontend of your webspace provider, or FTP in another directory (which is usually not reachable by webaccess).
Does AG tell you (some AG error message) to set 777? Well, stay with that for now.
I did check two applications of mine: One has set 705, the other 755 on the /images folder - and both work.

Olaf

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Uploading images

Post by kanklovitch » 2021-05-10 13:28

Hi Olaf
I tried 705 and 755 and I still get this error message when I set the image folder. I am online but I haven't been able to find the server error.log with my ftp program. I will try finding it as soon as I get time.

Thanks very much

Ken
Attachments
777.jpg
777.jpg (39.62 KiB) Viewed 2735 times

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Uploading images

Post by onoehring » 2021-05-10 16:12

Hi,

you could try to add this code to the config.php temporary - it will show a lot of errors. Those might help you tracing the bug:

Code: Select all

	ini_set('display_errors', 1);
	ini_set('display_startup_errors', 1);
	error_reporting(E_ALL);
Please also check your defaultLang.php (I am assuming you are using AG 5.95) and make sure, it contains this line:

Code: Select all

'ImageFolder' => './images/',
Did you make sure, you have enough webspace left to upload another file?

Can you upload a file, when you run the code that is online on a local machine (xampp ...)?

Olaf

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Uploading images

Post by kanklovitch » 2021-05-11 14:22

Thanks Olaf, I really appreciate your advice Superhero. it will be a day or two before I get a chance to try this, a lot of "physical" work to do in my shop these days.

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Uploading images

Post by kanklovitch » 2021-05-13 03:24

Wow, got it working Olaf. I just installed version 5.95 and it is working. That is a huge problem solved for me, now on to my next issue, I will post it tomorrow. You and a few others really are super heros for people like me who only pretend we are AppGini programmers. I run a very busy business and really depend on AppGini to keep me and my colleagues organized. I don't have the time, ability or knowledge to "program" Appgini on my own.

THANKS VERY MUCH!!

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Uploading images

Post by kanklovitch » 2021-05-13 03:30

BTW my image folder is 755. When I say I run a busy business I mean busy. Every time AppGini alerted me that a new version was available I ignored it because I had more immediate pressing issues to deal with.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Uploading images

Post by onoehring » 2021-05-13 07:20

Hi,

so it's working now... but what was the problem? If you let us know, maybe others can learn from this.

Thanks
Olaf

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Uploading images

Post by kanklovitch » 2021-05-13 10:52

Sorry for not explaining that clearly. It just started working after I installed version 5.95. I didn't insert the code you suggested into config.php to see any errors because the problem just went away with version 5.95. At the end of the day I didn't learn anything accept that the image folder doesn't have to be set to 777 like AG said and and that I needed to upgrade tp 5.95. I hope that makes sense.

Thanks Olaf

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Uploading images

Post by onoehring » 2021-05-13 11:20

Hi,

well, we did learn: Update to the latest version ;-) .... even though, I know there are several bug in 5.95 as well.
Thank you for explaining.

Olaf

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Uploading images

Post by kanklovitch » 2021-06-09 14:47

Hi Olaf
An update on uploading images. After my other problem with my app forcing me to reset my database credentials every few hours I re-built my app and thankfully the reset problem went away but unbelievably I couldn't upload images in my new app even though I could still upload them in my old app. Eventually I realized the photos where being uploaded on the server but AG was just not displaying them. I had the photos field set to varchar in both apps which worked in the old but not in the new. Last night, on a long shot I decided to set the photos field in my new app to char instead of varchar and presto, AG displays them as normal. All the old photos that I uploaded are now showing up in my records.

All is fine now Olaf
Thank you

Ken

Post Reply