claroline / Claroline

Learning management system
https://www.claroline.com
Other
315 stars 188 forks source link

Can't add logo #360

Closed clarophil closed 10 years ago

clarophil commented 10 years ago

Error 500 when I want to upload a new logo in administration parameters

"Symfony\Component\HttpFoundation\File\Exception\FileException" thrown with message : "Unable to write in the "/home/cctest/vendor/claroline/core-bundle/Claroline/CoreBundle/Library/Logo/../../../../../../../web/uploads/logos/" directory" (500 Internal Server Error) at n/a in /home/cctest/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php line 137 at Symfony\Component\HttpFoundation\File\File->getTargetFile in /home/cctest/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/UploadedFile.php line 243 at Symfony\Component\HttpFoundation\File\UploadedFile->move in /home/cctest/vendor/claroline/core-bundle/Claroline/CoreBundle/Library/Logo/LogoService.php line 46 at Claroline\CoreBundle\Library\Logo\LogoService->createLogo in /home/cctest/vendor/claroline/core-bundle/Claroline/CoreBundle/Controller/AdministrationController.php line 635 at Claroline\CoreBundle\Controller\AdministrationController->updatePlatformSettingsAction in line at ReflectionMethod->invokeArgs in /home/cctest/vendor/jms/cg/src/CG/Proxy/MethodInvocation.php line 84 at CG\Proxy\MethodInvocation->proceed in /home/cctest/vendor/jms/security-extra-bundle/JMS/SecurityExtraBundle/Security/Authorization/Interception/MethodSecurityInterceptor.php line 120 at JMS\SecurityExtraBundle\Security\Authorization\Interception\MethodSecurityInterceptor->intercept in /home/cctest/vendor/jms/cg/src/CG/Proxy/MethodInvocation.php line 79 at CG\Proxy\MethodInvocation->proceed in /home/cctest/app/cache/prod/jms_diextra/proxies/Claroline-CoreBundle-Controller-AdministrationController.php line 66 at EnhancedProxy57e96faa_3a6664d31eadd588da916f6834cfbb0b0cb95ba7CG\Claroline\CoreBundle\Controller\AdministrationController->updatePlatformSettingsAction in line at call_user_func_array in /home/cctest/app/bootstrap.php.cache line 2815 at Symfony\Component\HttpKernel\HttpKernel->handleRaw in /home/cctest/app/bootstrap.php.cache line 2789 at Symfony\Component\HttpKernel\HttpKernel->handle in /home/cctest/app/bootstrap.php.cache line 2918 at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle in /home/cctest/app/bootstrap.php.cache line 2220 at Symfony\Component\HttpKernel\Kernel->handle in /home/cctest/web/app.php line 19

ngodfraind commented 10 years ago

It looks like a permission error.

Try to chmod 0777 on web/uploads/logos and create the directory if it doesn't exist yet.

clarophil commented 10 years ago

Ok I can upload and I see the file in the folder but the images don't appear because there is a double slash in the url //uploads/logos/525d2c273dcdf.gif

image

stefk commented 10 years ago

Fixed by claroline/CoreBundle#95