HI.
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*. PHP with PDO from YUM using reposity versions.
On start apache does not get error. PHP LOG under, with PDO error.
*PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_pgsql.so' - libpq.so.5: failed to map segment from shared object: Permission denied in Unknown on line 0 *PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_pgsql.so' - libpq.so.5: failed to map segment from shared object: Permission denied in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/xsl.so' - libxslt.so.1: failed to map segment from shared object: Permission denied in Unknown on line 0 [Tue Mar 27 09:35:17 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
I try to reinstall all PHP modules and get this messages
Installing : php-xml-5.3.3-3.el6_2.6.x86_64 14/24 Installing : php-intl-5.3.3-3.el6_2.6.x86_64 15/24 Installing : php-embedded-5.3.3-3.el6_2.6.x86_64 16/24 */sbin/ldconfig: /opt/PostgreSQL/psqlODBC/lib/libpq.so.5 is not a symbolic link* Installing : php-soap-5.3.3-3.el6_2.6.x86_64 17/24 Installing : php-mbstring-5.3.3-3.el6_2.6.x86_64 18/24 Installing : php-snmp-5.3.3-3.el6_2.6.x86_64 19/24
PostgreSQL an APACHE runs normal and PHP does not recognize php_pgsql/pdo_pgsql.
How i fix this mess?
Thanks.
-------------------------------------- Rudinei Dias
Hello Rudinei,
On Tue, 2012-03-27 at 09:49 -0300, Rudinei Dias wrote:
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*.
PostgreSQL an APACHE runs normal and PHP does not recognize php_pgsql/pdo_pgsql.
How i fix this mess?
By not mixing dependent packages from different repos, unless you are prepared to fix and rebuild them.
Is there any reason you cannot use the postgresql distributed with the distro? If you do have to use a more recent version it's usually the easiest approach to either use a Fedora SRPM or to use the RHEL SRPM and pop in a more recent tarball. In either case you might have to fix the SPEC file to remove stale patches, update/fix dependencies etc. YMMV.
Regards, Leonard.
Em 27 de março de 2012 10:15, Leonard den Ottolander < leonard@den.ottolander.nl> escreveu:
Hello Rudinei,
On Tue, 2012-03-27 at 09:49 -0300, Rudinei Dias wrote:
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*.
PostgreSQL an APACHE runs normal and PHP does not recognize php_pgsql/pdo_pgsql.
How i fix this mess?
By not mixing dependent packages from different repos, unless you are prepared to fix and rebuild them.
Is there any reason you cannot use the postgresql distributed with the distro?
Yep, I need PostgreSQL 9.1 for especific feature, but actual repository is 8.4.9. Seeing postgresql ftp, the newest version (for x64 RHEL 6 / Fedora) is 9.0.2, and does not provide aditionals (pgadmin / pdo / etc...) The only i found is from EntrepriseDB installer http://www.enterprisedb.com/products-services-training/pgdownload
If you do have to use a more recent version it's usually the easiest approach to either use a Fedora SRPM or to use the RHEL SRPM and pop in a more recent tarball. In either case you might have to fix the SPEC file to remove stale patches, update/fix dependencies etc. YMMV.
I understood the concept but do not know how to apply it. Its possible correct the links of the file (thats creating the problem in this case / opt/PostgreSQL/psqlODBC/lib/libpq.so.5) into symbolic link? Pointing to what? Or am I totally crazy? Sorry for my bad English.
Regards, Leonard.
On 03/27/2012 08:51 AM, Rudinei Dias wrote:
Em 27 de março de 2012 10:15, Leonard den Ottolander < leonard@den.ottolander.nl> escreveu:
Hello Rudinei,
On Tue, 2012-03-27 at 09:49 -0300, Rudinei Dias wrote:
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*. PostgreSQL an APACHE runs normal and PHP does not recognize php_pgsql/pdo_pgsql.
How i fix this mess?
By not mixing dependent packages from different repos, unless you are prepared to fix and rebuild them.
Is there any reason you cannot use the postgresql distributed with the distro?
Yep, I need PostgreSQL 9.1 for especific feature, but actual repository is 8.4.9. Seeing postgresql ftp, the newest version (for x64 RHEL 6 / Fedora) is 9.0.2, and does not provide aditionals (pgadmin / pdo / etc...) The only i found is from EntrepriseDB installer http://www.enterprisedb.com/products-services-training/pgdownload
If you do have to use a more recent version it's usually the easiest approach to either use a Fedora SRPM or to use the RHEL SRPM and pop in a more recent tarball. In either case you might have to fix the SPEC file to remove stale patches, update/fix dependencies etc. YMMV.
I understood the concept but do not know how to apply it. Its possible correct the links of the file (thats creating the problem in this case / opt/PostgreSQL/psqlODBC/lib/libpq.so.5) into symbolic link? Pointing to what? Or am I totally crazy? Sorry for my bad English.
The problem you are having with pgsql not talking to php is not related the error you see with the php-embeded install. The script that is running is running after the install of php-embedded is calling the command "ldconfig". The purpose is to rebuild the linker cache so that CentOS knows where shared libraries are.
You need to look in /etc//ld.so.conf.d/ at all the files and find the ones concerning pgsql ... and see what they have to say about the file in question (/opt/PostgreSQL/psqlODBC/lib/libpq.so.5) and fix it if there is a problem with that file. This is an issue (and you need to fix it), but it does not have anything to do with pgsql not recognizing your PHP.
You also are going to need to install a php-pgsql.rpm in order to get php to work with pgsql. However, that rpm (php-pgsql-<version>.x86_64.rpm) from the CentOS distribution is probably not going to work. It expects to find the shared library libpq.so.5 in /usr/lib64/libpq.so.5 and was built against the 8.4.9 libraries included in CentOS. You are going to need to rebuild the php RPM with it instead pointing at the new libraries and headers from the new postgresql that you want to use.
I would suspect that you are going to need to rebuild any of these packages (if you want to use them) against the new development libraries for the new version of postgresql that you want to use: apr-util-pgsql.x86_64 dovecot-pgsql.x86_64 libdbi-dbd-pgsql.x86_64 mod_auth_pgsql.x86_64 php-pgsql.x86_64 rsyslog-pgsql.x86_64 uuid-pgsql.x86_64
Remember, this stuff (CentOS) is all built to work together and if you want to go outside of that, you have to not only rebuild the specific package in question, but also any packages that link against that package and use its shared libraries.
You can try to install the distro version of php-pgsql, it is possible it will work. You will need to remove any of the centos pgsql items though and make sure the new libraries are in the ldcache.
Thanks, Johnny Hughes
Em 27 de março de 2012 11:47, Johnny Hughes johnny@centos.org escreveu:
The problem you are having with pgsql not talking to php is not related the error you see with the php-embeded install. The script that is running is running after the install of php-embedded is calling the command "ldconfig". The purpose is to rebuild the linker cache so that CentOS knows where shared libraries are.
You need to look in /etc//ld.so.conf.d/ at all the files and find the ones concerning pgsql ... and see what they have to say about the file in question (/opt/PostgreSQL/psqlODBC/lib/libpq.so.5) and fix it if there is a problem with that file. This is an issue (and you need to fix it), but it does not have anything to do with pgsql not recognizing your PHP.
You also are going to need to install a php-pgsql.rpm in order to get php to work with pgsql. However, that rpm (php-pgsql-<version>.x86_64.rpm) from the CentOS distribution is probably not going to work. It expects to find the shared library libpq.so.5 in /usr/lib64/libpq.so.5 and was built against the 8.4.9 libraries included in CentOS. You are going to need to rebuild the php RPM with it instead pointing at the new libraries and headers from the new postgresql that you want to use.
I would suspect that you are going to need to rebuild any of these packages (if you want to use them) against the new development libraries for the new version of postgresql that you want to use: apr-util-pgsql.x86_64 dovecot-pgsql.x86_64 libdbi-dbd-pgsql.x86_64 mod_auth_pgsql.x86_64 php-pgsql.x86_64 rsyslog-pgsql.x86_64 uuid-pgsql.x86_64
Remember, this stuff (CentOS) is all built to work together and if you want to go outside of that, you have to not only rebuild the specific package in question, but also any packages that link against that package and use its shared libraries.
You can try to install the distro version of php-pgsql, it is possible it will work. You will need to remove any of the centos pgsql items though and make sure the new libraries are in the ldcache.
Thanks, Johnny Hughes
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thanks Johnny!
you rocks!
ldconfig was mapping /opt/postgresql by ldconfig of pgsqlODBC (I wont need this) Once commented ld.so.conf.d/psqlODBC.conf runs ldconfig and restarted postgresql and httpd and now all its fine!
Thanks
On 03/27/2012 03:51 PM, Rudinei Dias wrote:
Em 27 de março de 2012 10:15, Leonard den Ottolander < leonard@den.ottolander.nl> escreveu:
Hello Rudinei,
On Tue, 2012-03-27 at 09:49 -0300, Rudinei Dias wrote:
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*.
PostgreSQL an APACHE runs normal and PHP does not recognize php_pgsql/pdo_pgsql.
How i fix this mess?
By not mixing dependent packages from different repos, unless you are prepared to fix and rebuild them.
Is there any reason you cannot use the postgresql distributed with the distro?
Yep, I need PostgreSQL 9.1 for especific feature, but actual repository is 8.4.9. Seeing postgresql ftp, the newest version (for x64 RHEL 6 / Fedora) is 9.0.2, and does not provide aditionals (pgadmin / pdo / etc...) The only i found is from EntrepriseDB installer http://www.enterprisedb.com/products-services-training/pgdownload
Fedoras Koji has 9.1 packages: http://koji.fedoraproject.org/koji/packageinfo?packageID=655
Regards, Dennis
------------------------------------------------------------- Rudinei Dias
Em 27 de março de 2012 11:55, Dennis Jacobfeuerborn dennisml@conversis.deescreveu:
On 03/27/2012 03:51 PM, Rudinei Dias wrote:
Em 27 de março de 2012 10:15, Leonard den Ottolander < leonard@den.ottolander.nl> escreveu:
Hello Rudinei,
On Tue, 2012-03-27 at 09:49 -0300, Rudinei Dias wrote:
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*.
PostgreSQL an APACHE runs normal and PHP does not recognize php_pgsql/pdo_pgsql.
How i fix this mess?
By not mixing dependent packages from different repos, unless you are prepared to fix and rebuild them.
Is there any reason you cannot use the postgresql distributed with the distro?
Yep, I need PostgreSQL 9.1 for especific feature, but actual repository
is
8.4.9. Seeing postgresql ftp, the newest version (for x64 RHEL 6 / Fedora) is 9.0.2, and does not provide aditionals (pgadmin / pdo / etc...) The only i found is from EntrepriseDB installer http://www.enterprisedb.com/products-services-training/pgdownload
Fedoras Koji has 9.1 packages: http://koji.fedoraproject.org/koji/packageinfo?packageID=655
Regards, Dennis _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi Denis,
how i configure http://koji.fedoraproject.org/koji/ on my YUM repositories?
which fc version (16,17,18) i use to centos 6.2?
thanks
From: Rudinei Dias rudinei.dias@gmail.com
*PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_pgsql.so' - libpq.so.5: failed to map segment from shared object: Permission denied in Unknown on line 0 *PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_pgsql.so' - libpq.so.5: failed to map segment from shared object: Permission denied in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/xsl.so' - libxslt.so.1: failed to map segment from shared object: Permission denied in Unknown on line 0
If it is only a posgresql problem, why does php complain about xsl.so too? Permission denied... SELinux?
JD
On 03/27/12 5:49 AM, Rudinei Dias wrote:
HI.
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*. PHP with PDO from YUM using reposity versions.
use the postgres developer group's RPM's, not the entterpriseDB installer.
# rpm -ivh http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarc... ... # yum install postgresql91-{server,contrib,devel) ... # service postgresql-9.1 initdb (then edit your .conf files in /var/lib/pgsql/9.1/data # chkconfig postgresql-9.1 on # service postgresql-9.1 start
done. this will properly integrate with the base repository's php-pgsql and pdo.
Em 27 de março de 2012 14:54, John R Pierce pierce@hogranch.com escreveu:
On 03/27/12 5:49 AM, Rudinei Dias wrote:
HI.
I have instaled a WEB server with Postgresql on CentOS 6.2. PostgreSQL, versin 9.1.3 x64 from EntrrpriseDB base *.run*. PHP with PDO from YUM using reposity versions.
use the postgres developer group's RPM's, not the entterpriseDB installer.
# rpm -ivh
http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarc... ... # yum install postgresql91-{server,contrib,devel) ... # service postgresql-9.1 initdb (then edit your .conf files in /var/lib/pgsql/9.1/data # chkconfig postgresql-9.1 on # service postgresql-9.1 start
done. this will properly integrate with the base repository's php-pgsql and pdo.
-- john r pierce N 37, W 122 santa cruz ca mid-left coast _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thanks, John. that is was i look for. The postgreSQL documentation about yum/centos/rhel must be updated.
Gracias
On Wednesday, March 28, 2012 08:08:09 AM Rudinei Dias wrote:
Thanks, John. that is was i look for. The postgreSQL documentation about yum/centos/rhel must be updated.
[Mostly for the archives.....]
The CentOS AdditionalRepositories Wiki page provides the links necessary to find the latest PostgreSQL packages; see http://wiki.centos.org/AdditionalResources/Repositories
The PostgreSQL packaging team does a fine job of dealing with the issues that will arise when a core package is updated in this way, but, at the same time, if you use them you will be making your CentOS install 'non-stock' and thus support is more difficult (on real RHEL, installing anything not in the official RHN repos can void your support entirely....).
I once did that work, alone, but now there is a great team making a good repo for the latest (and older versions, up to a point) PostgreSQL. And I use their 9.1 packages on C4, C5, and C6 to good effect.
YMMV, of course.