Sorry for my reply:
how shuold i install the last version of DA-PgSQL in my Centos 5 ?
I found the documentation do be a bit scattered around, I will try to summarize the installation process here.
To install it, you will have to first follow this:
http://forum.daplugin.com/index.php/topic,6.0.html (I will refer to this as "the guide"). It will go as far as point 5 of the points below. Then you'll still have some work to do.
1. Install the plugin
2. Install postgresql
3. Install phppgadmin
4. Recompile PHP
5. Install the PHPExpress plugin
6. Install the Zend plugin
Installing PostgreSQL
When installing postgresql (at point 3. of "the guide"), if your distribution is not supported, you'll have to use the distro-provided packages, or you'll have to recompile it from sources. For example, run aptitude and install postgresql from there.
Then, configure postgresql and create the administrative user for the plugin, as instructed in point 5 here:
http://forum.daplugin.com/index.php/topic,19.0.html
I found that if I configure the plugin according to the guide, then phppgadmin will NOT work. Here are the settings that work for me:
Code:
local all postgres ident sameuser
local all all md5
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
Installing phppgadmin
Once you have installed phppgadmin via daplugin, you may still have some things to do.
I found that the installer will not configure the phppgadmin file ownership correctly, thus resulting in phppgadmin to fail (500 internal server error). To fix it, I ran:
Code:
cd /var/www/html
chown -R webapps:webapps phpPgAdmin
You'll better go to that directory, and do an ls -l. Then, change the ownership of the phpPgAdmin folder to the same user as the phpMyAdmin folder.
Recompile PHP
Do remember to recompile PHP.
At this point, you could access DA and you will see the new PostgreSQL option at the bottom of the screen. If you click on it, you will be instructed to install the PHPExpress first. If you already have that installed,
you will see a blank page. This is because you need to recompile PHP first.
Instructions to do so are here:
http://forum.daplugin.com/index.php/topic,10.0.html
If you are using suphp, the file to edit will be configure/suphp/configure.php5, and the line will have to be quoted as the remaining lines, for example:
Code:
"--with-pgsql=/var/lib/pgsql" \
If the installation fails, then you might have to install the "devel" packages for postgresql (for example, on debian that package is called postgresql-server-dev). If it still fails, check the path: it may be different on your distribution. It will complain that a library is missing, you just have do locate in on your disk and use that path in the configuration line.
Install PHPExpress
The installer is supposed to correctly install the PHPExpress extension. In my case it guessed wrong (tried to load the x86_64 extension instead of the x86).
Code:
less /usr/local/directadmin/plugins/pgsql/include/php.ini
Go to the end of this file, and check the line that says:
Code:
zend_extension=/usr/local/directadmin/plugins/pgsql/include/loader/Linux/x86/phpexpress-php-5.2.so
Now the plugin should work correctly. It won't let you do dumps from the panel though. You need Zend Optimizer for that.
Install Zend Optimizer
Edit /usr/local/directadmin/custombuild/options.conf and see if zend=yes. If no, change it to yes. Then build it (./build zend). Finally, you will have to edit the php.ini of the plugin again, and add the zend part. The Zend clause will look like this:
Code:
[Zend]
zend_extension=/usr/local/directadmin/plugins/pgsql/include/loader/Linux/x86/phpexpress-php-5.2.so
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
This should be more or less all, you will be able to use the plugin now.
Open questions / bugs (?)
There are a few issues with the plugin I haven't resolved yet:
1. Databases will always be created SQL_ASCII regardless on the options chosen as encoding (this is a big thing that prevents me to use it in production)
2. The displayed database size will be no less than 4MB, upon creation
3. On phppgadmin, the user has access to the postgres database, and he can create tables, drop tables, etc... on that database.
4. On phppgadmin, the user can drop the database (this may not be an issue)