I decided to use Twig as a standalone template motor to make a static web site, with the idea to grow it further into a database dynamic MVC project. By the moment I just have a static website.
I am working offline, using a local php server, I haven't had troubles working and updating the project in my browser locally. The thing is, when I upload the project to the server, nothing works, I get a 500 error.
I want to know how can I deploy my website to the live server, and what is the best approach to make it work without uploading all the bunch of vendors files and just keep functional ones. I use to work with smarty and was very easy to deploy, but I think twig must be equally easy.
This is my file tree:
Related
I have recently started playing around with Capistrano for my PHP projects, I have it working great on a static site, however the majority of my projects are built on a CMS, the most common one is Concrete5.
The problem I am having when it comes to a CMS driven sites is that a bunch of the content of the site is uploaded files which I do not want in my git repository but they need to exist within a folder that is in my repository. As an example, all of my code within a concrete5 site lives inside /application, but the user uploaded files live in /application/files. How can I preserve this folder between versions?
I have done a ton of googling on this and haven't been able to find a decent answer, I'm not sure if I am searching for the correct term though.
Many thanks in advance.
I recently started to develop a social network, but the problem is i started to mix my Laravel view with AngularJS what led me to a few problems.
I was searching around the net but was not able to find any info about this.
Could someone help me out with this or give me a hint?
I prefer to decouple my Angular.js application from the backend (any backend). You can pick a tool like Linemanjs or Yeoman.
With Lineman (which is the one I use) you develop your app without any backend, in an "isolated way". You can use a fake backend while you are in development mode or even you can have laravel running at port 4567 (just an example) and tell lineman that there is a real backend at 4567 to create a proxy (so you can use your real backend even when your app is in a different folder).
The advantages are many. Decoupled from any backend, so you can switch it to others without any change in Angular. You can take advantage of a pre-configure set of tasks for grunt like Coffeescript, lint, sourcemaps, auto creation of $templateCache, ngmin to avoid minification problems, minification, concatenation... And more if you want.
You also have unit and e2e tests preconfigured...
In short, using this workflow you can create an Angular.js app which plays with any backend and provides you with a lot of tools to create your app easily.
To deploy, both lineman and yeoman creates a "dist" folder with your app itself, just a bunch of static files.
To deploy it with laravel, you just need to drop everything (except the index.html) to the /public folder of laravel. Then convert the index.html to something like home.php in the laravel's /view folder and create a route for it.
We only need to be able to serve the index.html with laravel and that is the best way I found. With that we are able to use html5 mode and make everything work perfect and both part decoupled.
Cheers.
We develop in PHP and HTML/Javascript.
Over time we developed a very big source code library, that contains a couple of hundred PHP and Javascript libraries, that we use for every project. The framework resides its own svn-repository, that we include with an external svn link in each project.
The problem is, that the entire framework itself is about 800MB now.
With only a few projects that we worked on, this wasn't really a problem, but now we have about 30 projects, that all contain a FULL copy of the framework, which takes up a lot of space, and requires constant updating of each copy.
Somehow I would like to have the framework outside the project folders. I've read about referencing other projects in Eclipse, but couldn't really get it to work.
How do you setup the include paths so that each projet 'thinks' that the framework is normally inside the project folder? And can you make a virtual link in an Eclipse project to edit files in the framework just as you would normally do, and get code assist for the libraries too?
One of the main problems is that all our code (and some libraries in the framework itself too) relies on the fact that the framework is in a folder 'framework' inside each project. I'd rather not change all those references to a different path, so maybe I need some .htaccess trick to make this work...
Does anybody else follow the same procedure?
Any advice ?
can you use the "big" project as target platform?
why-create-a-custom-target-platform
If you define it as target platform, the sources are available in your workspace, but they are placed in 1 folder for multiple workspaces. the workspaces will link to the platform, but will not check them out.
Its my first project with PHP, I am still learning phase. Designer is working on dreamweaver to design the web site. As I developer I only understand code and feel comfortable with working on eclipse.
How can we integrate the project, that we both are looking at the same file but with different software/IDE.
Secondly , I will be using XAMPP for Windows but I am confused how the designer will use apache.
All I am looking for what to tools and practices are used when Dev's are working eclipse and designer are working Dreamweaver ?
you should keep you code separated from the html in different files. have you looked into mvc architecture?
if you use an mvc architecture or similar separation of html and php source files, you guys should never really be working on the same files anyways.
if you choose not to, set up an svn (subversion) server so that you guys can work on your project independently of one another but stay in sync. it shouldn't matter what ide anyone uses. dreamweaver has functionality to use subversion for source control, test and production server setup for easy sets/gets. you basically set it up the same as an ftp.
Currently my workflow is like this:
Make some changes to the local
copy of my website
Use Akeeba backup to make a copy of my website and database
Delete contents of hosted server
Upload Akeeba backup files
Visit website and
run akeeba restore which syncs my
database
Is there a better way to manage a joomla website? The problem is, I have a team working on one website so this doesn't really work as well. Setting up version control with the server won't exactly work because pretty much everything in Joomla gets stored in a database so we would need to somehow also get the CVS to work with the database. Potentially if Joomla and SQLite worked together (they don't) a CVS solution might work.
Write a php script, doesn't look like you are doing anything to difficult.
The only problem I see with your process is the downtime. In order to eliminate the downtime you can create two versions of Joomla on your LIVE server and point the apache to one of them, when you deploy your code, do it to the currently "off-line" version of Joomla and after you finish the deploy - point the apache to that version. Just a thought ;)