bloody forums... and lack of knowledge

Place to discuss Slackware
Post Reply
Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

bloody forums... and lack of knowledge

Post by Master of Reality » Sun Jun 15, 2003 6:16 pm

I just downloaded phpBB. I have postgresql isntalled (i barely know how to use it). I created my database and started the postgresql server and added a pgsql user.
Now i tried installing phpBB and it said "your version of PHP doesnt support postgresql".
I'm almost postive my PHP works on my server.
So, is there some sort of package i must installed to get php to work with postgresql??

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Jun 15, 2003 7:50 pm

Like always, it could be extremely helpful to know which distro/version, Apache/version, PHP/version, PostgreSQL/version, etc. It would also be helpful to know if the previous packages were compiled from scratch or prebuilt packages. If prebuild where they are from, if compiled from scratch, what options were used, etc.

Having said the above I ended up going with MySQL as the backend for my phpBB rather than PostgreSQL. I am a huge fan of PostgreSQL (prefer it over MySQL actually) but I ran into a couple of snags with phpBB. When I tested it on MySQL, which I also had installed, I didn't have any trouble so I just left it running on MySQL. I believe the phpBB people favor MySQL so if you have that installed you might try it.

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Mon Jun 16, 2003 1:29 pm

i will try mysql because i do have it installed. I like PostgreSQL better (even tho i have little experieince with either).

For when i cant get mysql/pgsql working.... slackware9 (or 8.1... but i think its 9), installed with OS (everything), pgsql 7.3, mysql ver11.18 dis.3.23.51 , php 4.2.1, apache 1.3.24
Last edited by Master of Reality on Mon Jun 16, 2003 2:49 pm, edited 1 time in total.

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Mon Jun 16, 2003 1:49 pm

erm... for a user of mysql, what should i set their permissions as? Or do i just set no permissions, and then for the phpbb database i let them have all permissions?
I'm using webmin 1 to configure mysql.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Jun 16, 2003 1:56 pm

That's a really old version of Apache and not one that comes with Slack 8.1 or 9.0. Slackware 8.1 comes with apache-1.3.26 and Slackware 9.0 comes with apache-1.3.27. The PHP version you are running is the same version that ships with Slack 8.1, 9.0 ships with 4.3.1. Slack 8.1 ships with MySQL 3.23.51 and 9.0 ships with 3.23.56. I didn't see PostgreSQL in the list for either distro version, which might explain the error message. If it doesn't ship with PostgreSQL then there is no reason to compile in PostgreSQL support in the PHP package.

I would suggest determining the actual Slackware version you have installed and get the slackware packages for Apache, PHP, PostgreSQL, and MySQL that match that distro:

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Mon Jun 16, 2003 2:29 pm

slackware 8.1
i upgraded apache to 1.3.24 and my mysql and php are the proper version.

now... the question about the mysql user permissions posted above?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Jun 16, 2003 2:56 pm

I don't know about Slackware but on Red Hat when you upgrade your Apache it will put the new config file in as "httpd.conf.rpmnew" so as not to mess up your existing configuration. I would make backup copies of your config files and your web site just in case. Maybe someone here that runs Slack can give you more definitive advice.

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Tue Jun 17, 2003 1:28 pm

oops i must have edited since you posted. I did upgrade and apache is working fine. But i do get "phpBB : Critical Error Could not connect to the database" when i try to use MySQL.
What permissions should i set for the mysql user?
I created a user and a database ("phpbb") in mysql through webmin. I'm not sure what else i have to do in mysql.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Jun 17, 2003 2:09 pm

Is the MySQL server actually running? "netstat -a | grep mysql" should show a line starting with "tcp" and part of the line should be either "*:mysql" or "localhost:mysql".

As far as the MySQL user and database I created a user called "forum" and under "MySQL user permissions" in webmin that user is restricted to host "localhost" with an encrypted password of my choice and no permissions. I created a database called "forum" and under "Database Permissions" user "forum" has "All" permissions on database forum from localhost. Then in the phpBB setup I just used the database name, database username and password and that was that.

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Thu Jun 19, 2003 1:41 pm

the output from netstat -a | grep mysql shows this as the only mysql process:
unix 2 [ ACC ] STREAM LISTENING 345 /var/run/mysql/mysql.sock

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Jun 19, 2003 5:36 pm

Then it doesn't appear that you actually have mysqld running and listening on the mysql port. It needs to be listening on at least localhost in order to connect to the server. Can you do a "mysql" command and actually start a mysql client session?

Master of Reality
guru
guru
Posts: 562
Joined: Thu Jan 09, 2003 8:25 pm

Post by Master of Reality » Thu Jun 19, 2003 5:57 pm

yes i can, and under ps -e there is a few mysqld and a safe_mysqld

Post Reply