PDA

View Full Version : PostgreSQL


boardmain
5th August 2005, 00:19
i'have created the update package for install
phppgadmin

but when i try to launch it i have the errore message becouse
php isn't copiled with --with-pgsql
this error if related to apache of ispconfig webserver or system apache?

how i can solve it?

(the request is for a official postgresql release :P )

till
5th August 2005, 09:51
i'have created the update package for install
phppgadmin

but when i try to launch it i have the errore message becouse
php isn't copiled with --with-pgsql
this error if related to apache of ispconfig webserver or system apache?

how i can solve it?

(the request is for a official postgresql release :P )

This is related to the PHP / apache of ISPConfig.

To compile the ISPConfig PHP with postgres:

1) Download the ISPConfig installer tar.gz and unpack it.
2) cd istall_ispconfig/compile_aps
3) Edit the script "compile" in the compile_aps folder and add the
--with-pgsql directive in the PHP configure statement (line 85)
4) Stop ISPConfig: /etc/init.d/ispconfig_server stop
5) Run the compile script ( ./compile)
4) Start ISPConfig: /etc/init.d/ispconfig_server start

Remark: This is untested ;)

May you send the phppgadmin package to dev [at] ispconfig [dot] org
when everything is working? Then we can put it on the downloads page.

falko
5th August 2005, 11:03
To compile the ISPConfig PHP with postgres:

1) Download the ISPConfig installer tar.gz and unpack it.
2) cd istall_ispconfig/compile_aps
3) Edit the script "compile" in the compile_aps folder and add the
--with-pgsql directive in the PHP configure statement (line 85)
4) Stop ISPConfig: /etc/init.d/ispconfig_server stop
5) Run the compile script ( ./compile)
4) Start ISPConfig: /etc/init.d/ispconfig_server start

Remark: This is untested ;)

This won't work! :eek:
You must unpack the ISPConfig sources again, edit install_ispconfig/compile_aps/compile and change the PHP configure statement (add --with-pgsql) and then re-install ISPConfig (yes, you can install it over an existing installation)!

boardmain
5th August 2005, 11:36
ok i have reinstalled (if u compile after installation.. the dir ispconfig is deleted :/.... )

but now it works

i'have sended it on dev@ispconfig.org

bye

Samuele Coppedè.

Tribal-Dolphin
10th August 2005, 18:41
It can be interesting to add supprot of PostgreSQL to ISPConfig otherwise this plugin will have that can of interest

till
10th August 2005, 20:01
It can be interesting to add supprot of PostgreSQL to ISPConfig otherwise this plugin will have that can of interest

We are working on a patch for the installer, that PHP will be compiled with postgresql support if the setup script finds an postgres server. We will add the postgres Addon to the dowloads page, when postgres support is available.

Tribal-Dolphin
10th August 2005, 21:42
We are working on a patch for the installer, that PHP will be compiled with postgresql support if the setup script finds an postgres server. We will add the postgres Addon to the dowloads page, when postgres support is available.

Great :o
We can add this to the roadmap ?

till
12th August 2005, 11:41
Great :o
We can add this to the roadmap ?

I've added it to the roadmap :)

hkaiser
22nd August 2005, 02:22
Hi,

I installed php from the begining with all option, so I would need the prostgresql support now for our hosted websites. Especially I would need to make Hostingpackages where I can giv e the maximum databases in PostgreSql and if a postgresql database will be addes to the hosting packages or not. Is it possible to get the code for this addon now? Is it possible to have a look to the SVN without downloading the whole source code?

hkaiser

till
22nd August 2005, 09:35
Hi,

I installed php from the begining with all option, so I would need the prostgresql support now for our hosted websites. Especially I would need to make Hostingpackages where I can giv e the maximum databases in PostgreSql and if a postgresql database will be addes to the hosting packages or not. Is it possible to get the code for this addon now? Is it possible to have a look to the SVN without downloading the whole source code?

hkaiser

The things you need are not part of the addon currently developed. The addon includes only the possibility to run phppgadmin, nothing more.

I will put the phppgadmin online on the download page, but you can use it only with a reinstallation of ISPConfig and the steps perfomed in the thread above.

hkaiser
22nd August 2005, 22:41
Hi,

Thanks for the addon. I would like to know how you control that not more than the databases
which you specified in the hostingplan are created by the user for Mysql? I want to add this functionality for postgresql too.

hkaiser

