I have installed symfony in my local server using their docs, but as per http://www.symfony-project.org/getting-started/1_4/en/04-Project-Setup I have to change edit config/ProjectConfiguration.class.php. but I didnt see this file, I am using symfony 1.4, how do I change the path
Thanks a lot
Did you generate a project after checking out/unzipping the core Symfony code into lib/vendor/symfony?
php lib/vendor/symfony/data/bin/symfony generate:project myProjectName
will set up a project for you. Until you do this, you won't have the config/ProjectConfiguration.class.php file you mention in your question. See this part of the docs for details.
Related
ok this might be a very strange thing.
it's not the first time I work a symfony project but:
I used the symfony generate:bundle command and after that I created a bundle. Lets call it "CrimeBundle".
I saw it made a folder inside the src/
It also made automatically a DefaultController and an index.html.twig file.
Now whenever I use:
return $this->render('CrimeBundle:Default:index.html.twig');
it doesn't work: I get the error:
Unable to find template "CrimeBundle:Default:index.html.twig" (looked into: /Users/admin/sites/solve/app/Resources/views, /Users/admin/sites/solve/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).
however it works whenever I use the namespaced twig path like:
return $this->render('#Crime/Default/index.html.twig');
I like the first option, because on my other projects I use it too. None of them are the same version, currently I use: 3.4.1
Again the file is there, because it works with namespaced twig paths.
I can't understand why return $this->render('CrimeBundle:Default:index.html.twig'); wouldn't work as symfony generated this code.
According to this - https://symfony.com/doc/3.4/templating.html#referencing-templates-in-a-bundle
That's the only reference type the support for bundle templates
#BundleName/directory/filename.html.twig
If you go to docs for symfony 3.1 you'll see that was the last version that supported old reference
AcmeBlogBundle:Blog:index.html.twig
Maybe you can create a pull request for this file
SensioGeneratorBundle/bundle/DefaultController.php.twig
I am interested in installing Glide in Laravel for an image server I need to build.
There are 3 main steps in the installation:
Run a Composer command
composer require league/glide-laravel
This step is called 'Configuration', it shows the following PHP code
Configuration:
use League\Glide\ServerFactory;
use League\Glide\Responses\LaravelResponseFactory;
$server = ServerFactory::create([
'response' => new LaravelResponseFactory(app('request'))
]);
... and step 3, which is a working example.
My question is, where does the step 2.
configuration code go?
I can't see anywhere obvious in the 'config' folder. Disclaimer: I'm a newbie to Laravel with only two sites built so far.
thank you.
The configuration code belongs in the default image controller. It is confusing in the documentation but I placed the code in the controller and it works.
Just started out working with Laravel and Homestead.
I followed below guide for that :
https://www.youtube.com/watch?v=S3kaQDFJiis
and did everything exactly the same, but when I open my project Laravel/app/Http there's no routes.php file just kernel.php.
What could possibly cause this? How to fix this? Maybe I messed up something during installation? I did try to re-install everything, but I faced same problem.
If you're using the latest version of Laravel, the routes can now be found in
Laravel/routes/
This folder contains 3 different files each used for their respective consumption methods api web console
I think you are using laravel latest version which is "5.3.*".
From laravel 5.3 routes has found a new home which is under
projectname/routes/.
routes directory has 3 php file
api.php
console.php
web.php
You can check your Laravel version form projectname/composer.json under require as "laravel/framework": "5.3."*
Reference:
Laravel 5.3
Keep note that from Laravel 5.3 the routes.php file has been removed and moved to
laravel_project_folder/routes/web.php
laravel_project_folder/routes/api.php
See Laravel 5.3 Routing Docs & Laravel Upgrade Guide Section
Hope this helps!
You will find it in
1)routes/web.php
You can also read the use of api.php and console.php files as they are also used in routing
Today I installed Symfony 2.7.9 for the first time and of course I've installed Sonata Admin (successfully). Now I'm trying to install SonataUserBundle like described here. But all the time I get the same error:
Unable to find file "#SonataUserBundle/Resources/config/routing/admin_resetting.xml" in
#SonataUserBundle/Resources/config/routing/admin_resetting.xml (which is being
imported from "/Users/alex/www/Personal/startup-1/app/config/routing.yml"). Make sure
the "SonataUserBundle" bundle is correctly registered and loaded in the application kernel
class. If the bundle is registered, make sure the bundle path
"#SonataUserBundle/Resources/config/routing/admin_resetting.xml" is not empty.
And YES, of course I checked admin_ressetting.xml and found that folder #SonataUserBundle/Resources/config/routing is empty.
Here my files:
config.yml, routing.yml, security.ylm, AppKernel.php
Also I'll note that:
My database contains 0 tables.
In folder src/Application/Sonata I have the only folder UserBundle
It seems there is a real issue with the 2.2.4 version of SonataUserBundle. Indeed admin_ressetting.xml is missing as you can see there.
FYI, I just posted an issue reporting the bug.
You can get the file from the master branch and create it under vendor/sonata-project/user-bundle/Resources/config/routing to fix it meanwhile.
Update (Apr, 28'16)
In fact, that's not an issue but a documentation misleading (the default documentation is ahead of last release). You need to refer to the v2.2 documentation if you want to use the last release, which is the 2.2.4 for now.
If you really checked #SonataUserBundle/Resources/config/routing which should be located under vendor/ and it's empty I would recommend you to delete vendor-directory, clear composer cache (compser clear-cache) and run composer install again.
As you can see at Github the directory should not be empty and contain more files than admin_resetting.xml.
I have a fresh version of CI running and I've installed the codeigniter-oauth2 spark via bash on my Ubuntu instances on EC2.
I followed the directions of the documentation and created a controller called auth using the demo code.
I have looked in my sparks folder and all the correct files/folders are there (as well as the /0.4.0 folder).
I have added the Facebook
My autoloads file has this
$autoload['libraries'] = array('session','OAuth2');
Now when I open the page mydomain.com/auth/sessions/facebook I get the error
"Unable to load the requested class: oauth2"
I can't seem to find any other assistance online regarding this issue online. I don't think it's an issue of not having the right case as I have tried all different ways of writing it.
Any direction to fix this issues would be greatly appreciated.
Use lower case when loading libraries.
$autoload['libraries'] = array('session','oauth2');
$autoload['sparks'] = array('OAuth2/0.4.0');