WampServer – PHP 5.3 and Firebird 2.5 [Solved]

Problems to connect PHP 5.3 and Firebird, using the WampServer or Xampp? Maybe this post can help. Check out!

Problem

This week I had a little trouble to install the WampServer Windows 7. The problem of installation and compatibility with Windows 7 was resolved by reinstalling a newer version of WampServer – WampServer 2.0i (July 11 2009). But, still, gave error when trying to connect using Firebird, something like “Fatal error: Call to undefined function ibase_connect()” and other.

Solution

Actually I tried so many things that I do not know for sure which one made it work :P. So, follow step 1 and 2, it operates, go to 3, and so on. What matters here is that now is working and so I decided to post if anyone's with similar problem.

The detail is that I've tested both the WAMP and XAMPP, and both worked well, considering the environment with Windows 7 + Firebird 2.5 + WampServer2.0i (PHP 5.3.0).

I put the DLL php_interbase.dll, fbclient.dll and gds32.dll that utilizei, Available for download (see above), in case you need. So, lets get down to, here's a tip:

(1) Copy php_interbase.dll para C:\wampbinphpphp5.3.0ext. (Do this if the dll does not exist)

(2) Enable (remove the comma from the beginning of the line) option extension = php_interbase.dll no C:\wampbinapacheApache2.2.11binphp.ini. NOTE: If you do not have this entry, add it!

Now, test one: Restart Apache and see if the connection is already working. Is negative, go ahead:

(3) Copy and fbclient.dll gds32.dll to C:\wampbinapacheApache2.2.11bin. It would be good that these files were also in C:\WindowsSystem32, If you have not already.

(4) Install new version Firebird-2.5.0.26074 _ 1_Win32

(5) Unleash the windows firewall 7 the door 3050 (Firebird) (Advanced Settings> Inbound Rules> New Rule> Door> … )

Remember to restart the Apache service every time you test the operation.

Below is a simple example of connecting PHP Firebird x:

conexao.php | Connecting PHP to Firebird

1
2
3
4
5
6
<?PHP 
      $hostname = 'localhost:/Wamp/www/database/MEUBANCODEDADOS.gdb ';
      $username = 'sysdba';
      $password = 'masterkey';
      ibase_connect($hostname, $username, $password);
?>
Total hits: 113523