till
22nd August 2005, 22:50
Hi,

Thanks for the addon. I would like to know how you control that not more than the databases
which you specified in the hostingplan are created by the user for Mysql? I want to add this functionality for postgresql too.

hkaiser

Thats easy because the databases where created by scripts in ispconfig and not trough phpmyadmin. The rights of the mySQL users of the clients does not allow the creation of new databases so they cant exceed their database limit with phpmyadmin.

hkaiser
23rd August 2005, 00:16
Hi,

How this script is called? Maybe I can adopt it to postgresql and add it then to the database creation dialog in ISPConfig.

hkaiser

Tribal-Dolphin
23rd August 2005, 11:22
Hi,

You have to create a form with the Form Designer like the existant form named isp - ISP Datenbank.

Then, you have also to create a class for managing PostgreSQL database. The mySQL one is called ispconfig_isp_datenbank.lib.php. you can find it in /home/admispconfig/lib/classes directory.

stuntshell
21st September 2005, 15:53
I'm getting this error compiling it on a Fedora Core 4 (ISP 2.0.9):
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
ERROR: Could not configure PHP

Please advise!
Regards,

till
21st September 2005, 16:17
I'm getting this error compiling it on a Fedora Core 4 (ISP 2.0.9):
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
ERROR: Could not configure PHP

Please advise!
Regards,

This means thet the PHP configure script can not find your postgresql libs. Try to speify the path in the PHP configure statement with:

--with-pgsql=/path/to/your/postges/libs

yeemin
11th November 2005, 19:02
When I try to install it at Fedora 4 but I just install postgreSQL (no MySQL installed at my system), I've got the error message like this:

http://www.sss.hk/sss.bmp

how can I do, please?

till
11th November 2005, 19:34
When I try to install it at Fedora 4 but I just install postgreSQL (no MySQL installed at my system), I've got the error message like this:

http://ym.hk/sss.bmp

how can I do, please?

You cant install ISPConfig without mySQL on your system. MySQL and the mysql devel packages must be installed.

falko
11th November 2005, 19:42
Have a look at the prerequisites for ISPConfig here: http://www.ispconfig.org/manual_installation.htm

yeemin
12th November 2005, 20:29
Have a look at the prerequisites for ISPConfig here: http://www.ispconfig.org/manual_installation.htm


oh, because I think PostgreSQL can replace MySQL, but I find that it is wrong now, Thanks.

eg0y
11th March 2006, 15:03
what is the default path of PGSQL?:confused:

and i get this

[root@localhost compile_aps]# ./compile
bash: ./compile: Permission denied

falko
11th March 2006, 22:33
Did you edit the compile script? Make sure you have Unix linebreaks in it, not Windows linebreaks!

eg0y
11th March 2006, 23:42
yeah i think so.. i just follow the instruction they given in this forum:)

this is wat i did...

rm -fr ${INSTALL_ROOT_TMP}
--with-pgsql=/var/lib/pgsql/
fi
cd ${COMPILE_DIR}

falko
12th March 2006, 15:53
Ok, I see what you did wrong: you tried to run the compile script directly. Don't do it! You must go to the install_ispconfig directory and run ./setup
This will also call the compile script.

eg0y
12th March 2006, 16:57
so .. i dont need to type ./compile ?? it must be ./install?
but if i did did dat.. the ispconfig will be reinstall again ?

falko
12th March 2006, 20:22
but if i did did dat.. the ispconfig will be reinstall again ?
If you have an existing ISPConfig installation, the ISPConfig installer will recognize it and perform an update. However, you should back up /root/ispconfig and /home/admispconfig before (in case something goes wrong).

eg0y
12th March 2006, 21:00
tnx admin ill try to do it.. ill juz inform u wat happen .. tnx man

