PEAR Issues


(Eric) #1

OK. So I uploaded the files and set permissions properly (RedHat Enterprise 7.2). I am using the web installer in WEBPATH/install and the matrix source is in WEBPATH/matrix.


I get to the versioncheck step and it spits out "Could not find PEAR. Please make sure that PEAR is installed and in your include path."



I SSH in to my box and do which pear and get: /usr/bin/pear



So I enter /usr/bin/ and it doesn't work. (I thought it wouldn't) so I check what my PHP.ini says my PEAR path is and it says my include path is /usr/share/pear. I tried that and /usr/share/pear/PEAR, and /usr/share/pear/, and /usr/share/pear/PEAR/ all of which did NOT work.



So I look at the source of the installer and see it is looking for PEAR.php, wo I do a locate and find that file exists in the following directories:



/usr/share/pear/

/usr/src/redhat/BUILD/php-4.3.6/pear/

/usr/src/redhat/SOURCES/php-4.3.6/pear/

/home/httpd/vhosts/webmail/horde/pear/



So I tried:



/usr/share/pear

/usr/src/redhat/BUILD/php-4.3.6/pear

/usr/src/redhat/SOURCES/php-4.3.6/pear

/home/httpd/vhosts/webmail/horde/pear

/usr/share/pear

/usr/src/redhat/BUILD/php-4.3.6

/usr/src/redhat/SOURCES/php-4.3.6

/home/httpd/vhosts/webmail/horde



I cannot make it work. Is there any suggestion for my situation? I am running PHP 4.3.3 on a box that is also running Plesk 7.0.2.



I am using PEAR to run an image-based management program with IMAGICK PECL extension and some other PEAR packages. When I do: pear list-all I see I have at least the minimum requirement for all packages.



When I do: pear config-show I get the following information:



PEAR executables directory bin_dir /usr/bin

PEAR documentation directory doc_dir /usr/share/pear/docs

PHP extension directory ext_dir /usr/lib/php4

PEAR directory php_dir /usr/share/pear



Will I have the same issues with installing without the web-based installer?



(I opted to give MORE rather than LESS information here to hopefully facilitate a positive outcome.)



Thank you, I am excited to play with the new release.


(Greg Sherwood) #2

If you want to try a manual install, you can use the install scripts provided in the install directory.


from the root of the install:

    php install/step_01.php (you might get a few notices)
    vi data/private/conf/main.inc (fill in your DB details, URLs etc)
    php install/step_02.php .
    php install/step_03.php .


Just post if you need any help with the main.inc configuration.

(Marcus Nyeholt) #3

The way the installer checks for the PEAR versions is to instantiate the PEAR Registry and load up the information from that (The check for PEAR.php is to find the path to give to the registry). For some reason on some installations of PEAR the registry can't be found/doesn't want to initialise. Can you find your Registry.php? Are you able to instantiate the Registry outside of the installer at all? (ie require_once 'PEAR/Registry.php' in a test script to make sure it can be instantiated).


There's been a couple of people say that the registry isn't able to be initialised, so we're looking at changing the installer to try and load the required classes and get version details from those.


(Avi Miller) #4

This is particularly noticable on Solaris, where all the PEAR files are owned by root and the Apache user doesn't have read access to the files or execute access to the /usr/local/lib/php directory (and the .registry directory under that). The Apache user needs both in order to instatiate the PEAR registry properly.


(Eric) #5

I modified the path for PEAR to work with my server's BASEDIR restrictions, so I was able to have the web installer move past that step. (Unfortunately I have RHEL, and no CLI and to recompile would be a nasty proposition affecting many domains.)


So, now that I was able to move on I get to step 5/17 and fill in the details asked for. When I press the next button I get:



[ASSERT EXCEPTION] DB Error: no such table

