Installing php-pear
Installing php-pear
I did yum install php-pear. It's now in /usr/share/pear but it's not active. Do i need to reconfigure PHP? I don't have the original install files so i might have to re-download & reconfigure. Is this right?
configure command:
'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'
configure command:
'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
What do you mean when you say "it's not active"? That configure line is not very relevant here, as that is the configure line that was used to build the core php package, php-pear is a separate package.
Lemonbit Internet Dedicated Server Management
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
Have you checked your logs? By default errors are not logged to the browser (display_errors = Off), but just to the domain's error_log.
Lemonbit Internet Dedicated Server Management
Thanks, I think it's another issue actually. I ran a test via SSH. This is the result.
# php -q test.php
PHP Warning: require_once(): SAFE MODE Restriction in effect. The script whose uid is 10038 is not allowed to access /usr/share/pear/PEAR.php owned by uid 0 in /var/www/vhosts/...... on line 34
Safe_Mode is off (confirmed with phpinfo()). And i added base_dir string for pear... gah!
# php -q test.php
PHP Warning: require_once(): SAFE MODE Restriction in effect. The script whose uid is 10038 is not allowed to access /usr/share/pear/PEAR.php owned by uid 0 in /var/www/vhosts/...... on line 34
Safe_Mode is off (confirmed with phpinfo()). And i added base_dir string for pear... gah!
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
When you run php from the command line it uses the settings from /etc/php.ini, so if you disabled safe_mode for the domain that doesn't mean you get the same environment when you run your script from the command line.
I have one domain here that uses PEAR files from /usr/share/pear and has /usr/share/pear added to its include_path (not necessary, but that makes for easier including) and open_basedir path in its vhost.conf, like this:
What does your config and test.php look like?
I have one domain here that uses PEAR files from /usr/share/pear and has /usr/share/pear added to its include_path (not necessary, but that makes for easier including) and open_basedir path in its vhost.conf, like this:
Code: Select all
<Directory /var/www/vhosts/example.com/httpdocs>
php_value include_path .:/usr/share/pear
php_admin_value open_basedir /var/www/vhosts/example.com/httpdocs:/tmp:/usr/share/pear
</Directory>
Lemonbit Internet Dedicated Server Management
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
Then probably other domains won't be able to use PEAR. You might as well then just download the PEAR files you need and put them in the domain's documentroot and not use the php-pear package at all.raaqi wrote:i got this working for the client who needed it by chown'ing the pear dir to that user & group.
Lemonbit Internet Dedicated Server Management
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
You can check the above by executing this:
However, I still seem to have include_path problems under PHP 5.2.5 even though the above code returns nothing.
Code: Select all
# find /var/www/vhosts -name vhost\*.conf -print0 | xargs -0 grep php_admin_value.*include_path
Lemonbit Internet Dedicated Server Management
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
To bad Plesk's php*-configurator package sets the include_path in /etc/php.ini to ".:", so you'll have to disable include_path every time Plesk does that.
Lemonbit Internet Dedicated Server Management
-
- Long Time Forum Regular
- Posts: 2813
- Joined: Sat Aug 20, 2005 9:30 am
- Location: The Netherlands
But if Plesk setting the include_path causes problems with PHP 5.2.5, shouldn't we just file a bug report with SWsoft about the issue?
Lemonbit Internet Dedicated Server Management