eg0y
12th March 2006, 22:04
still not ok...........:(

Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

till
13th March 2006, 10:49
Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

You edited the compile script and added the "--with-pgsql=/var/lib/pgsql/" part, then run the setup script and everything compiled without errors but you still get the error "Your PHP installation does not support PostgreSQL."?

eg0y
13th March 2006, 12:25
You edited the compile script and added the "--with-pgsql=/var/lib/pgsql/" part, then run the setup script and everything compiled without errors but you still get the error "Your PHP installation does not support PostgreSQL."?

yeah i already did dat but still not works.. that error still come out...:confused:

falko
13th March 2006, 12:44
What are the exact error messages?

What's in your compile script?

eg0y
13th March 2006, 16:55
What are the exact error messages?

What's in your compile script?

when i try to login to phpgadmin this wat it says

Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

:confused:

till
13th March 2006, 17:25
when i try to login to phpgadmin this wat it says

Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.

You are using the phppgsqladmin package available for ISPConfig and connect to the apache webserver on port 81?

eg0y
14th March 2006, 20:43
yah im on port 81

falko
15th March 2006, 01:35
You're trying to access phpPGAdmin on port 81 and are absolutely sure you compiled ISPConfig's PHP with the --with-pgsql switch?

eg0y
15th March 2006, 22:40
yah man... anywayz tnx 4 assisting me... i think i dont need to install it.. im tired cuzzzzz...:(

calande
7th May 2006, 23:59
Native support to manage, create PostgreSQL databases and users will be nice :)

radim_h
24th January 2007, 01:19
Hello,

ISPconfig is working well but i'd like to add phppgadmin
i have backed up /home/admispconfig and /root/ispconfig
added --with-pgsql as argument into "compile" file and reinstalled ISPconfig.
I have tried installation twice - once with removed /root/ispconfig and once with this directory kept on palce

But in both cases installation ended with this message:
ERROR: Could not configure PHP
cd: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
mv: cannot stat `binaries/aps.tar.gz': No such file or directory
mv: cannot stat `binaries/spamassassin.tar.gz': No such file or directory
mv: cannot stat `binaries/uudeview.tar.gz': No such file or directory
mv: cannot stat `binaries/clamav.tar.gz': No such file or directory
mv: cannot stat `binaries/cronolog': No such file or directory
mv: cannot stat `binaries/cronosplit': No such file or directory
mv: cannot stat `binaries/ispconfig_tcpserver': No such file or directory
mv: cannot stat `binaries/zip': No such file or directory
mv: cannot stat `binaries/unzip': No such file or directory
tar: spamassassin.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
mv: cannot stat `spamassassin': No such file or directory
tar: uudeview.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
mv: cannot stat `uudeview': No such file or directory
tar: clamav.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
mv: cannot stat `clamav': No such file or directory
tar: aps.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
./setup2: line 860: ispconfig_tmp/php/bin/php: No such file or directory
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! The installation routine stops here!

What can i do?

till
24th January 2007, 10:11
The relevant error that explains why PHP yould not be configured is right above the line:

ERROR: Could not configure PHP

Please post this error message. The other errors are only resulting from this first error.

radim_h
24th January 2007, 11:13
The relevant error that explains why PHP yould not be configured is right above the line:



Please post this error message. The other errors are only resulting from this first error.
Post to where??

till
24th January 2007, 11:25
Post to where??

To this forum thraed :)

BigMember
4th March 2007, 20:47
We are working on a patch for the installer, that PHP will be compiled with postgresql support if the setup script finds an postgres server.

When installing from ISPConfig-2.2.10 do I need to add --with-pgsql to the compile file, or does the new ispconfig versions have this 'patch for the installer'?

till
4th March 2007, 20:53
When installing from ISPConfig-2.2.10 do I need to add --with-pgsql to the compile file, or does the new ispconfig versions have this 'patch for the installer'?

You dont have to modify the installer. Just make sure that you have postgresql, the postgresql client and the postgresql development package from your linux distribution installed.

BigMember
4th March 2007, 21:03
You dont have to modify the installer. Just make sure that you have postgresql, the postgresql client and the postgresql development package from your linux distribution installed.

How do I make sure these are installed? Would it be correct to type these commands to check or not? I am using Fedora Core 6 The Perfect Setup Installing a Lamp Server.

rpm -q postgresql-devel
rpm -q postgresql

falko
5th March 2007, 19:33
rpm -q postgresql-devel
rpm -q postgresql
That should work.

BigMember
6th March 2007, 17:43
Here is my output

[root@lexx ~]# rpm -q postgresql
postgresql-8.1.4-1.1
[root@lexx ~]# rpm -q postgresql-devel
package postgresql-devel is not installed
[root@lexx ~]# rpm -q postgresql-dev
package postgresql-dev is not installed
[root@lexx ~]# rpm -q php-pgsql
php-pgsql-5.1.6-3.4.fc6

jnsc
7th March 2007, 10:57
So you need to install postgresql-dev or postgresql-devel. I don't know fedora well, but I think you can use yum to install them.

