![]() |
|
|||||||
| embarcadero.public.delphiphp.database This group is for all discussion about databases and using them with Delphi for PHP. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I have followed the instructions in the referred post, but still get the following when trying to run the php application with a database component setup to connect to Firebird. Warning: ibase_connect() [function.ibase-connect]: unavailable database in C:\Program Files\CodeGear\Delphi for PHP\2.0\vcl\adodb\drivers\adodb-ibase.inc.php on line 74 Application raised an exception class EDatabaseError with message 'Cannot connect to database server' My database component is setup as follows: Connected: true DatabaseName: localhost:C:\_Tests\DelphiPHP\Blog\Database\BLOGS.FDB DriverName: Firebird Host: 127.0.0.1 Name: Database1 Username: sysdba Password: masterkey Is there anything else I can check to get this working? Regards Marius |
|
|||
|
Quote:
Firebird version? Latest Firebird 2.5 RC has problems in some OS configurations with PHP and Apache. Must check if in windows too, but it's good to know also if Classic or Superserver. Firebird 2.1.3 must be ok, try to check in firebird.conf if directories where to find database can be everywhere. If DatabaseAccess parameter is NONE, you can access database only through aliases defined in aliases.conf (see related doc in firebird.conf) You can try also direct connection, i.e. removing "localhost:" from DatabaseName to check if there are any TCP problem. Connection with other maintenaince application, i.e. IBExpert or FlameRobin, is ok? Firebird is started as application or service (the default)? If it's started as service, try to check if it's runnig in Task Manager. Edited: Which version are you using of D4PHP? If 2.0, don't use Interbase components but standard general database components. Last edited by u.masotti; 13th February 2010 at 20:02. Reason: D4PHP version and VCL components |
|
|||
|
Hi,
Thank you for your response. Yes you're right this is on my dev machine, first want to get it working over here before I start pointing to live databases. ISQL can connect to the database. Running Firebird 2.1.3 as Superserver and as a service. firebird.conf is default, no changes made, the value for database paths/directories is commented out like this: #DatabaseAccess = Full Connections from IBExpert and DatabaseWorkbench is working 100%. I am using D4PHP 2.0 I think maybe it is something silly I am doing or expecting. I can access the database from DataExplorer. As soon as I right click on the database component though and select create dictionary I get an error from ibase_connect that says Error trying to open file and it points to where my database resides. Don't know if this will make a difference but my database does not have the standard extension of FDB but rather it has a MXD extension. Also I have PHP version 5.2.12 installed on my box. The scripts execute now if I run it from with D4PHP (I used the Data Explorer to drag and drop and then set the DriverName to firebird), but as soon as I deploy it I cannot access the deployed script. It is deployed on IIS 7, and browsing to the script in Firefox just gives a blank page, in the IDE I actually get the correct output. http://localhost/testsite/unit1.php Regards Marius PS. Is there not a demo application specifically developed for Firebird with D4PHP 2.0 somewhere that I can download and learn from? |
|
|||||
|
Hi Marius,
Good: firebird server and firebird client are ok then. Quote:
Quote:
In development system, AFAIU, you can open daabase and read the data in the tables, but you cannot generate dictionary tables? If this is the case, use an alias for your database if you can. I had problems in D4PHP 1.0 with non standard extension using dictionary functions: some of them were broken expecting GDB as supported extension only. Don't know if ever resolved in 2.0, but for security purposes, as suggested also in FB releases notes, it's better have DatabaseAcces=None and aliases.conf as the only source for databases' pathnames. Quote:
Don't upgrade D4PHP/php dir, as VCL and IDE AFAIK doesn't support recent PHP releases. Quote:
php-interbase.dll matches IIS version (32/64 bit, MSVC9/MSVC6, multithreaded/single threaded) Ini scripts are correctly configured? Hint, start your php source with this two instructions at the very beginning: PHP Code:
Quote:
But I never used dictionary, so cannot say much about that. Last edited by u.masotti; 14th February 2010 at 12:38. Reason: Adding PHP runtime error checks |