Problems, need help? Have a tip or advice? Post it here.
9 posts Page 1 of 1
Hi Couch-People,

i have a problem with uploading files using the most recent build of couch with KCFinder.

Whenever i upload a picture, the upload seems to be working fine, but neither the image nor the thumbnail are displayed. Here's what i've tried so far:

- set the permissions for the folders to 777 manually
- used the sitescan.php to set everything correctly (and the instructions to set the 777 for some folders afterwards as well)
- tried a different upload folder than the standard couch folder

Nothing seems to work so far. Any ideas?

Thanks in advance!

Sundance
Hi,

Please take a look at your web server's error log and see if it reports something relevant to this problem.
Hi KK,

thanks for your quick reply. The error log gives me the following lines that are obviously linked to the problem:

Code: Select all
[Tue Mar 15 14:55:10 2016] [alert] [client 87.78.160.153] /is/htdocs/wp12017780_RWJHACDY28/www/images/.htaccess: php_value not allowed here, referer: http://www.simon-gilljohann.de/couch/includes/kcfinder/browse.php?nonce=253abf05acf42bf90351f29eb6591488&type=image&
[Tue Mar 15 14:55:10 2016] [alert] [client 87.78.160.153] /is/htdocs/wp12017780_RWJHACDY28/www/images/.htaccess: php_value not allowed here, referer: http://www.simon-gilljohann.de/couch/includes/kcfinder/browse.php?nonce=253abf05acf42bf90351f29eb6591488&type=image&
[Tue Mar 15 14:55:10 2016] [alert] [client 87.78.160.153] /is/htdocs/wp12017780_RWJHACDY28/www/images/.htaccess: php_value not allowed here, referer: http://www.simon-gilljohann.de/couch/includes/kcfinder/browse.php?nonce=253abf05acf42bf90351f29eb6591488&type=image&
[Tue Mar 15 14:55:16 2016] [alert] [client 87.78.160.153] /is/htdocs/wp12017780_RWJHACDY28/www/images/.htaccess: php_value not allowed here, referer: http://www.simon-gilljohann.de/couch/includes/kcfinder/browse.php?nonce=253abf05acf42bf90351f29eb6591488&type=image&


The htaccess file in that folder contains the following lines:
Code: Select all
<IfModule mod_php4.c>
  php_value engine off
</IfModule>
<IfModule mod_php5.c>
  php_value engine off
</IfModule>


Does that help?

Thanks in advance

Kind regards

Sundance
Does your upload folder exist (didi you specify it in config also)?
What was the size of the uploaded pictures?
Can you confirm the code is correct and runs without flaws on local machine/another hosting?
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Hi trendoman,

thank you for your help:

- the upload folder exists and was specified in the config.php related to the main folder
- the uploaded pictures were between 150 and 500 kb
- i can currently only test this on the webserver that it is running on

Are the lines in the .htaccess correct? Should i change anything?

Thank you

Greetings

Sundance
Always welcome to your being nice :)

My lack of experience with htaccess and kcfinder leaves me no other choice than to offer you test your template on my server. You may send it to me zipped in pm and i will put it in my environment. If it is not a code bug, then we can keep thinking of other options.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
@Sundance, the error messages indeed seem to point to the real problem.

To be honest, I'm coming across this problem for the first time.
I googled about it a bit and from what I could gather, certain configurations of Apache (particularly if some PHP-hardening module like Suhosin is in place) can have problems with the 'php_value' directive in .htaccess file.

I think removing the .htaccess file in question should solve the problem.
Just one thing, KCFinder will recreate the missing .htaccess file so simply deleting it won't do. Please also set the following directive in 'couch/includes/kcfinder/config.php' file from 'true' to 'false' -
Code: Select all
'_check4htaccess' => true,

Do let us know if that helps.
maybe to simple idea but you could try to set in your upload folder a .htaccess with AllowOverride All and php_flag suhosin.session.cryptua off
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
@KK

Thanks for that workaround, it actually works as expected now! :-)

Kind regards

Sundance
9 posts Page 1 of 1