0

I'm having problems using the php_dbase extension.

I am using php 5.3 under windows. I use webmatrix to edit my PHP.

I have downloaed the latest php_dbase.ll and copy it to:

C:\Program Files (x86)\PHP\v5.3\ext

Then I went to php.ini and add in end:

extentions=php_dbase.dll

this is my PHP SCRIP:

<?php

   $db_uname = 'root';
   $db_passwd = '';
   $db = 'db';
   $conn = mysql_connect('localhost',$db_uname, $db_passwd);

   $db_path = "20130100.DBF";

   $dbh = dbase_open($db_path, 0) or die("Error! Could not open dbase database file '$db_path'.");

   echo 'test';

?>

This should echo out 'test' but it's not doing it.

On google chrome I get the Inernal Server Error 500.

If anyone could help on this thanks!

EDIT:

Thanks to the answers bellow (@VolkerK) I did it! It was a stupid mistake.

When you install PHP extensions always check which php.ini is being used by your WebServer. I had two versions, and was updating one that is not used. You can see this using the PHP function:

PHP Info

<?php
   phpinfo();
?>
Cœur
  • 37,241
  • 25
  • 195
  • 267
devwebapp
  • 135
  • 2
  • 10
  • 1
    Your question should be: "How can I confirm the dbase extension is loaded properly?" Answer: [`phpinfo()`](http://php.net/phpinfo). Your second question is "How can I find out more info about 500 errors?". Answer: http://stackoverflow.com/questions/12769982/reference-what-does-this-error-mean-in-php/12772851#12772851. [How to ask technical questions](http://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx) that will help everyone and not just yourself. – Mike B Dec 19 '13 at 12:20
  • Thank you for your answer. On the phpinfo() there is no dbase... And using the ini_set i get: Fatal error: Call to undefined function dbase_open() Is this the right way to add extensions to PHP? – devwebapp Dec 19 '13 at 12:26
  • 1
    Are you sure you're editing the right php.ini? The output of phpinfo() contains details about the .ini file(s) in use. Also check the error log of both the webserver and php for errors concerning that dll. – VolkerK Dec 19 '13 at 12:47
  • 1
    Also, don't forget to restart your webserver, if you're running PHP through one, after modifying php.ini. – Duroth Dec 19 '13 at 13:02
  • @Volkerk I don't know why but I have two PHP folders: C:\Program Files (x86)\IIS Express\PHP\v5.3 C:\Program Files (x86)\PHP\v5.3 I edited on the second, but my WEBServer is using the first! I'll give a try now! Thank you – devwebapp Dec 19 '13 at 14:39

0 Answers0