2

I've generated backup of a website has symfony2 CMS

when i extracted it on my localhost its worked fine but (css/js/images) not working

its like the bundles need to rebuild again right ?

i am using Mac os terminal to write symfony2 commands

css tags

{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{asset('bundles/cmsfront/css/default.css')}}" type="text/css" />

{% if app.request.attributes.get('_locale') == 'ar' %} 
<link rel="stylesheet" href="{{asset('bundles/cmsfront/css/rtl.css')}}" type="text/css" />
{% endif %}

{% endblock %}

the online website running prefect , i need to move this website to another server so i just want to make a test on my localhost and i got this error for CSS and Images etc

403

Forbidden

You don't have permission to access /myweb/web/bundles/cmsfront/js/slider.js on this server.

any advice ?

6
  • How are you serving this locally? PHP built in server or Apache/Nginx? Commented Aug 25, 2014 at 9:22
  • no i am using php/apache MAMP Pro software for mac Commented Aug 25, 2014 at 9:22
  • if your live-host is a linux system of some sort, i might have copied the user/group of the live-system to your local system, try change the permissions and owner of the folders Commented Aug 25, 2014 at 9:24
  • 1
    why is there such as /myweb/web in the url ? Your Apache server should be configured to have the web folder as the DocumentRoot Commented Aug 25, 2014 at 9:24
  • so if i want to moved the website content to another server i have to write the Apache configuration again into the second server ? Commented Aug 25, 2014 at 9:27

2 Answers 2

0

I just got the same error. I'm using a Mac OS too.

I just restart apache2 with sudo apachectl restart and it works.

0

In my case chmod 775 in terminal helped me

5
  • 1
    can you please explain how ? i am new with Symphony Commented Aug 25, 2014 at 10:38
  • you can do this-> open terminal -> cd /myweb/web/bundles/cmsfront/js/ then sudo chmod -R 775 ./ Commented Aug 25, 2014 at 10:39
  • try to chmod 777 in the project root folder Commented Aug 25, 2014 at 10:47
  • still same issue :S damn man how to fix this , do i have to rebuild bundles ? Commented Aug 25, 2014 at 10:56
  • i think you should manualy check folder and files credentials, i think ls -la would help you, type ls -la in terminal in /myweb/web/bundles/cmsfront/js/ folder Commented Aug 25, 2014 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.