SELECT type_code, version, name, instantiable, allowed_access, parent_type, dir, customisation FROM sq_asset_type [nativecode=1146 ** Table 'cms.sq_asset_type' doesn't exist] (LINE 83 IN [SYSTEM_ROOT]/core/include/asset_manager.inc)



It is looking at the right DB (cms) so I am not sure where it pulled that from, but anywhere I set the DB name I also set the proper user/pass.



I checked the database, and the table in fact does not exist. I have never been asked for the password or DB server name. (I did change the information in the step_01 file of the CLI version of the install, but that did not work.)



I apologize if I am being dense, I am just having a heck of a time getting this to work.


(Avi Miller) #6

Hey.


Check this thread which has a known-good configure line for creating a CLI-version of PHP on RHEL. This will NOT affect your existing RPM-based PHP install.



You can then use the new CLI version to run the manual installer, by calling it directly at /usr/local/php-cli/bin/php. I use this method very successfully on several RHEL servers running Matrix.



However, the manual installer (install/step_0x.php) has nothing to do with the web-based installer. What I think has happened is that the two install methods have become confused, as an initial configuration file probably exists, which means the web-based installer thinks the database has already been configured.



You may want to try erasing your MySource Matrix source file tree and unpacking a fresh copy from the tarball. This will ensure that the Installer is not picking up old information.


(Anthonysvelander) #7

I had the same problem with my installation. For me it helped by adding /usr/share/pear to the include_path in php.ini.
Is this a dirty way or can I leave it like this?


(Avi Miller) #8

[quote]I had the same problem with my installation. For me it helped by adding /usr/share/pear to the include_path in php.ini.
Is this a dirty way or can I leave it like this?[/quote]

You can absolutely leave it like that. In fact, PHP recommends you do this during the install anyway.


(Eric) #9

Hey there. OK, now I get to step 15 and I get the following errors:


Warning: processaction(XML/Tree.php): failed to open stream: No such file or directory in /home/httpd/vhosts/cms.jivacreative.com/httpdocs/installer/steps/databasecreate.inc on line 123



Fatal error: processaction(): Failed opening required 'XML/Tree.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/cms.jivacreative.com/httpdocs/installer/steps/databasecreate.inc on line 123



I have tried to modify the path in the databasecreate.inc file to point to the MATRIX_SOURCE/php_includes/XML but get other errors.



I have this happen from a fresh install.



The SQ_CONF_PEAR_PATH is set to /home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix/php_includes which is where the XML path is located.



Is there any other information I could provide to help diagnose this issue?



Here is the rest of the paths:



_SYSTEM_ROOT

/home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix



SQ_CONF_DB_DSN

mysql://###:###@localhost/cms



SQ_CONF_DB2_DSN

mysql://###:###@localhost/cms



SQ_CONF_SYSTEM_ROOT_URLS

cms.jivacreative.com



SQ_INCLUDE_PATH

/home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix/core/include



SQ_LIB_PATH

/home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix/core/lib



SQ_DATA_PATH

/home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix/data



SQ_FUDGE_PATH

/home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix/fudge



SQ_PHP_CLI



SQ_CONF_PEAR_PATH

/home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix/php_includes



SQ_CONF_ASSET_TREE_BASE

36



SQ_CONF_ASSET_TREE_SIZE

4



SQ_CONF_SYSTEM_NAME

Jiva CMS



SQ_CONF_SYSTEM_OWNER

Eric



SQ_CONF_ROLLBACK_ENABLED

1



SQ_CONF_DEFAULT_EMAIL

eric@jivacreative.com



SQ_CONF_TECH_EMAIL

eric@jivacreative.com



SQ_CONF_DEBUG

0



SQ_CONF_LOG_FILE

/home/httpd/vhosts/cms.jivacreative.com/httpdocs/matrix/data/private/logs/error.log



(### is to hide passwords)



When I go back, reload, etc. and try the step again I get:



Notice: Use of undefined constant SQ_CONF_PEAR_PATH - assumed 'SQ_CONF_PEAR_PATH' in /home/httpd/vhosts/cms.jivacreative.com/httpdocs/installer/steps/databasecreate.inc on line 123



Warning: processaction(SQ_CONF_PEAR_PATH/XML/Tree.php): failed to open stream: No such file or directory in /home/httpd/vhosts/cms.jivacreative.com/httpdocs/installer/steps/databasecreate.inc on line 123



Fatal error: processaction(): Failed opening required 'SQ_CONF_PEAR_PATH/XML/Tree.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/cms.jivacreative.com/httpdocs/installer/steps/databasecreate.inc on line 123



(Not sure if I should even try that though…)


(Avi Miller) #10

One thing to check is that you've chown'd everything to the same user/group that Apache runs as ('apache' under RHEL, IIRC). When you unpack the tarball, make sure to

chown -R apache:apache *


This way, the apache process should have the correct permissions to read the PEAR php files.

BTW. are you trying to install on a Ensim/CPanel/Plesk server?

(Eric) #11

When I upload I did do a chmod -R 777, and yes, it is a Plesk 7.02 server, though I did add a httpd.conf entry to allow access to the PEAR path for the account, to avoid the problems with BASEDIR RESTRICTIONS.


(Avi Miller) #12

I don't know Plesk that well (I work more with Ensim Pro), but I know the Suexec on Ensim Pro won't support a CHMOD of 777 for PHP files. They need to be 755. You may want to try a mix of 755 for files and 777 for directories and see if that helps.


(Eric) #13

I have been trying repeatedly to get Matrix installed on my system. The only thought that is ocurring to me is that PLESK on RHEL is causing problems. I edited paths, fixed BASEDIRs, CHMOD files and directories. I keep getting


Warning: processaction(XML/Tree.php): failed to open stream: No such file or directory in /home/httpd/vhosts/cms.jivacreative.com/httpdocs/installer/steps/databasecreate.inc on line 123



Fatal error: processaction(): Failed opening required 'XML/Tree.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/cms.jivacreative.com/httpdocs/installer/steps/databasecreate.inc on line 123



Has anyone with Ples 7.02 and Red Hat Enterprise successfully installed the software for one or all domains? I would love to get this up and running. Does Squiz offer installation services? I am at a loss if everyone else can get it up and running and I can't. My server is a managed server with Rackspace Hosting, who keep it pretty straightforward with installation of files and such, so my install is pretty routine.



The CLI is not working for me, but I am going to explore that more in depth.



Any thoughts to keep me from going over the edge? I really appreciate all the help so far. I am sorry this is not working very well.


(Avi Miller) #14

Without having a Plesk server to play on, we can't say for certain what the core issue is. Also, Plesk may be preventing the CLI version from operating inside the virtual hosts (are they chroot'd? Ensim does this for security purposes).


We certainly do offer installation services and if you drop me a PM, I'll forward your details on to one of our Sales team who can best help you with that.


(Marcus Nyeholt) #15

As a quick thing that might be able to help, try manually editing the line in databasecreate.inc to read

    require_once '/full/path/to/matrix/php_includes/XML/Tree.php';


However, if it's having problems finding the file now, it will probably have problems finding it later while running Matrix.

(J) #16

Well, you got me. I was trying to play around with MM this weekend to get this thing installed in a Plain RH9 environment, and didn't have much luck.


I'm not on a Plesk environment, so I'm a little bit at a loss on this one.



Warning: main(XML/Tree/Node.php): failed to open stream: No such file or directory in /home/webadmin/mysource.firebright.com/html/mysource_matrix/php_includes/XML/Tree.php on line 26



Fatal error: main(): Failed opening required 'XML/Tree/Node.php' (include_path='.:/usr/share/pear') in /home/webadmin/mysource.firebright.com/html/mysource_matrix/php_includes/XML/Tree.php on line 26



Now, I've gone in and manually overridden the path, but I'm still having the same error. Well, actually not, the above is with full path. This is with the shipping code:





Warning: processaction(XML/Tree.php): failed to open stream: No such file or directory in /home/webadmin/mysource.firebright.com/html/mysource_matrix_installer/steps/databasecreate.inc on line 123



Fatal error: processaction(): Failed opening required 'XML/Tree.php' (include_path='.:/usr/share/pear') in /home/webadmin/mysource.firebright.com/html/mysource_matrix_installer/steps/databasecreate.inc on line 123



So, even though it's finding the file it's not happy about it. :wink:



I've tried this on several environments, with the docroot in / and below /, and nothing seems to make a difference, so I'm a little on the loss on this one.



One of my engineers installed this last week on a dev server (I think it was a plain Fedora box) no problems, so it's odd that I'm experiencing this with RH-9.



Sure would love some guidance.



Jonathan Dillon

FireBright, Inc.


(Avi Miller) #17

Most of these sorts of errors have been permission-related. Check to make sure that the user that Apache runs as has (at minimum) Read and Execute permissions to the php_includes directory and ALL subdirectories of that (i.e. the XML directory). Also make sure the Apache user has Read access to all the PHP files under the php_includes.


A quick fix. In the Matrix root directory (which should be /home/webadmin/mysource.firebright.com/html/mysource_matrix using the details above), run:

    $ chown -R apache:apache *
    $ chmod -R 777 php_includes


(On RH9. Apache runs as the 'apache' user by default. If that has changed, you need to use the correct username). If that works, it was a permissions problem. :)