Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Pervasive 7.x + PHP + Apache 2.x Problems with ODBC

Pervasive 7.x + PHP + Apache 2.x Problems with ODBC

Pervasive 7.x + PHP + Apache 2.x Problems with ODBC


  I have one Pervasive 7.x running in one linux box with Centos 4.6, from windows clients no problem because we install on each one the client software.
  Now we want to change some app from GUI to web, we install apache 2.x + php 4.x + unixodbc to run this.

  Pervasive use his own paths, doesn't use the standard linux paths, I add the library path to linux, and add my dns to /etc/odbc.ini.

  We test isql and we can connect to pervasive and query the database:

root@server1 ~]# isql -v DEMODATA
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |

SQL> select * from class where id=4
| ID | Name | Section| Max_Size| Start_Date| Start_Time| Finish_Time| Building_Name | Room_Number| Faculty_ID |
| 4 | ACC 102| 001 | 30 | 1995-06-05| 14:00:00 | 16:50:00 | Bhargava Building | 102 | 325173078 |
SQLRowCount returns -1
1 rows fetched

Here everything is working as u can see. Now we can run some test script from shell and no problem:

[root@server1 html]# php odbc2.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

CTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<table border=1>
<td>4</td><td>ACC 102</td><td>001</td><td>30</td><td>1995-06-05</td><td>14:00:00</td><td>16:50:00</td><td>Bhargava Building </td><td>102</td><td>325173078</td></tr>
<p>Number of Fields: 10</p>

I change the query just to return me 1 row and success.

The problem i got right now is that if we run this script from the browser i receive this:

CTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Warning: odbc_connect(): SQL error: [unixODBC][Pervasive][ODBC Engine Interface][Data Record Manager]The MicroKernel or Btrieve Requester is inactive(Btrieve Error 20), SQL state S1000 in SQLConnect in /var/www/html/odbc2.php on line 9

Could not connect to databases

The service is running, if not the first 2 steps wouldn't work.

  I have been searching about Pervasive and PHP, a lot people just tell me that this can be done because Pervasive site say, but i still don't know someone with something like this in the real world.

  If this is possible, hope someone could give a clue what I'm missing, thanks all for your time...peace

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close