jacob lee Posted March 23, 2008 Report Share Posted March 23, 2008 Recently I just had success on installing Firebird on the uniform server. If you want to use firebird as your database engine this article might give you a method if you don't know how to. 1. download firebird server uninstall version and uncompress the zip to the uniform server\udrive\usr\local and change the newly created folder name to firebird. 2. set folder where you save firebird database files. I set up like this: \udrive\var\firebird 3. open start_server.bat and find a line like:start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf 4. under that line write down: start \usr\local\firebird\bin\fbserver.exe -a(it means we run firebird as an application not a service) 5. save the file. 6. check whether you have php_interbase.dll in your php extension folder. if not you have to get it from php.net. if you want to use pdo then you need php_pdo_firebird.dll also. 7. open php.ini and find extension option and add: extension=php_interbase.dllif you want to use pdo then add also: extension=php_pdo_firebird.dll 8. add to php.ini:[InterBase] ibase.allow_persistent PHP_INI_SYSTEM ibase.max_persistent PHP_INI_SYSTEM ibase.max_links PHP_INI_SYSTEM ibase.default_db PHP_INI_SYSTEM ibase.default_user PHP_INI_ALL ibase.default_password PHP_INI_ALL ibase.default_charset PHP_INI_ALL ibase.timestampformat PHP_INI_ALL ibase.dateformat PHP_INI_ALL ibase.timeformat PHP_INI_ALL 9. "Strings in Firebird are delimited by a pair of single quote (apostrophe) symbols", so if you want convenience change the value of "magic_quotes_sybase" to "On" 10. save php.ini 11. open stop_server.bat and find the line:udrive\home\admin\program\pskill.exe Apache.exe c 12. add under that line: udrive\home\admin\program\pskill.exe fbserver.exe c(there is no way except we shutdown the server by using the tray icon. so we use pskill to kill the process by force.) 13. download the ibWebAdmin from sourceforge.net and unzip to ..\udrive\home\admin\www 14. open ibWebAdmin\inc\configuration.inc.php and change some values like: define('BINPATH', '/usr/local/firebird/bin/'); define('SECURITY_DB', '/usr/local/firebird/security2.fdb'); define('TMPPATH', '/tmp/'); define('DEFAULT_PATH', '/var/firebird/'); => for here we created \var\firebird folder! define('DEFAULT_HOST', 'localhost'); define('DEFAULT_CACHE', 8192); => for better caching define('DEFAULT_SERVER', 'FB_2.0'); $ALLOWED_DIRS = array('/var/firebird/', '/tmp/');define('BACKUP_DIR', '/var/firebird/backup/'); => for this I created \var\firebird\backup folder! 14. save configuration.inc.php 15. open ..\udrive\usr\local\firebird\firebird.conf and change some values like: RootDirectory = \usr\local\firebird DatabaseAccess = Restrict W:\usr\local\firebird;W:\var\firebird;W:\var\firebird\backup TempDirectories = /tmp DefaultDbCachePages = 8192 (be careful when you define the DatabaseAccess, it should have the drive letter "W:", otherwise the firebird gives you error.) 16. save firebird.conf 17. open ..\udrive\home\admin\www\includes\tool.inc and find line: <a target="_phpmyadmin" onclick="h(this);" href="<?=$apanel?>/phpMyAdmin/"><?=$US['nav-pma']?></a> 18. add next : <a target="_ibwebadmin" onclick="h(this);" href="<?=$apanel?>/ibWebAdmin/"><?=$US['nav-ibwa']?></a> 19. open ..\udrive\home\admin\www\includes\server.inc and find line: <a target="content" onclick="h(this);" href="<?=$apanel?>/cgi-bin/includes/lang/<?=file_get_contents("includes/.lang");?>/smysql.cgi"><?=$US['nav-smysql']?></a> 20. add next : <a target="content" onclick="h(this);" href="<?=$apanel?>/cgi-bin/includes/lang/<?=file_get_contents("includes/.lang");?>/rfirebird.cgi"><?=$US['nav-rfirebird']?></a> <a target="content" onclick="h(this);" href="<?=$apanel?>/cgi-bin/includes/lang/<?=file_get_contents("includes/.lang");?>/sfirebird.cgi"><?=$US['nav-sfirebird']?></a> 21. open ..\udrive\home\admin\www\cgi-bin\includes\lang\en\sserver.cgi and find: system "/home/admin/program/uniserv.exe \"\\usr\\local\\mysql\\bin\\mysqladmin.exe --user=root --password=$password shutdown\""; }22. add next:$res = system "\\home\\admin\\program\\pskill.exe", "fbserver.exe"; if ($res == 0){ system "/home/admin/program/pskill.exe fbserver.exe c"; } 23. save sserver.cgi 24. make rfirebird.cgi file in the same folder and the contents are: #!/usr/bin/perl require header; require secure; print " <div id=\"main\"> <h2>» Start Firebird</h2> <h3>Starting Firebird</h3> <p>"; &check_Firebird; if ($run) { if ($ENV{'QUERY_STRING'}eq"F"){ &start_Firebird; print "Firebird server was forced to start."; print "<br />"; } else { print <<ENDDD; Firebird server already running. <br /> But if you think that it is mistake click on this <a href="$ENV{SCRIPT_NAME}?F">link</a> <br /> </p> </div> ENDDD } } else { print <<ENDDD; Firebird server started. </p> </div> ENDDD require footer; &start_Firebird; } require footer; exit; sub check_Firebird(){ $res = system "\\home\\admin\\program\\pskill.exe", "fbserver.exe"; if ($res == 0){$run=1} else {$run=0} } sub start_Firebird(){ exec "/usr/local/firebird/bin/fbserver.exe -a"; } 25. make sfirebird.cgi file in the same folder and the contents are: #!/usr/bin/perl require header; require secure; print " <div id=\"main\"> <h2>» Stop Firebird</h2> <h3>Stopping Firebird</h3> <p>"; &check_Firebird; if ($run) { &stop_Firebird; print "Firebird server stopped.<br>"; } else { if ($ENV{'QUERY_STRING'}eq"F"){ &stop_Firebird; print "Firebird server was forced to stop."; print "<br>"; } else { print <<ENDDD; Firebird server was not running. <br /> But if you think that it is a mistake click on this <a href="$ENV{SCRIPT_NAME}?F">link</a> <br /> ENDDD } } print <<ENDDD; </p> </div> ENDDD require footer; exit; sub check_Firebird(){ $res = system "\\home\\admin\\program\\pskill.exe", "fbserver.exe"; if ($res == 0){$run=1} else {$run=0} } sub stop_Firebird(){ system "/home/admin/program/pskill.exe fbserver.exe c"; } 26. open \udrive\home\admin\www\includes\lang\en.php add in the code: 'nav-rfirebird' => 'Run Firebird', 'nav-sfirebird' => 'Stop Firebird', 'nav-ibwa' => 'ibWebAdmin',Still you need to learn how to use firebird becuase it is quite different from mysql. Quote Link to comment Share on other sites More sharing options...
Ric Posted March 23, 2008 Report Share Posted March 23, 2008 What an excellent write-up. I followed all your steps to the letter used cut and paste for the long lines. I think I am using the correct version! Had a real problem at the end. Anyway thought I would add my comments: 1) Download from: http://sourceforge.net/project/showfiles.php?group_id=9028 Under folder: firebird-win32 Firebird-2.1.0.17755-0_Win32.zip Save Firebird-2.1.0.17755-0_Win32.zip to any folder. 6) Both need to be downloaded: php_interbase.dll and php_pdo_firebird.dll 13) Download ibwebadmin from: http://sourceforge.net/projects/ibwebadmin/ file: ibWebAdmin_1.0.2.zip Save to any folder then extract to folder *\Uniform Server\udrive\home\admin\www\ibWebAdminwww. On starting the servers I received the following error message: “Application failed to start gds32.dll not found” Solution:Copy file fbclient.dll located in *\Uniform Server\udrive\usr\local\firebird\binTo folder: *\Uniform Server\udrive\usr\local\phpRename the copied file to: gds32.dll Run ibWebAdmin from apanel or typehttp://localhost/apanel/ibWebAdmin/database.php This will display the database administration page (green theme). Like I said an excellent write-up just wondering if I was using the correct version because of that error message. All the bestRic Quote Link to comment Share on other sites More sharing options...
jacob lee Posted March 23, 2008 Author Report Share Posted March 23, 2008 Right! I forgot to mention that!. and if any of you install any previous firebird as a service already, then shutdown the firebird server and delete gds32.dll in system32 and copy the new fbclient.dll to php folder and copy it again as a name "gds32.dll" for compatibility. thanks for mention that!. Quote Link to comment Share on other sites More sharing options...
Ric Posted March 23, 2008 Report Share Posted March 23, 2008 Thanks for the reply, so I picked-up the correct files.I confess to not having a clue how to run this server however I managed to get the example database running. I copied the two files in folder: *\Uniform Server\udrive\usr\local\firebird\examples\empbuild Files: employe2.sql and EMPLOYEE.FDB To folder: *\Uniform Server\udrive\var\firebird I was able to login to the EMPLOYEE.FDB database using ibWebAdmin using the following password masterkey I like alternatives, if only I had time certainly would give this a spin. All the bestRic Quote Link to comment Share on other sites More sharing options...
jacob lee Posted June 4, 2008 Author Report Share Posted June 4, 2008 One more thing needed. If you encounter 'too many open links(0)' error or 'Undefined service gds_db/tcp' error thenadd the following line to %SystemRoot%\system32\drivers\etc\services gds_db 3050/tcp #InterBase Server or use my php: <?php // Installs gds_db port to services file $system_root = getenv('SystemRoot'); $service_file = $system_root.'system32'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR.'etc'.DIRECTORY_SEPARATOR.'services'; $lines = file($service_file); foreach ($lines as $line) { if (strpos($line, 'gds_db') !== false) { exit('gds_db port is already installed.'); } } $fp = fopen($service_file, 'a'); fwrite($fp, "\r\ngds_db 3050/tcp #InterBase Server"); fclose($fp); echo "gds_db port is successfully installed."; ?> actually I changed my code to check gds_db port whenever I start the server and install gds_db if it is not installed. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 4, 2008 Report Share Posted June 4, 2008 Can you please post this to the wiki? http://wiki.uniformserver.com/Installing_Firebird I would appreciate it a LOT! Thanks. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
jacob lee Posted June 7, 2008 Author Report Share Posted June 7, 2008 Can you please post this to the wiki? http://wiki.uniformserver.com/Installing_Firebird I would appreciate it a LOT! Thanks. Here you can see: http://wiki.uniformserver.com/index.php/Installing_Firebird There will be some typos and poor grammers please correct them. Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 7, 2008 Report Share Posted June 7, 2008 No problem. Thanks a lot ;-) Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
EMIL Posted October 14, 2010 Report Share Posted October 14, 2010 Recently I just had success on installing Firebird on the uniform server. If you want to use firebird as your database engine this article might give you a method if you don't know how to.Hi Jacob, There must be some curse on Firebird. I spent 3 weeks trying to install Perl DBD for Firebird with no luck. It seems like all required files disappear (or are removed...) I cannot find "Firebird-2.1.0.17755-0_Win32.zip" and so on. Would you have a copy of all required files for me please? Thank you. Best Regards,Emil Quote Link to comment Share on other sites More sharing options...
Znote Posted October 14, 2010 Report Share Posted October 14, 2010 Isn't Firebird the same as phpmyadmin? What are pros and cons? Or am I totally wrong? Quote I am representing the open tibia community otland.netotland.net is contributing open source server software to an 2d mmorpg game called Tibia.Here are some Uniform server tutorials/guide contributions from me:VIDEO TUTORIAL: I teach newbreeds to install and operate uniform server: (Updated for Coral 8.x)http://youtu.be/AsyxPhDTOcIUniform Server newbie guide:Securely installing Uniform Server for total newbeginners:http://otland.net/f479/nothing-fully-worki...-0-3-6-a-77593/(also contains how to get our open source tibia game, and connect it successfully to the uniform mysql server).How to add a website for our open source tibia game which includes highscore, create account and so on: (On uniform server)http://otland.net/f479/website-installing-...m-server-91951/ Link to comment Share on other sites More sharing options...
BobS Posted December 5, 2010 Report Share Posted December 5, 2010 Isn't Firebird the same as phpmyadmin? What are pros and cons? Or am I totally wrong? Just as you said: totally wrong Firebird is a database engine, like MySQL and others, and it has its good points. Quoting from the site (http://www.firebirdsql.org/):"Firebird is a relational database offering many ANSI SQL standard features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names, since 1981." NOTE!!! The instructions for Firebird shown above are two years old. I personally haven't tested any of it, and Ric has been otherwise engaged (like, with MongoDB). The main site shows that version 2.5 has been release, and appears to be MUCH faster for large DBs. We're talking >20GB here. All-in-all, Uniform Server is a pretty good base for testing, but sliding in new DB engines is outside the norm for most users. Hope that gives some background. Regards,BobS Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.