Delphi for PHP 2.0 Readme

Abstract: Delphi for PHP 2.0 Readme


    From Delphi for PHP Documentation Wiki

    Delphi for PHP: Release Notes

This file contains important supplementary information that may not appear in the main product documentation. CodeGear recommends that you read this file in its entirety.

For information about installation, deployment, and licensing issues, see the Install, Deploy, and License files located, by default, at C:\Program Files\CodeGear\Delphi for PHP\2.0\Help .


  • Overview of Delphi for PHP
  • Properties and Events in Delphi for PHP
  • Upgrading Your Trial Version to a Fully-licensed Product
  • Viewing Remaining Days on Trial
  • General Notes
  • Apache, PHP, IIS
  • Viewing Help
  • Samples and Demos
  • Contacting Support
  • Product Updates
  • Education Services

    Overview of Delphi for PHP

The Delphi for PHP development suite allows you to work on the following type of projects:

  • PHP services: non-visual, using datamodules and Web Services - business rules you publish using SOAP. For an example, see the Web Service project under 2.0\vcl\samples
  • PHP-only code: Use Delphi for PHP as a source code editor (the traditional way of working with PHP)
  • Template Engine: Develop HTML templates and integrate components into those templates to add live content. For an example, see the Template project under 2.0\vcl\samples
  • HTML interfaces: Use HTML controls like Button and Label to develop lightweight HTML interfaces. This allows a user to take advantage of CSS
  • Rich JavaScript-AJAX interfaces: Use controls like DBGrid, MainMenu, and UpDown to create a rich interface which is designed to be "loaded once". This would use AJAX to post/get data from the server

    Properties and Events in Delphi for PHP

In the VCL for PHP, php magic methods (__get() and __set()) are used to emulate Properties and Events.

The following table describes the naming mechanism is used in both source and documentation:

Method Name Defines How it's used in the Object Inspector and Code Editor
readPublicProperty A public property A public property named "PublicProperty" with the help attached to the method "readPublicProperty()"
getPublishedProperty A published property A published property named "PublishedProperty" with the help attached to the method getPublishedProperty()"
readOnPublicEvent A public event A public event named "OnPublicEvent" with the help attached to the method "readOnPublicEvent()"
getOnPublishedEvent A published event A published event named "OnPublishedEvent" with the help attached to the method "getOnPublishedEvent()"
readjsOnPublicEvent A public JavaScript event A public JavaScript event named "OnPublicEvent" with the help attached to the method "readjsOnPublicEvent()"
getjsOnPublishedEvent A published JavaScript event A published JavaScript event named "OnPublishedEvent" with the help attached to the method "getjsOnPublishedEvent()"

For example, the Label->Caption property is the method Label->getCaption() in code.

Use the F1 key to find help on a property, event or method in the Object Inspector.

    Upgrading Your Trial Version to a Fully-licensed Product

