CrimpJiggler Posted June 14, 2014 Share Posted June 14, 2014 Its a pain in the ass setting up frameworks like CakePHP or WordPress repeatedly on your local machine, it would be nice to have a program that automatically sets it up for you. Does a program like this exist? I started making a bash script which automatically installs CakePHP but it turned out to be a lot of work, I don't have the time to do it on my own. What would be cool is if this site had a system where a person starts an editable script, then other users that the person invites are able to edit the script, that way a group of us could pitch in and make new scripts rapidly. Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/ Share on other sites More sharing options...
ginerjm Posted June 14, 2014 Share Posted June 14, 2014 Why do you have to repeatedly install these frameworks? Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1482666 Share on other sites More sharing options...
CrimpJiggler Posted June 14, 2014 Author Share Posted June 14, 2014 (edited) I do a lot of trial and error to learn how to use the frameworks, and sometimes I install lots of plugins and make lots of modifications so things get confusing. When that happens, I prefer to start a fresh install so I can be sure that plugins or whatever don't interfere with the new things I'm testing. The shell script I made does a fair bit of the work, it sets up the config file, edits the salt and cipher, sets up MySQL databases and installs jquery. It does it all in one go though and doesn't give you options (i.e. some people don't want jquery), I couldn't be bothered making an interface for all that. Edited June 14, 2014 by CrimpJiggler Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1482667 Share on other sites More sharing options...
Ch0cu3r Posted June 14, 2014 Share Posted June 14, 2014 (edited) Yep its called composer A quick google search, CakePHP can be installed using composer and so too can Wordpress Edited June 14, 2014 by Ch0cu3r 1 Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1482669 Share on other sites More sharing options...
sKunKbad Posted June 15, 2014 Share Posted June 15, 2014 What Ch0cu3r said. And if you're framework of choice isn't on packagist.org, you might simply use Git to clone the framework's repo. Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1482678 Share on other sites More sharing options...
ignace Posted June 15, 2014 Share Posted June 15, 2014 composer also supports git clone (or if git is not installed on the server, can download's the dist zip): https://getcomposer.org/doc/04-schema.md#repositories 1 Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1482683 Share on other sites More sharing options...
KevinM1 Posted June 15, 2014 Share Posted June 15, 2014 Composer is civilization. Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1482695 Share on other sites More sharing options...
peter_s Posted June 16, 2014 Share Posted June 16, 2014 there is also phing which can be used as the build language and then a combination of vagrant and chef to setup the dependicies. puphpet.com will do alot of the heavy liftning but the framework part you have to do yourself. Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1482707 Share on other sites More sharing options...
CrimpJiggler Posted July 14, 2014 Author Share Posted July 14, 2014 (edited) I started learning how to use composer, I read about it numerous times in the past but didn't realise that this is what it does. Does it have built in functions to set the cipher + seed of a new CakePHP project, bootstrap the plugins for you, setup the database, add jquery to webroot/js + include it in layouts/default.ctp etc? I only started learning it recently so I don't know how to use it yet, but the little I do know is gonna make things a whole lot easier for me. An issue I've run into is I don't know how to make it download plugins that don't have composer.json files. To work around that can you just create your own composer.json file for the plugin, then plug it into composer? I'll look into phing, thanks. I'm guessing it would be easy to make a script that controls composer and bake to do the heavy lifting and framework part for you. Edited July 14, 2014 by CrimpJiggler Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1485079 Share on other sites More sharing options...
CrimpJiggler Posted July 14, 2014 Author Share Posted July 14, 2014 Using CakePHP as an example, the steps I'm talking abot are enabling URL rewriting, chmod 777ing the app/tmp directory, including the plugins in bootstrap.php, setting up a new database + user for the site, enabling jquery etc. All these little things add up and become time consuming. NetBeans has a CakePHP plugin which installs the framework for you and lets you choose which javascript frameworks you wanna install with it and stuff like that, but its still not something that sets the whole thing up for you with the click of a button. Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1485082 Share on other sites More sharing options...
gizmola Posted July 14, 2014 Share Posted July 14, 2014 Vagrant is a popular solution for all these problems. With that said, composer does do much of the heavy lifting. With vagrant, and some puppet or chef configuration files, you can have complete self contained virtual machines you can start or stop as needed. It automates the creation of a VM and all the initialization can be automated. What I really like about it among other things, is that it keeps all that configuration in a shared-nothing environment -- so if you need a complete vanilla LAMP environment with a basic cakephp environment, you could set that up, and tomorrow if you need a 2nd environment, you can simply use the same vagrant file. You do need a fairly beefy machine with plenty of available memory, but Vagrant has packaged and simplified most everything else. For example, I found these 2 vagrant files to look at: https://github.com/FriendsOfCake/vagrant-chef https://github.com/rehabstudio/vagrant-puppet-cakephp From what I saw there are many more to investigate. Just to be clear, if you had vagrant setup on your workstation, you could grab one of these vagrant file projects, copy the structure to a new project directory you make, change to the directory and vagrant up, and you'd have a full working system where you could iteratively work and develop new code. Quote Link to comment https://forums.phpfreaks.com/topic/289160-making-a-program-to-automatically-install-php-frameworks/#findComment-1485086 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.