1

I need to change the configuration of app path in symfony which I'm not able to find.

Company has changed the domain name & it still points to old domain for CSS, JS & everything else.

In layout.php file,

<script type="text/javascript" src="<?php echo sfconfig::get('app_web_path'); ?>
js/ip.js"></script>

This app_web_path parameter is taking value from some file which I'm not able to find. Can somebody help where this is coming from?

I changed app.yml & mentioned new domains there, but no luck. TIA.

1
  • 1
    sfconfig is from Symfony 1. Might get more help if you adjusted your tag. Commented Jan 11, 2017 at 15:43

2 Answers 2

1

It is a custom setting created in one of the app.yml files.

In Symfony 1.*, the config parameters map to any one of the .yml files. For 'app_web_path', you want to look in one of the app.yml files (which sounds like you did already). Then you want to look for an entry like:

all:
  web:
    path: example.com

After changing the setting, you need to the clear the Symfony cache, otherwise the change will have no effect.

For more info on how app.yml works, read http://symfony.com/legacy/doc/reference/1_4/en/11-app and for more info on Symfony 1.x configuration read http://symfony.com/legacy/doc/gentle-introduction/1_4/en/19-Mastering-Symfony-s-Configuration-Files

Sign up to request clarification or add additional context in comments.

Comments

0

A better way to insert that JS is

<script type="text/javascript" src="<?php echo public_path('js/ip.js') ?>"></script>

Comments

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.