BigMember
7th March 2007, 20:36
I installed postgresql-devel with yum. I did these commands

[root@lexx ~]# rpm -q postgresql
postgresql-8.1.8-1.fc6
[root@lexx ~]# rpm -q postgresql-devel
postgresql-devel-8.1.8-1.fc6
[root@lexx ~]# rpm -q php-pgsql
php-pgsql-5.1.6-3.4.fc6

I upagraded my ispconfig to newest version, and installed the phppgadmin addon package.

When I access the phppgadmin webpage on port 81 it gives me a login screen, and when I try to login, it says in my web browser "Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option."

martinfst
7th March 2007, 22:06
Before starting the installation of ISPConfig you need to modify (in the extracted directory) the makefiles for php used by ISPConfig. So the steps to do would be:

extract the installation tar file
find the php source directory
locate the makefile for php
change the makefile (probably the Makefile.PL) to add the --with-pgsql flag
change to the top installation directory
start the install script

This is all untested.

BigMember
8th March 2007, 14:36
Before starting the installation of ISPConfig you need to modify (in the extracted directory) the makefiles for php used by ISPConfig. So the steps to do would be:

extract the installation tar file
find the php source directory
locate the makefile for php
change the makefile (probably the Makefile.PL) to add the --with-pgsql flag
change to the top installation directory
start the install script

This is all untested.

1. How am i supposed to find the php source directory?
2. I cannot locate a makefile for php
3. I cannot find a file that is PROBABLY named Makefile.PL

You dont have to modify the installer. Just make sure that you have postgresql, the postgresql client and the postgresql development package from your linux distribution installed.

Which suggestion is right since they contradict each other? Do I need to modify the installer or not?

postgresql and postgresql-devel were installed before installing ispconfig, and the phppgadmin addon package.

martinfst
8th March 2007, 15:37
1. How am i supposed to find the php source directory?
2. I cannot locate a makefile for php
3. I cannot find a file that is PROBABLY named Makefile.PLIf you don't know how to do these steps, I suggest you use the standard installation with MySQL. Changing MySQL for Postgress and dealing with all possible issues might be too much.

BigMember
8th March 2007, 17:42
I edited the compile file install_ispconfig/compile_aps/compile to look like the following for the php section:

cd ../${PHP}
./configure --with-apxs=${INSTALL_ROOT}/httpd/bin/apxs --enable-track-vars --enable-sockets --enable-mbstring=all --with-config-file-path=${INSTALL_ROOT}/php --enable-ftp --prefix=${INSTALL_ROOT}/php ${WITH_OPENSSL} ${WITH_MYSQL} --disable-libxml --disable-dom --disable-xml ${WITH_ZLIB_DIR} --disable-xmlreader --disable-xmlwriter --disable-simplexml --without-pear --with-pgsql || error "Could not configure PHP"
make || error "Could not make PHP"
make install || error "Could not install PHP"
ln -s ${INSTALL_ROOT}/php/bin/php ${INSTALL_ROOT}/php/php

I re ./setup ispconfig. phppgadmin appears to work now.

Can future versions of ispconfig installation routines auto detect postgresql and postgresql-devel and compile --with-pgsql?

BigMember
8th March 2007, 19:00
I don't remember being asked for a postgresql superuser username and password, what is the postgresql superuser username and password to login now from phppgadmin?

falko
8th March 2007, 19:30
Maybe this link helps you: http://archives.postgresql.org/pgsql-general/2006-10/msg01330.php

BigMember
9th March 2007, 18:20
The ispconfig addon package for phppgadmin no longer works with the current versions of PHP, tested with PostgreSQL 8.1.8 on PHP5.2.1.

To UPDATE your existing addon package perform the following commands:

cd /home/admispconfig/ispconfig/web/
rm -rf phppgadmin
wget http://umn.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-4.1.tar.gz
tar zxvf phpPgAdmin-4.1.tar.gz
mv phpPgAdmin-4.1 phppgadmin
chown -R admispconfig:admispconfig phppgadmin

*Note: you can substitute any download server you want instead of sourceforge.net

You can now use phppgadmin at http(s)://server1.example.com:81/phppgadmin/

Hans
23rd June 2008, 20:10
The ispconfig addon package for phppgadmin no longer works with the current versions of PHP, tested with PostgreSQL 8.1.8 on PHP5.2.1.

Please have a look here (http://www.howtoforge.com/forums/showthread.php?p=132434#post132434). :)