Use the following steps to upgrade a trial version of Delphi for PHP:

  1. Exit out of the trial version of the product if it is opened.
  2. Update your license using the CodeGear Product Registration wizard.
  • If your trial is complete, the wizard appears when you start Delphi for PHP. Enter your new serial number and register your product using the product registration wizard.
  • If your trial is not yet complete, you need to add the serial number using the License Manager:
    1. Run LicenseManager.exe (located by default at Start>Programs>CodeGear Delphi for PHP>License Manager. Choose Serial>Add.
    2. Enter your new serial number and click OK.
    3. Verify that your new serial number is listed under the Unregistered serial numbers node. If your number is not listed, exit the License Manager, verify the serial number, and repeat this step.
    4. Click your new serial number in the License Manager and choose Serial>Register.
    5. When the Product Registration Wizard appears, register your product.

    Viewing Remaining Days on Trial

  1. Open the license manager using Start>Programs>CodeGear Delphi for PHP>License Manager.
  2. Expand the left side of the tree and click on the Delphi for PHP entry. See the "Remaining days" in the right pane.

When your trial expires, the Registration Wizard will appear when you start the product and you will be prompted to enter a purchased full product serial number.

    General Notes

Running and Debugging inside the IDE

To run/debug your applications from inside the Delphi for PHP IDE, you must store your projects on the same drive on which Delphi for PHP is setup. This is not a limitation of the product, but a limitation on browsers because they cannot request JavaScript assets between unit drives.

For the watches windows (including locals and globals) to show UTF-8 variables, you need to set the Code Page on the DBG Listener to match the one you want to use, so the IDE gets the values properly converted.

Why is the Designer slower than Delphi For WIN32?

In Delphi for Win32, the designer is faster because the controls are Win32 controls. In Delphi for PHP, the components are PHP components which have code that must be executed to be updated in the designer.

We expect to improve the speed in future updates and releases. For this release, the assumption is that you are using Web components that can mix a lot of Web technologies, and you are getting the same results in the Designer as if you were running in a browser.

Why do I see the error message "Entered serial number is already registered"?

If you have Borland Developer Studio installed, the serial number and authorization key fields in the Registration Wizard may be autofilled with your Borland Developer Studio serial number and key.

That serial number and key combination will not work for Delphi for PHP and if you try to continue with the registration process you will see an error message "Entered serial number is already registered. Please enter a non-registered serial number to continue".

If you have a purchased serial number and key for Delphi for PHP, enter those into the fields and continue through the registration process. If you have a trial activation file, exit the Registration Wizard and save the activation file from your email to your user home directory per the instructions in the email and Delphi for PHP will start the next time without prompting you for a serial number.

Why are you required to set up the Input Filter extension on PHP?

The first release of the VCL for PHP does not provide pure PHP input filtering. That feature will be added in the open source project.

If you try to access user input without having the Input Filter extension set up, an exception is raised to remind you it needs to be set up. You have two options: Set up the extension or delete the exception being raised from the VCL code. Mixing Controls from Different Libraries on a Form

Some of the libraries are not compatible with each other on the same form. This is because browser resources are shared between the same components resulting in a conflict. Generally speaking, DWidget descendants may have problems with QWidget descendants, for example, a GraphicMainMenu and a PageControl.

Watches and UTF-8

There are some problems watching variable values which contain UTF-8 information, right now, only XP is supported, and be sure you follow these steps,

  1. Start IDE on XP
  2. Open setup dialog of DbgListener from TaskTray icon.
  3. Click [Reset] to detect correct COM server and codepage(932)
  4. Click [OK]
  5. Terminate IDE
  6. Start IDE

MainMenu properties removed

Starting from Update 2, some MainMenu properties have been removed, so you will get errors when trying to run applications designed with previous versions. To fix this problem, just open your form with Delphi for PHP Update 2 and above, modify the form in some way (moving a component is enough) and save it. That will fix the problem.

ListView published property removed

Starting from version 2.0, the Items property of the ListView component is no longer available on the Object Inspector, there is no property editor to edit this property at design-time, so is not a published property anymore.

Location of InterBase Data Files for Sample Applications

When running the included samples that require the InterBase employee.gdb database, you must make sure the data access components are pointed to the correct location of the InterBase Data directory. If you installed the bundled copy of InterBase Developer Edition or other Borland or CodeGear products, the data files may be located in one or more of the following directories by default:

  • C:\Borland\InterBase\examples\database
  • C:\Program Files\Borland\InterBase\examples\database
  • C:\Program Files\Common Files\Borland Shared\Data
  • C:\Program Files\Common Files\CodeGear Shared\Data

Creating Master-Detail Applications

See the MasterDetail sample in the vcl\samples\Data Aware\MasterDetail directory to understand how a master-detail application is created. Note that the UseAjax property of the MasterDetailsample form needs to be set to true in order to have the Detail table updated/refreshed.

Invoking Code Templates

Users of other Delphi and C++Builder products may be accustomed to Code Templates appearing automatically in the code editor when typing words such as "for" followed by a space. In Delphi for PHP you must press Ctrl+J to pop up the list of code templates.


JavaScript is a language that allows you to write software to be executed on the client's browser. The problem with JavaScript is that each browser vendor introduces its own modifications of the JavaScript language, and that leads to incompatibilities. Be aware that you must verify that your JavaScript code will work on the browsers you want to target.

Also note that in Delphi for PHP, breakpoints and other debug support are not available for JavaScript. The IDE doesn't prevent you from setting breakpoints but breakpoints in JavaScript code will not be hit.

    Apache, PHP, IIS

Delphi for PHP copies its own Apache 2 and PHP 5 versions to your hard drive, but this *DOES NOT* affect any existing installations of these programs. If you already have Apache and PHP setup on your machine, the versions included with Delphi for PHP are not *INSTALLED* on your machine, but are just copied and used when needed.

You can use IIS to run your applications. To do this, just save your project in a published folder of IIS (for example c:\inetpub\wwwroot) and use your browser to run your .php applications. Debug might work, but it is not supported at this time.

    Viewing Help

The Delphi for PHP Help menu and the IDE Start page contain links to IDE Help Contents, VCL for PHP components, and the PHP Manual.

The IDE Help Contents contain the main Delphi for PHP help topics and are grouped by topic types:

Conceptual Overviews: The conceptual overviews provide information about product architecture, components, and tools that simplify development. Procedures (How-To): The how-to procedures provide step-by-step instructions. All the procedures are listed under Procedures in the Content pane of the Help window. Additionally, most of the conceptual overviews provide links to the pertinent procedures. Reference Topics: The reference topics provides detailed information on subjects such as general reference, the VCL for PHP language, and the IDE dialog boxes and wizards. All of the reference topics are located under Reference in the Content pane of the Help window. Context-sensitive Help: Throughout the IDE, help is available by clicking on a Help button in a dialog box or on a wizard page. API help is available by pressing F1 on a selected element in the Code Editor, or a selected component on the Form Designer or Tool Palette

In addition, code help is available in the Code Editor by pressing Ctrl+Space at the cursor location to open the Code Insight pop-up window.

    Samples and Demos

  1. Samples are available in C:\Program Files\CodeGear\Delphi for PHP\2.0\VCL\Samples.
  2. Flash Demos, tutorials, and white papers are available on the CodeGear Delphi for PHP Developer Network website at

    Contacting Support

CodeGear Developer Support provides support for software development teams for thousands of customers worldwide. For access to support services including frequently asked questions, opening a support case, and user supported technical newsgroups, visit

    Product Updates

To download any available updates to the Delphi for PHP development environment, visit Get the latest VCL for PHP updates from the open source project site at

Uninstalling and shared files

When unistalling the product, you can get some dialogs prompting you about delete some dll's, these DLLs are the client database dlls, which are shared and because of that, you get the warning. If you think you are not going to need them for another applications, answer yes to get them removed.

If you had a previous version of Delphi for PHP and uninstall it, the folder c:\tmp will be removed, that folder is required for templates to work, so you will need to create it again.

    Education Services

CodeGear Education Services provides training solutions for developers of all skill levels through-out the world. By leveraging our certified partners and web-based technologies we deliver the right training for you, when and where you need it. For more information on CodeGear Education Services, visit the Education area of

Copyright (c) 2008 CodeGear (TM). All rights reserved.