Solved

Apache/PHP/PostgreSQL Installation Help

Posted on 2002-07-28
7
384 Views
Last Modified: 2013-12-15
I'm building a box to do develpment using Apache/PHP/and PostgreSQL. I have a Windows background, and am floundering some with my first Linux installation (although I'm confident I'm educable :-) )

I'm using Slackware 8.1, Apache 1.3.26, php 4.2.2, and postgres 7.2.1. I have the web server up, and php seems to be working. The problem is that all of the postgres functions seem not to be available to php. (I get message from PHP saying "Fatal Error: Call to undefined function: pg_connect()")

I'm more than happy to lavish points on an answer that gets this up and running!
0
Comment
Question by:rickpaul
  • 3
  • 3
7 Comments
 

Expert Comment

by:housetier
ID: 7186910
Hi!

My first guess is that you need to install the postgresql module for php. On my system the package is called "php4-pgsql" for php4 and "php3-pgsql" for php3.

hope it helps...
---Lasse
0
 

Author Comment

by:rickpaul
ID: 7188651
When I installed PHP, I used the --with-pgsql=shared configuration setting. I also see pgsql.so, which I understand is the shared file.

Is there something I can do to confirm that things are where they're supposed to be?
0
 

Accepted Solution

by:
housetier earned 200 total points
ID: 7188761
what is your distribution? Red Hat, Debian, slackware etc?

and does the output of following script say something about pgsql?

===cut===
<?php
     phpinfo();
?>
===cut==

It should give you lots of information about PHP, your webserver, the environment setting, and modules.

If you're quick you might try this URL

http://217.83.9.207/~housetier/info.php

which is excactly the script from above. (you have to be quick because I use a dial-up internet connection with dynamic IPs and I don't know how long I will have this IP)


Do have ICQ or AIM; so when both of us are online, I can give you the URL...
---Lasse
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:rickpaul
ID: 7189085
distribution and versions of programs are in my initial question.

I was able to see your phpinfo, and my
phpinfo(); shows that I configured with pgsql

If we can chat with icq, that would be great!
0
 

Expert Comment

by:housetier
ID: 7190132
Well, my php has bin configured '--without-pgsql' but still there's output that reads:

PostgreSQL Support enabled




I must say that I've never built PHP from scratch. I always used binary packages for my distribution. That's what I recommend you to do, also. That way you have someone elso going through the hassle of configuring PHP and its modules :-)

Here's my ICQ# 117362350
and my AIM screenname realhousetier

---Lasse
0
 

Expert Comment

by:CleanupPing
ID: 9086589
rickpaul:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 

Author Comment

by:rickpaul
ID: 9090963
Sorry to have taken so long to get back on this one.

While the answers provided were helpful and generous, they didn't really solve my problem.

While Lasse didn't directly answer my question he/she kept me plugging away on it until I finally tracked down the solution. (I don't remember clearly, but I think the problem had to do with multiple configuration files, and failing to edit the one that was being read by apache on httpd start.)



0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question