Eventually, after designing and realizing your application, you will have to deploy your applications on the intranet or web. This manual explains the steps that you need to perform to get your application running in a production environment.


While developing, PHsPeed adds code to your application that allows the IDE to work and enable debugging. This code has no function in your production environment and needs to be removed. Your database configuration is most likely different as well. Also, when running in your production environment, you do not want potential hackers to get more information than strictly required, so extensive error messaging is by default disabled. 
So what is the procedure to get your application in production?


Promote code for production

This step is required to get rid of all debugging code that the code generator has created. It will also remove the default user id and password that you have used to debug your application and require that you define an encrypted configuration file to store the access parameters for the database. (It is possible to use an alternate setup where you store the data yourself in a different way, but this method is not recommended.

To promote the code for production, pick the deploy option and select ‘promote code for production environment.’


You will get the following dialog:


By default, the system will remove all debugging code for the ide and disable PHP error reporting. The result will be that when your application has defects in production that there will be no response on the screen. That is a security measurement as it will not give undesired information to potential hackers. However, it could be required to enable this, for instance, to do additional testing. Setting the checkbox will keep the PHP error level reporting unchanged.

The result is an application that is:

  • stripped from comments

Comment lines have no function in a production environment, only development. Although marginal, this step makes the code a bit faster.

  • empty lines

Readability is no issue in a production environment. Again, this will lead to a slight performance improvement. 

  • No debugging code.
  • All code that is required for the IDE is removed. 

The result is ready for you to upload to your server.

As your runtime will also be promoted, you will not see any debugging messages if you continue to develop on your projects. That is easily be corrected but depending on the type of libraries you use: