Recommended Method to Deploy Different Configurations [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
within a PHP project, what would be the recommended way of creating configuration files and reading them within the app; configuration files that would be deployed with different content to staging vs. production servers for instance.

I would recommend looking at how the Symfony project injects Parameters for different systems. Symfony's Config Component can be installed as a standalone library and integrated with most projects.
A default parameters.yml.dist is distributed with the codebase but upon system install customised parameters.yml can either be generated manually on the command line or automatically using a deployment process. This avoids holding sensitive and mutable infrastructure information in your codebase.
Symfony Introduction to Parameters
Symfony Config Parameters Best Practices
Combining this with a docker & vagrant setup will enable configuration options to be mirrored across your environment platforms (production, development, testing). A good tutorial on doing this for PHP frameworks can be found here.

Related

Build laravel from framework kernel [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have started a project to convert some parts of laravel framework to compiled php extensions to improve the performance. I have created a git repository for the migrated parts and another for the laravel modification that will use that extension.
My question is how to build completly all laravel from framework kernel modified?
Do you think that I'm doing well?
I have started a project to convert some parts of laravel framework to
compiled php extensions to improve the performance
...
My question is how to build completly all laravel from framework kernel modified?
Just don't. Laravel is a framework that is changing quite frequently and your attempts to make it working as native code will fail, because every composer update command call will force you to rebuild native implementation.
If you want to put heavy effort for performance optimisation, then go for other frameworks as Falcon, or use Lumen as an alternative (it's lightweight version of Laravel). That's all I can tell about Laravel itself, because optimisation have not only place in Laravel kernel, but also in database design, scale of the project, and other network configuration settings.
Provide more specific information about bottlenecks in your project, and you will get answers that you are looking for.

Deploying a PHP/MySQL Application in Cloud (AWS) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How to deploy an application (in this case a PHP and MySQL based) in a multiple server environment. To be specific, the application is supposed to be deployed as per below mentioned configuration.
MySQL on Amazon RDS
Application (PHP) on 2 EC2 instances
MySQL part is obvious however I need some clarity on how to deploy the application on 2 servers. I understand that I probably need to setup the application on both EC2 instances and somehow AWS elastic load balancing will automatically balance the load.
Are there any specific configuration/code changes I need to make in the application to work in such an environment? In my case the application would be based on either Cake or Yii. Are they cloud ready by default? If not, what changes, if any, that are needed.
Essentially, I am looking for a guide or instructions which clarifies all such doubts and helps me deploy the application as per above mentioned configuration.
I'm using Capistrano when I deploy my Yii application into multiple ec2 instances.
I think the following article would help :
Deploy PHP Websites Using Capistrano (and Git) | Fred Wu's Blog
http://fredwu.me/post/720733257/deploy-php-websites-using-capistrano-and-git
Then, following would help, when you create your first config file of Capistrano for Yii.
deploy.rb
https://gist.github.com/kix/3913165

How can I create complex reports with PHP / Symfony2? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I need to create large and complex reports (with graphs, images, pagination, headers and footers, etc) from my Symfony 2 application.
I've been searching the web, looking for Symfony or PHP complete report generators (like Crystal Reports, Report Builder or JasperReports), but I haven't found anything. The only thing I've found are some libraries to generate PDF's from PHP, and the wkhtml2pdf tool.
Is there any reporting tool for Symfony 2 or, at least, for PHP? Or must I use JasperReports and search or write any plugin to call Jasper from Symfony? I haven't deployment constraints because I have my own VPS (no shared server), so I have root access.
For a "pure" PHP solution, you can use PHPJasperXML, which renders Jasper Reports natively into PHP, so you don't need to setup Java and a bridge for PHP, there are some limitations as this is not an official implementation, but it's pretty useful nonetheless.
By the way, the reports can be created with IReport, and then simply used on PHPJasperXML.

Web Development Work flow using git [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm managing a team of 4 developers. We develop CMS based sites on a PHP / MySQL backend.
I want to improve the workflow. What i want:
Are there any services that host a git repo and sync it automatically with the servers?
Production server would be master branch
Testing server would be a different branch
we deal with many small sites and some large so we need workflow to be fast and agile
WHAT ABOUT THE DATABASE ? lol
(if anyone wants to add to the diagram PSD file can be found here: workflow.psd
I'd highly suggest using Beanstalk if you want something quick and easy to set up. It handles deployments very well. If you're looking at doing a bit more yourself (setting up the hooks and such) then another option would be github.
Please do not user Master as your production branch, master should never be production. A better workflow would be to have a Staging, Development, and Production branch / environment. Please see this guide about branching on Beanstalk's guides, it's pretty insightful.
As for keeping track of databases, if your framework / cms doesn't support database migration I'd highly suggest developing some form of migration / database version control in-house. You can also check out a framework like FuelPHP, which has migration built in. A nice little database version control system I found while poking around : dbv.php.

What's the best way to modify/compile source code of open source projects? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Like PHP and ubuntu.
Is there a convenient way to see the modification alive?
Many open source projects are compiled with those three steps:
./configure
make
sudo make install
The first checks for dependencies and creates a makefile that matches your installation.
The second does the actual compilation and the third one installs it into /usr/bin or whereever it goes.
If you want to modify the code, I recommend you first do the above steps on the unmodified code, to make sure your tool chain actually works as expected.
Each project is different. Most projects have a "How to build" section in their documentation.
To keep up to date with changes in the code I would recommend joining the appropriate mailing list or whatever discussion mechanism the project uses.
You could also subscribe to the RSS feed of the source control or ticket/bug system used by the project.
For the two projects you mentioned have a look at the following sites:
PHP
Using PHP with SVN
Using SVN for PHP Development
PHP Bugs
Ubuntu
Ubuntu Development
Ubuntu Launchpad

Categories