This topic is locked
[SOLVED]

 Best practises for deployment and update

1/23/2017 4:40:40 AM
PHPRunner General questions
mbintex author

Hi at all,

wondering if there are any "best practises" on how to get a solution to the customer who is installing "on premises".
Currently it´s a multistep thing not usable for the normal user:

  • electronic delivery of php files and sql dump script, link to xampp, installation tutorial
  • installation of xampp, if no MYSQL server is present
  • switching MySQL on.
  • Going to PHPMyAdmin and generating a new database
  • copying of the SQL dump script to phpmyadmin to generate the database structure and creating sample records.
  • copying all the php-files to htdocs of the Apache Server
  • Editing of ConnectionManager.php if necessary
  • First start of the solution, manual changing of passwords for the predefined users
    Are there any ways how we could automize all this, perhaps with a innosetup script ?
    What could I do to speed up the process if we install on our servers? Currently it takes 10 to 15 minutes to get it running - any automation chances?
    And how about updates? Can I run the dump script again or do we have to write a special "update" sql script?
    Thanks to all in advance

romaldus 1/23/2017



Hi at all,

wondering if there are any "best practises" on how to get a solution to the customer who is installing "on premises".
Currently it´s a multistep thing not usable for the normal user:

  • electronic delivery of php files and sql dump script, link to xampp, installation tutorial
  • installation of xampp, if no MYSQL server is present
  • switching MySQL on.
  • Going to PHPMyAdmin and generating a new database
  • copying of the SQL dump script to phpmyadmin to generate the database structure and creating sample records.
  • copying all the php-files to htdocs of the Apache Server
  • Editing of ConnectionManager.php if necessary
  • First start of the solution, manual changing of passwords for the predefined users
    Are there any ways how we could automize all this, perhaps with a innosetup script ?
    What could I do to speed up the process if we install on our servers? Currently it takes 10 to 15 minutes to get it running - any automation chances?
    And how about updates? Can I run the dump script again or do we have to write a special "update" sql script?
    Thanks to all in advance


There are many tools and scripts to automate php apps deployment

mbintex author 1/24/2017



There are many tools and scripts to automate php apps deployment


Tried searching for such tools with google, but with combinations of "setup", "installer", "php", "deploy" etc. I didn´t find any. Could you hint me to some or "the one and only" ? I am new to the PHP business you know. Developed for 20 years in FileMaker.

W
wehaye 1/24/2017

For all requirement application, like webserver (apache), database (mysql/mariadb), you choose a zip package, not installer (exe or msi) package.

Then you can use "Inno Setup" or "NSIS" to create a installer to distribute them.

mbintex author 1/25/2017



For all requirement application, like webserver (apache), database (mysql/mariadb), you choose a zip package, not installer (exe or msi) package.

Then you can use "Inno Setup" or "NSIS" to create a installer to distribute them.


OK, but this is part already done by Xampp.
But how about switching on MySQL, generating the database, generating the tables and data?

W
wehaye 1/25/2017

I have already said that you choose the zip package.

Before you distribute, you must first open the zip package mysql that you downloaded, and then run the service mysql database on your machine, and make the necessary advance. Then copy all mysql root folder.

That way you will distribute all the settings mysql database (including tables, user, triggers, etc.) and does not need to import the sql file or set any setting.

mbintex author 1/25/2017



I have already said that you choose the zip package.

Before you distribute, you must first open the zip package mysql that you downloaded, and then run the service mysql database on your machine, and make the necessary advance. Then copy all mysql root folder.

That way you will distribute all the settings mysql database (including tables, user, triggers, etc.) and does not need to import the sql file or set any setting.



does a MySQL installation not need any dll´s somewhere and no registry setup?
Is it possible just to make a copy of my setting? That´ll easy then.

W
wehaye 1/25/2017

Searching.. Try.. Try.. Try!

Not ask.. ask.. always ask.

mbintex author 1/25/2017



Searching.. Try.. Try.. Try!

Not ask.. ask.. always ask.



Sorry, but isn´t a forum for "asking" ? Upps, did it again ...

Sergey Kornilov admin 1/31/2017

This forum is for asking of course though it is better suited for PHPRunner specific question. This specific question can get a better feedback on a general purpose web development purpose.
There are two different issues here, web server/MySQL installation and application deployment itself. Web applications are normally installed on the the web server where customers can access from anywhere in the world. XAMPP on the other side by default is only accessible from the same machine where it is installed which kind of defeats the purpose of a web application. If you only need access from the single machine you can use desktop version of PHPRunner application with MS Access or SQLite database.
That being said - there is not really enough info on your complete scenario when it comes to environment setup. If your installs XAMPP it may conflict with Apache or IIS already installed on that machine. The same thing is about MySQL, you may accidentally create a port or service name conflict. The most bulletproof approach is to install a customized version of XAMPP that will use custom ports for MySQL and Apache and also custom service names like mysql-mycoolapp. Probably XAMPP can do that. Anyway, I would suggest separating environment setup from web application setup.
In the web application itself you can use the approach that most web applications like Wordpress use. You can create an additional install.php file which should display instructions and 'Install' button. Instructions would say where to change connection parameters. Install button will load the SQL file and execute it. Once installed successfully display a message to delete or rename install.php.

mbintex author 1/31/2017

thanks