I'm trying to run a Symfony project that I cloned from a GitHub. I've never used Symfony before but I'd like to run the project.
I read you needed to run frontend_dev.php so I ran that in to my browser:
C:\Users\Computer\Desktop\Project\WebInterface\web\frontend_dev.php
But just got a blank page with some PHP on it. I believe I may have to set up a web server but I'm not sure and figured I'd ask here first.
If I wanted to run the project from my computer, would I just download an Apache server and drop it in the root directory? What variables and files would I need to change to get it working properly? Do I need to forward any ports?
Symfony 1.x branch is not supported anymore. Use Symfony 2.
Anyway, concerning your question: here is the doc for 1.4: Day 1: Starting up the Project
Related
I am totally new to PHP / Laravel / Linux / composer / docker etc.
However I do have the task: go retrieve some code files from an internal server and make a docker container out of it. The project is written in PHP 7.1.3 and uses the Laravel framework.
I've copied the whole https folder from the server which I think contains everything I need.
I also was able to create the example app from the Laravel documentation and also I made a brand new Laravel project. However, is there any chance to "generate" a new project using all the code files I have right now?
I even have a composer.json and composer.lock file, which in my opinion should "list" every component I would need in my docker installation, right?
What also bugs me is that I can't even get the project working on my dev machine...
I think you should do this step by step. But let me first answer some of your questions.
If "https" folder contains similar folder structure like fresh Laravel installation, it is likely to be all of it. But we can not be sure about it.
As far as i know there is no way to generate new project out of your files. First of all you need to know which Laravel version project uses. It must be stated at composer.json.
In you composer.json file lists required packages for you project. When you install them this packages are installed folder called vendor
Here is my suggestions;
As you stated it seems you are very new about these topics if someone give these task to you its not a smart way to teach this kind of topics.
I think you have to start with running project in your local machine. If you get errors than ask them in a new question. Most likely you need database and you need to know running migrations seeds etc.
When you manage to run the project you can start dockerizing your project. If your project is build with newer versions of laravel you can easly use sail otherwise you can build own dockerfile or upgrade laravel to newer versions.
Your problem is too broad, i think you cannot find answers to such question.
I am trying to install Symfony, but unable to find how can we start with symfony with Xampp. I have already tried on google but there is no proper solution for installation and configuration of Symfony.
As I want to edit a project which is already developed using symfony CMS.
Symfony is not a CMS.
If you need to run a symfony app locally, all you have to do is to copy all files into a project subdirectory inside your Xampp (for example htdocs/symfony).
I assume existing project will have a database, so be sure to import your database locally or use external database. You need to tweak your symfony config file: http://symfony.com/doc/current/configuration.html
I am trying to install Symfony, but unable to find how can we start with >symfony with Xampp. I have already tried on google but there is no proper >solution for installation and configuration of Symfony.
As I want to edit a project which is already developed using symfony CMS.
Hi, for begin Symfony is not a CMS but a framework ^^, it's a little bit (alot) different.
For install Symfony WHY use google O_o ----> http://symfony.com/doc/current/setup.html
After, why Xampp ? for windows use Wamp who do the local server it's more performing :/
And if you want you don't have necessary to install symfony if it's an existing project -> just clone it (if he is on github) ... and just open the complete folder with your IDE or text editor.
You can modify the file without problems, (just you can have a prob for use command php bin/console.
Good luck i hope it's answering all you questions :)
I have developed a symfony application and it's done.
It's been a couple of days and I can't figure out how to deploy this into a real apache server, when I copy it to the public_html it doesn't work assets don't load properly.
Can some one give me a step by step description of how to deploy it so that when I navgiate to example.com url I see my symfony application.
Thank you
If you try to deploy your application on a server, you have to configure apache. The best way its to make a virtual host.
Here the documentation:
http://httpd.apache.org/docs/current/en/vhosts/examples.html
http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
I would suggest using Capifony which provides a specialized set of tools on top of Capistrano, tailored specifically to symfony and Symfony2 projects. (according to the documentation)
The advantages of using capifony are,
deploying is as simple as running cap deploy from your project root directory.
It stores multiple releases.
It allows you to use SCM(s) to pull your application code down to the server.
You can configure it to run any batch command during the deployment.
It performs a transactional-like deployment process (if any step fails, the deployment is
rolled back and the current directory points to your last release)
You'll also need to troll through this part of the documentation to figure out how to get your application running under Apache.
I'm trying to establish a development process with symfony where developers can clone the symfony repository to their localhost and simply test their code on their computers. However I'm running into issues, of which git is not adding all the necessary files to copy (.gitignore issue), but also symfony doesn't know in which directory it is installed in when clearing the cache. Symfony is trying to clear it's cache stored in the wrong directory.
It seems that simply copy and pasting the symfony project and linking the apache server to the app_dev.php file doesn't work well. What would be a better approach when working with symfony with multiple people?
You should never pass your symfony application around as a copy when working with multiple people ... and even worse including the cache ...
use a cvs like git ( ignoring the cache folder ) and provide DataFixtures and a parameters.yml.dist in order to provide your co-workers with the latest development status and commented changes/commits.
The easiest way for your colleagues to have a running copy quickly would be providing a Vagrantfile including some provisioning.
This way you can make sure not only all your people have the same code-base but the same webserver, php-version/settings aswell.
I am interested in the PHP framework, especially by symfony and ZendFramework, but I am not sure of one thing: I saw the need to type command lines to create a project with these frameworks. Ok, but once the project is finished, is it possible to move files to another server without installing anything (except for Apache)?
Thank you in advance
Ps: No report, but do StackOverflow uses a framework?
It is absolutely possible to run a symfony or zend framework application without installing the framework on the server. Symfony has a special mechanism to pack everything into one folder. If you use zend framework you basically have to copy the "Zend" folder to your "lib" directory and you are ready to go.
As far as I know, StackOverflow is build on ASP.net and C# running on several windows servers.
Firstof, most of those commands are needed for development only. But also you do not have to have the commands in your global path, it's also possible to execute the scripts directly.
In case of symfony that would be something like
./symfony-framework/data/bin/symfony
if you installed symfony to symfony-framework.
I believe stackoverflow is based on .NET MVC or plain ASP .NET - http://meta.stackoverflow.com will give you that answer
With Zend Framework, it is possible. The Zend_Tool part, which sets up the basics of your project is just addition. You can, but you don't have to use it at all. You can just write the project from scratch yourself, just stick to the standard project architecture.
Anyway, once the project is ready, it does not need any command line setup, other than mayby setting correct file system permission if your project needs to write some files.
I can't say about symphony, but I assume it also can be just copied to the target server.
I don't know, how about ZF, but project made with Symfony can be easily moved to another server just by copying files. However it will be difficult to maintain your project without commands. Also you have to copy all Symfony's core files to your server, but it will be better to install Symfony there before.
About Symfony:
Usually, you develop locally on your dev environment (using Wampserver or MAMP for example). You will require access to the command line to run symfony commands, specially for complex tasks like ORM tasks. So you have to install symfony on that environment.
According to the official doc the recommended installation method is through SVN (either the trunk or a tag) inside your project folder.
When you'll push the files from your dev environment to another (using project:deploy if you can), all the required files will be pushed.
So there is no need to install (in the sense of "run" or "execute") anything on the live environment server. The only "installation" method that requires an access to the command line is the PEAR install method, which is not recommended.
The only problem that I had when I deployed an application was a user permission problem on the cache folder, but that's easy to fix by changing the folder permission.