I’m installing mysource matrix 3.8.4 onto Novell OES (Suse ent serve 9.1)
I have completed all installation steps but receive this error:
Fatal error: Call to undefined function: session_set_cookie_params() in /home/websites/mysource_matrix/core/include/mysource.inc on line 242
To get to this point I had to troubleshoot a few issues using the matrix forums which I’ll outline below. I can’t seem to find any description of the current error (above)
What I have:
PHP4 4.3.4
php4-pear
php4-ldap
php4-recode
php4-pgsql
postgresql-docs
postgressql server 7.4.8
postgressql (client)
Apache 2.0.49 (already installed on OES)
Also needed apache2-mod_php4
My PEAR list:
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
DB 1.7.6 stable
Mail 1.1.10 stable
Mail_Mime 1.3.1 stable
Net_Socket 1.0.6 stable
PEAR 1.3.3 stable
XML_HTMLSax 2.1.2 stable
XML_Parser 1.2.7 stable
XML_RPC 1.5.0 stable
main.inc settings
define(‘SQ_CONF_DB_DSN’, ‘pgsql://matrix@unix()/mysource_matrix’);
define(‘SQ_CONF_DB2_DSN’, ‘pgsql://matrix@unix()/mysource_matrix’);
define(‘SQ_CONF_DB3_DSN’, ‘pgsql://matrix_secondary@unix()/mysource_matrix’);
Set permissions as per installation doc.
Set up virtual host on apache like this:
/etc/apache2/vhosts.d/vhost.conf
<VirtualHost *:80>
DocumentRoot /home/websites/mysource_matrix/core/web
<Directory “/home/websites/mysource_matrix”>
Options Indexes FollowSymLinks
Order deny,allow
Deny from all
</Directory>
<Directory “/home/websites/mysource_matrix/core/web”>
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
<Directory “/home/websites/mysource_matrix/core/lib”>
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
<Directory “/home/websites/mysource_matrix/data/public”>
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
<Directory “/home/websites/mysource_matrix/fudge”>
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
Alias “/__data” “/home/websites/mysource_matrix/data/public”
Alias “/__lib” “/home/websites/mysource_matrix/core/lib”
Alias “/__fudge” “/home/websites/mysource_matrix/fudge”
Alias “/” “/home/websites/mysource_matrix/core/web/index.php/”
</VirtualHost>
At this point could get a reponse from the URL:
http://192.168.225.36 but was offered index.php that browser did not know how to handle. To fix that I installed apache2-mod_php4
Next error - seen in browser:
Failed opening required ‘DB.php’
So fixed that by including the path of the pear modules in my php.ini
edit /etc/php.ini
;UNIX: “/path1:/path2”
include_path = “.:/php/includes:/usr/share/php”
Now get the error:
Fatal error: Call to undefined function: session_set_cookie_params() in /home/websites/mysource_matrix/core/include/mysource.inc on line 242
The function session_set_cookie_params() is a standard PHP session function. The only reason it wouldn't be available (that I cant think of) is if your version of PHP was compiled with the --disable-session option.
It should be noted that you may have to upgrade your version of PHP for things to work properly. Version 4.3.4 of PHP is essentially untested on MySource Matrix - it may work, it may break other things (other than what Greg mentioned - the PHP version alone wouldn't be causing that error).
The 3.8/3.10 versions of MySource Matrix use PHP 4.3.10 as a minimum standard, but naturally, the latest PHP 4 version is recommended if at all possible.
[quote][…]but naturally, the latest PHP 4 version is recommended if at all possible.
[right][post=“11128”]<{POST_SNAPBACK}>[/post][/right][/quote]
In the 4.3 branch only, right?
The 4.4 branch breaks backwards compatibility in the same way as PHP5 does in regards to returning by reference or by value (I’m not quite sure exactly, it was a while back…).
[quote]In the 4.3 branch only, right?
The 4.4 branch breaks backwards compatibility in the same way as PHP5 does in regards to returning by reference or by value (I’m not quite sure exactly, it was a while back…).
[right][post=“11130”]<{POST_SNAPBACK}>[/post][/right][/quote]
Most, if not all, of the PHP 4.4 quirks were ironed out in version 3.8. The only thing I can think of is something out of our control (PEAR Mail_Mime, which hasn’t been updated for a year).
[quote]Most, if not all, of the PHP 4.4 quirks were ironed out in version 3.8. The only thing I can think of is something out of our control (PEAR Mail_Mime, which hasn’t been updated for a year).
[right][post=“11132”]<{POST_SNAPBACK}>[/post][/right][/quote]
Yeah, Mail_Mime is pretty much the only place I’ve seen a PHP4.4 warning in a long time (on v3.8 or higher).
Thanks for the quick reponse. I have now compiled php 4.4.2 after installing a few required development libraries (ldap, recode etc.)
Here's the config line I used:
./configure --with-pgsl --with-pear --with-ldap --with-recode
Install went OK but mysource_matrix still returns the same error:
Fatal error: Call to undefined function: session_set_cookie_params() in /home/websites/mysource_matrix/core/include/mysource.inc on line 242
There was no --disable-session used.
Could it be that it is still using an older version of PHP? How wuld I check?
There is a setting in a php configuration file causing this?
command line: php -v
returns: PHP 4.4.2 (cgi) (built: Jul 26 2006 19:51:19)
Do I need to rerun the mysource_matrix php setup scripts?
Thanks
Julian
[quote]It should be noted that you may have to upgrade your version of PHP for things to work properly. Version 4.3.4 of PHP is essentially untested on MySource Matrix - it may work, it may break other things (other than what Greg mentioned - the PHP version alone wouldn’t be causing that error).
The 3.8/3.10 versions of MySource Matrix use PHP 4.3.10 as a minimum standard, but naturally, the latest PHP 4 version is recommended if at all possible.
[right][post=“11128”]<{POST_SNAPBACK}>[/post][/right][/quote]
You are probably not recompiling the PHP used by Apache, as you're not specifying --with-apxs (or --with-apxs2 for Apache 2.x) on the configure line.
[quote]You are probably not recompiling the PHP used by Apache, as you’re not specifying --with-apxs (or --with-apxs2 for Apache 2.x) on the configure line.
[right][post=“11148”]<{POST_SNAPBACK}>[/post][/right][/quote]
Thanks for the info. I’m still haing issues and hope someone can help. I think I now have PHP as used by apache compiled - but now have moved back to a previous error that I can’t fix the same way I did before…
The Error is in the browser: DB error (warning image).
Last time I included the path to the PHP PEAR modules in php.ini but this time I casn’t get past this error.
ee /etc/php.ini
;UNIX: “/path1:/path2”
include_path = “./php/includes:/usr/local/lib/php:/usr/share/php”
Here’s what I’ve done
recompiled PHP and got it running with some bug seeking due to suse:
./configure --with-pgsl --with-pear --with-ldap --with-recode --with-apxs2=/usr/sbin/apxs2-prefork
cp /etc/apache2/sysconfig.d/loadmodule.conf /etc/apache2/httpd2-prefork.conf
make
make install
Now get error on pear commands:
Fatal error: main(): Failed opening required ‘Console/Getopt.php’
So…
cp -R /usr/share/php/Console /usr/local/lib/php
cp -R /usr/share/php/Archive /usr/local/lib/php
Reinstall the pear modules now:
pear install -o PEAR-1.3.3
pear install -a MAIL
pear install -a DB
pear install -a XML_HTMLSax
pear install -a XML_Parser
pear install -a Archive_Tar
pear install -a Mail_Mime
What distribution are you running? All of this stuff is usually already installed on most mainstream distros.
In case it was not clear from my last message - compiling PHP from source has put PHP and pear in different locations than where they were when installed as packages by OES(suse).
[quote]In case it was not clear from my last message - compiling PHP from source has put PHP and pear in different locations than where they were when installed as packages by OES(suse).
[right][post=“11151”]<{POST_SNAPBACK}>[/post][/right][/quote]
Yes, true. You’d need to ensure that the freshly compiled version of PHP you’re using either points to the old PEAR location, or that you install the PEAR modules into the new location.
[quote]What distribution are you running? All of this stuff is usually already installed on most mainstream distros.
[right][post=“11150”]<{POST_SNAPBACK}>[/post][/right][/quote]
Distribution=Novell OES +SP2 (based on suse ent serv 9.1)
It’s a test box. When our compnay converts to mysource_matrix we would have liked to have run it on the OES box as that’s where our current production zope sites are and they need to coexist together for a while. If it would be a more sensible approach to run a different distribution then please let me know.
The only real reason that the current system is OES is that our company is licensed for it and I use Novell Quickfinder (part of OES) to index the zope sites.
Cheers
Julian
[quote]Yes, true. You’d need to ensure that the freshly compiled version of PHP you’re using either points to the old PEAR location, or that you install the PEAR modules into the new location.
[right][post=“11152”]<{POST_SNAPBACK}>[/post][/right][/quote]
I’m sure I’ve tried both with the php.ini file. I know where the modules are (DB.php etc) but this time I still get the error.
[quote]I’m sure I’ve tried both with the php.ini file. I know where the modules are (DB.php etc) but this time I still get the error.
[right][post=“11154”]<{POST_SNAPBACK}>[/post][/right][/quote]
Are you changing the correct php.ini? Your new PHP binaries are probably looking for the php.ini file somewhere different. Take a look at phpinfo() to see what the path to php.ini is set to.
[quote]If it would be a more sensible approach to run a different distribution then please let me know.
[right][post=“11153”]<{POST_SNAPBACK}>[/post][/right][/quote]
The Squiz internally supported distributions are Debian Sarge and Redhat Enterprise Linux 4.0, which means we build our own packages for those two distributions.
Depending on your on-going support requirements, you can stick with OES (we have clients on OES and SLES9 currently) or chose to move to one of our preferred distributions.
[quote]Are you changing the correct php.ini? Your new PHP binaries are probably looking for the php.ini file somewhere different. Take a look at phpinfo() to see what the path to php.ini is set to.
[right][post=“11155”]<{POST_SNAPBACK}>[/post][/right][/quote]
Great response. You were correct. I’ve now got past that point and get the following:
http://shylock.ham.niwa.co.nz/
MySource Notice
URL “shylock.ham.niwa.co.nz” not found [SYS0218]
and
http://shylock.ham.niwa.co.nz/
Provides a login screen but entering root for username and password results in:
Login Key incorrect
I’m off to read the forums re the sys0218 error.
Yay, its working!
Make sure the SYSTEM_ROOT_URL in the main.inc file contains that FQDN (i.e. "shylock.ham.niwa.co.nz"). Otherwise, the login security system won't allow you to login.
[quote]Yay, its working!
Make sure the SYSTEM_ROOT_URL in the main.inc file contains that FQDN (i.e. “shylock.ham.niwa.co.nz”). Otherwise, the login security system won’t allow you to login.
[right][post=“11158”]<{POST_SNAPBACK}>[/post][/right][/quote]
Yay indeed!
I have now set the line and restarted apache (have rebooted too).
define(‘SQ_CONF_SYSTEM_ROOT_URLS’, ‘shylock.ham.niwa.co.nz’);
NOTE the URLS not URL as you specified. I’ve tried both.
Same error on login to _admin/
“Login Key Incorrect”
Thanks
Julian
Can you ensure that Apache can write to the /path/to/matrix/cache directory? It sounds like Apache isn't writing out the PHP session files properly.
Also, check /path/to/matrix/data/private/logs/error.log for any obvious errors that may be reported.