Problem with DA-PgSQL v0.5.2 and PhpExpress

neoblu

Verified User
Joined
Oct 16, 2008
Messages
18
1) Installed http://www.howtoforge.com/blockhosts_debian_etch :D
2) I have installed DirectAdmin with php-cgi 4 and 5 (default) :)
3) I recompiled apache as attachment file_1.txt :)
4) install postgresql from APT (debian etch) :)
5) run the command after it bought Da-PgSQL:
Code:
./daplugin.build update
./daplugin.build phppgadmin
./daplugin.build da-pgsql
6) configure phpExpress (read file_2.txt)
7) i have in the log error apache this:
Failed loading /usr/local/phpexpress/phpexpress-php-5.2.so: /usr/local/phpexpress/phpexpress-php-5.2
.so: cannot open shared object file: Permission denied, referer: http://IP/info.php :mad:

how can I fix? :confused::confused:
Thank you
 

Attachments

1) Installed http://www.howtoforge.com/blockhosts_debian_etch :D
2) I have installed DirectAdmin with php-cgi 4 and 5 (default) :)
3) I recompiled apache as attachment file_1.txt :)
4) install postgresql from APT (debian etch) :)
5) run the command after it bought Da-PgSQL:
Code:
./daplugin.build update
./daplugin.build phppgadmin
./daplugin.build da-pgsql
6) configure phpExpress (read file_2.txt)
7) i have in the log error apache this:
Failed loading /usr/local/phpexpress/phpexpress-php-5.2.so: /usr/local/phpexpress/phpexpress-php-5.2
.so: cannot open shared object file: Permission denied, referer: http://IP/info.php :mad:

how can I fix? :confused::confused:
Thank you

I resolved, it is an issue of permission.
But DA-PGSQL still does not see phpexpress although the phpinfo () you can see very well now.

Some of you had the same problem?
Thank you.
 
Last edited:
You dont need to install phpexpress on your own since v0.5.

and the plugin uses its own php.ini:
/usr/local/directadmin/plugins/pgsql/include/php.ini

if the installer did not append the following line in this file, you need to do it manually:

zend_extension=/usr/local/directadmin/plugins/pgsql/include/loader/Linux/x86/phpexpress-php-5.2.so
 
I have a similar problem. The installer appended this:

Code:
zend_extension=/usr/local/directadmin/plugins/pgsql/include/loader/Linux/x86_64/phpexpress-php-5.2.so

which is wrong, as I am not using a 64bit distribution. If I click on Postgresql configuration on the panel, it says that PHPExpress is not installed.
I have replaced x86_64 with x86, but if I do so, it just shows an empty page, i.e. the menu and everything by DA, but the content of the page is just blank!
I have also downloaded PHPExpress from the official site, but it will react the same as in the first case (PHPExpress not installed). Adding this line to the normal httpd for customers will correctly show PHPExpress as loaded in phpinfo() !!
 
Sorry for my reply:
how shuold i install the last version of DA-PgSQL in my Centos 5 ?

TNX
 
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)
 
thanks for the howto, palantir :)
I think a separated thread in both DA forum and DAPlugin forum will be even better.

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)
1. This is a recorded bug and will be fixed in the next release.
2. That's the size of a newly created DB, try this query: SELECT pg_database_size('db_name')
3. because the postgres DB has default privileges for public
4. I think this is not an issue since the user can drop his own DB only
 
That's something I wouldn't like to hear.

It's not the fact that I paid for it. But I need postgres support, and I chose directadmin also because of this. I guess I can live without it, and return to command line, but it would make the choice to switch to DA less worth it.

Does anyone know of other plugins, or if the DA staff plans to support postgres in some future?
 
I had a server crash and had to reinstall PgSQL and the DA-PgSQL plugin. When I used the daplugin.build, I couldn't install the PgSQL because the link was broken. I installed PgSQL using Yum but it intalled version 8.1.11. This version doen't want to run without poblems. I can't create databases, when I try to create one, I get the error: source database "template1" is being accessed by other users.

I contacted Chris many times and he told me to have look to solve it, but until now he didn't solve it. I worried, I have quite a few customers using PgSQL and I can't restore their sites. I hope sombody can help me, It's pity Daplugin doesn't solve it.
 
Back
Top