1

I've moved a symfony2 script from website to another one on another server

when i type ls -l to check the bundles dir and shortcut its show deferent domain name

this is example

lrwxr-xr-x  1 Jack  staff  61 Feb  3  2013 cmsadmin -> /var/www/mywebsite.com/src/CMS/AdminBundle/Resources/public
lrwxr-xr-x  1 Jack  staff  61 Feb  3  2013 cmsfront -> /var/www/mywebsite.com/src/CMS/FrontBundle/Resources/public
lrwxr-xr-x  1 Jack  staff  64 Feb  3  2013 cmssecurity -> /var/www/mywebsite.com/src/CMS/SecurityBundle/Resources/public

how i can re-write this bundles to match the new domain name or new path's ?

for example

old domain : mywebsite.com
new domain : anotherweb.com

this bundles still has the old domain shortcuts ! any advice ?

Kodr.F
  • 13,932
  • 13
  • 46
  • 91
  • Have you tried `app/console assets:install --symlink`? It should re-create the symlinks. – kix Aug 25 '14 at 13:07
  • i got this `[ErrorException] Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.....` – Kodr.F Aug 25 '14 at 13:16
  • Dude just set the default timezone like it says. – Theodore Enderby Aug 25 '14 at 13:19
  • lol the funny is i did set it but still getting this message ill try to set it again – Kodr.F Aug 25 '14 at 13:22
  • got this error after fixed timezoe : `[RuntimeException] Not enough arguments.` – Kodr.F Aug 25 '14 at 13:28

1 Answers1

0

Finally found it after spending 12 hours making research about this

1- delete this folder web/bundles .

2- execute this command app/console assets:install web

you will see something like this

Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
Installing assets for CMS\AdminBundle into web/bundles/cmsadmin
Installing assets for CMS\SecurityBundle into web/bundles/cmssecurity
Installing assets for Coddict\NewsBundle into web/bundles/coddictnews
Installing assets for Coddict\ContactBundle into web/bundles/coddictcontact
Installing assets for Coddict\SliderBundle into web/bundles/coddictslider
Installing assets for Coddict\MediaBundle into web/bundles/coddictmedia
Installing assets for FOS\JsRoutingBundle into web/bundles/fosjsrouting
Installing assets for CMS\FrontBundle into web/bundles/cmsfront
Installing assets for Coddict\NewsletterBundle into web/bundles/coddictnewsletter
Installing assets for Symfony\Bundle\WebProfilerBundle into web/bundles/webprofiler
Installing assets for Sensio\Bundle\DistributionBundle into web/bundles/sensiodistribution

now you done .... new bundles created

and if you face timezone error with red message just add this code inside §AppKernel.php§ write:

public function init() {
    date_default_timezone_set( 'Europe/Lisbon' );
    parent::init();
}
Kodr.F
  • 13,932
  • 13
  • 46
  • 91
  • 1
    The `default_timezone` part is incorrect, this is a configuration value that you should put into your `php.ini` file so that it's set globally on the server. – kix Aug 26 '14 at 04:32
  • @kix correct , the default timeznoe for MAMP Pro for mac osx is incorrect , this should fix it – Kodr.F Aug 26 '14 at 05:17