38 comments on “WampServer – PHP 5.3 and Firebird 2.5 [Solved]

  1. André Cezimbra said:

    Bah my! I can't make it work there is no way this command ibase_connect…
    But not with reza of Gypsy male!
    I've tried passing the 7 parameters, DB, User, Pass, Charset,Buffer,Dialect,Scroll…
    I've tried using the bar \ Like this… I've tried to use 127.0.0.1 instead of localhost…
    I don't know what else to do…
    Not to mention that my íconezinho next to the clock's always saying: WAMPSERVER – Server OFFLINE.
    Help me ae boss!

  2. Oops, Welcome to the world of computing. Work of first not funny :(D). Good, for starters, This Post was made and tested with Windows 7. Including the Firebird connection example above, the way it is there, with the direction of the bars and all, It's working for me. So let's break it down… uninstall all previous versions of your Wampserver (before, back up of your www). Install a version of Wampserver here zeradinha: http://www.wampserver.com/en/download.php. Uninstall your Firebird also and get the new version here: http://www.firebirdsql.org/index.php?op=files. After installing it, then just follow the procedure described in tip (1) and (2) This Post. Restart the services of Wampserver and try making a simple connection, as code above, just correcting the path and the name of the, of course. Any error, take a look at the Apache logs, which is in C:\wampbinapacheApache2.2.11logs. Said, t +

  3. By Cleivo said:

    Dear Taylor, you have found the correct version of the file php_interbase.dll. But the key was to copy the files and gds32.dll fbclient.dll to the bin folder of apache.

    Thank you very much, I broke a lot to head to make this connection.

  4. Camila said:

    Hi Taylor, all well?
    Where did you get the correct version of the file php_interbase.dll? I have installed php 5.3.6 Vc9 launchers, He gives an error when restarting apache because it.

    • Oops, I don't remember where I got the dll… in the Windows environment 7 + Firebird 2.5 + WampServer2.0i (PHP 5.3.0), tested it and it worked fine… spoke, t +

  5. Menander Neto said:

    Congratulations for the post… killer problems…

    Now I'm wanting to do the access via PDO.

    If you can post here as comment.

    Thanks!

  6. Barton said:

    Man I couldn't no way, just in doubt took a virtual machine from scratch and I was doing and nothing. the error: Call to undefined function ibase_connect() continues, I don't know what else to do, JA sao 2 days trying and trying and nothing ://

  7. Barton said:

    Oops, now with Xampp worked, I replaced the files that I had downloaded by you provided in the phpext folder and it worked
    great tip, congratulations and valeuu

  8. Maycon Morcelli said:

    Thanks.
    I followed your recipe for cake, and I ended up with a anguish for months.
    well, so could make php connect through ODBC drivers..

    Thanks.

  9. Mark Bernardo said:

    Great Taylor Lee,

    Thanks… I found a light.. to port an application to web + CakePHP

    I was able too do work with FB 2.0
    I installed the FB 2.5 After I uninstalled and went back the FB 2.0
    But your FBClient and 2.5 worked up with SPs in CakePHP 1.3.8

    Thanks
    Marcos

  10. George said:

    I tried all the steps above and nothing work for me, is there any hint you could bring? or maybe im lossing something….

    HELP ME OUT!!!!!!!!

  11. Alexander Luiz said:

    I was having these problems tbm and couldn't solve them no way. Until I found on the net, I don't remember where, someone saying to put two against bars “\\” the address of the Bank on the connection. I couldn't believe, but as I was tired, I tried to… And to my surprise it worked, now it worked… If someone wants help, You can write to sete.estrelo@gmail.com I help…

    Stay with God…

    Att.
    Alexy

  12. Kenny Mayer said:

    Thanks man, very good, solved my problem with the connection, because I searched for months for a solution installing firebird, Apache and php separately, until q tried this method and your work, Thank you very much, Thanks…

  13. William said:

    Helped me a lot, in my case I use the xampp and after having placed the Dll ´ s directory of Php and Apache the Apache service went up and I was able to connect to the fire… Thank you very much for the tip… Hug!

  14. Carlos Félix said:

    So… When the Bank's site, works, but my intention is to provide for those who do not have the Bank through the website of a company… is there any way?

    Thanks

    • Sorry, but I don't understand your difficulty. The above solution is recommended for those who want to use PHP to Firebird. So, need to have access to the Web server where the source code is hosted, or ask your provider that adjust the setting, If it is not working.

  15. Fatal error: Call to undefined function ibase_connect() in C:\Webserverwwwteste_Firebird.php on line 5, in my pops up this error, I did the script in DreamwaverCS5, If you can help me.

  16. Douglas said:

    Was developing with Codeigniter, on my machine with Wamp(PHP 5.3.5). It was just activate the extensions in php.ini and paste these dlls that everything worked.! Vlw!

  17. Leonardo said:

    Thanks man, the first solution was enough for me. I didn't even have to download the dll, I just didn't know the need to enable the extension of interbase. After you enable it was all smooth!

    Hug

  18. Hello guys, all well, I'm new to PHP and I got this code below:

    Apparently, I'm connected to firebird, but this giving me this error:

    Parse error: syntax error, unexpected ' if’ (T_IF), expecting ')’ in C:\wampwwwfbindex.php on line 11

    JA I googled, but so far not been able to solve, can someone help?

  19. Nilton said:

    Staff, I need help, I can't make it work.
    I followed all the tips and to run the wampserver, the message appears:

    Php Startup: Unable to load dynamic library
    ' (c):/Wamp/php/bin/php/ext/5.5.12 php_interbase.dll’ – %1 is not a valid Win32 application.

    use the wampserver version:
    PHP 5.5.12
    Apache 2.4.9

  20. Menander Neto said:

    Following, Another tip for those who use the latest version of WAMP 2.5, for example, the php.ini file this in the folder of apache server.

    (C):\wampbinapacheapache2.4.9bin

    Note has been case here…

  21. Ivan said:

    Friend, If you can connect with pdo firebird don't forget to help us, post.

    Thank you in advance!

    Hug.

  22. Ivan said:

    Thank you very much!
    After a full day of stress trying to connect with the firebird, Thanks to your tip I was able. If you can connect with PDO firebird help us also.

    Hug.

  23. Duilio said:

    ###################################################
    ###################################################

    NEED TO PUT THE FBCLIENT. DLL IN THE DIRECTORY.. /XAMPP/APACHE/BIN

    ###################################################
    ###################################################

Leave a reply

The your email address will not be published. Required fields are marked with *