Frequently Asked Questions
If you have any doubt about RadPHP, check out this list of Frequently Asked Questions before you ask, it will save you a lot of time.
General
How do I set the first form in the application?
In RPCL there is no such a concept, that is, the user can execute any script from your web application without running the first form, that’s why there is not such an option. When you run your application from RadPHP, it runs the selected script.
Why can I not access Firebird from the Data Explorer?
The Data Explorer in RadPHP doesn’t support Firebird. It uses dbExpress, from Delphi for Windows, and can connect to the set of databases supported by dbExpress. Firebird is not supported by dbExpress.
You can still use Firebird with RadPHP, since PHP does support it. But you won’t be able to take advantage of the Data Explorer feature.
Help Resources
Where I can find the samples?
Your answer is here.
Components
Where is DBEdit?
The Edit control in the RPCL is data-aware, so there is no need for a DBEdit control. Simply drop an Edit control on your page, and set its DataSource and DataField properties.
Code
How does require_once() and use_unit() work?
The first require_once() on forms includes the rpcl/rpcl.inc.php script, which is the starter for the RPCL. That script provides the use_unit() function, which is part of the RPCL.
Paths are relative to the rpcl folder. For example:
// rpcl.inc.php must be in a subfolder of your application. require_once("rpcl/rpcl.inc.php"); // forms.inc.php must be in the rpcl folder. use_unit("forms.inc.php"); // yourscript.inc.php must be in a subfolder inside rpcl folder. use_unit("subfolder/yourscript.inc.php");
For additional information on including external PHP files from a PHP file, check php.net/manual/en/function.require-once.php.
Deployment
Looking at the installation directory I cannot find any rpcl-bin subdirectory, but the source code of my web page refers to it
When the RPCL folder is on a higher level than the running application, the framework uses rpcl-bin as an alias to the folder the RPCL resides, so you will need to add that alias to your webserver.
Internal Server
Why does RadPHP ship with an old PHP version?
We are using a third-party PHP debugger which is tied to that PHP version, we will improve this in future releases, but we are forced to use this PHP version in order to provide you debugging features.
You can setup your own web server with a newer PHP version on your machine and save your projects to the document root on that server. Then, you can run your project files in your browser pointing to that server.
Does RadPHP overwrite my Apache and PHP settings?
No, versions of Apache and PHP provided by RadPHP are not installed in your machine, they are just copied and then used by RadPHP, so it doesn’t interfere with your system.
I am trying to modify php.ini in RadPHP’s PHP copy, but RadPHP restores it to its previous state
For instructions on how to change RadPHP PHP settings, check this page.
I am trying to modify httpd.conf in RadPHP’s internal Apache server, but RadPHP restores it to its previous state
The file you need to tweak is httpd.template.conf, not httpd.conf, the IDE uses the .template to generate the .conf.
Performance
Why is RadPHP Designer slower than Delphi’s?
In Delphi, Designer is faster because controls are native Win32 controls. In RadPHP, components are PHP components, and their code must be executed before they are updated in the Designer. Yet, we are working on improving its performance with each new update and release.
Some operations or applications run slow
If you run in debug-mode, the code is processed also by the debugger, which makes things slower. Try running without debuggin.
Also, RadPHP’s Apache server keeps logs. You can disable logging if you need to.