Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: sabu on June 21, 2002, 11:47:20 AM

Title: php stuff up
Post by: sabu on June 21, 2002, 11:47:20 AM
i am using SME 5.1.2
i upgraded my IMP using the how-to at myezserver.com
everything worked fine
i then had to manually remove some of the rpm's to install the blades update

now anything that has anything to do with php stuffs up
if i /usr/sbin/httpd it will give me errors that say stuff like, fix line blabla php_flag php_value, if i remove or # them out of the conf then reload them up it works, but then when i try to load a php page, the php won't load correctly, and whenever i save anything from server-manager, it re-writes the config, hence i have to # out the php_value and php_flag things again. i've tried going through the IMP upgrade again but still, no success...

can someone please help?

sabu
Title: Re: php stuff up
Post by: robert on June 21, 2002, 05:11:10 PM
Update1 for SME 5.1.2 (the blades update) installs php-4.0.6. I believe the latest IMP requires a later version for php. There's a howto on updating php.
Title: Re: php stuff up
Post by: sabu on June 21, 2002, 07:12:36 PM
I have tried updating PHP and IMP a number of times, and i still get these errors when trying to start up httpd:

[root@stypel home]# /usr/sbin/httpd
Syntax error on line 1884 of /etc/httpd/conf/httpd.conf:
Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration
[root@stypel home]#

(or something similar)


thanks in advance,

sabu
Title: Re: php stuff up
Post by: Dan Brown on June 21, 2002, 07:22:23 PM
It sounds like PHP hasn't been properly installed.  What does 'rpm -qa | grep php' return?
Title: Re: php stuff up
Post by: sabu on June 21, 2002, 08:03:05 PM
Dan Brown wrote:
>
> It sounds like PHP hasn't been properly installed.  What does
> 'rpm -qa | grep php' return?

bash-2.04$ rpm -qa | grep php
php-4.1.2-2es
php-ldap-4.1.2-2es
php-imap-4.1.2-2es
php-mysql-4.1.2-2es
bash-2.04$


=/

sabu
Title: Re: php stuff up
Post by: Dan Brown on June 21, 2002, 08:10:58 PM
Hmmm.  Try /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf followed by service httpd-e-smith restart.
Title: Re: php stuff up
Post by: sabu on June 22, 2002, 04:43:28 AM
[root@stypel sabu]# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
[root@stypel sabu]# service httpd-e-smith restart
bash: service: command not found
[root@stypel sabu]# whereis service
service: /sbin/service
[root@stypel sabu]# /sbin/service httpd-e-smith restart
Shutting down http:                                        [ FAILED ]
Starting httpd: Syntax error on line 1884 of /etc/httpd/conf/httpd.conf:
Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration
                                                           [ FAILED ]
[root@stypel sabu]#


sabu
Title: Re: php stuff up
Post by: Dan Brown on June 22, 2002, 04:53:37 AM
OK, what about 'grep php4_module /etc/httpd/conf/httpd.conf'?    Does the file /usr/lib/apache/libphp4.so exist?
Title: Re: php stuff up
Post by: sabu on June 22, 2002, 05:10:25 AM
[root@stypel sabu]# grep php4_module /etc/httpd/conf/httpd.conf
[root@stypel sabu]#

nope


sabu
Title: Re: php stuff up
Post by: sabu on June 22, 2002, 05:17:36 AM
Oh, I forgot:

[root@stypel /]# ls /usr/lib/apache/libphp4.so
/usr/lib/apache/libphp4.so


And also,

[root@stypel /]# grep php /etc/httpd/conf/httpd.conf
#LoadModule php_module         modules/mod_php.so
#LoadModule php3_module        modules/libphp3.so
#AddModule mod_php.c
#AddModule mod_php3.c
#AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php3-source .phps
#AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php .php .php3
    php_value include_path      '.:/usr/share/pear'
#   php_value auto_prepend_file /home/httpd/horde-phplib/prepend.php3
    php_flag  magic_quotes_gpc  off
    php_flag  track_vars        on
    AddType application/x-httpd-php .php .php3
    php_flag  magic_quotes_gpc  on
    php_flag  track_vars        on
 
    AddType application/x-httpd-php .php .php3 .phtml
   
[root@stypel /]#

why is nearly everything to do with php hashed out?
Title: Re: php stuff up
Post by: Dan Brown on June 22, 2002, 05:18:30 AM
OK, try /sbin/e-smith/config show php
Title: Re: php stuff up
Post by: sabu on June 22, 2002, 05:26:52 AM
[root@stypel sabu]# /sbin/e-smith/config show php
php=service
    status=enabled
[root@stypel sabu]#
Title: Re: php stuff up
Post by: Dan Brown on June 22, 2002, 05:45:10 AM
OK, well, we're making progress.  Do you have the file

/etc/e-smith/templates/etc/httpd/conf/httpd.conf/20LoadModule80PHP ?  If so, what's in it?

The reason a lot of the stuff is commented out is that it deals with older versions of PHP.
Title: Re: php stuff up
Post by: sabu on June 22, 2002, 06:12:25 AM
I don't have that exact file, but...

[root@stypel httpd.conf]# cat 20LoadModule80

# Extra Modules
#LoadModule php_module         modules/mod_php.so
#LoadModule php3_module        modules/libphp3.so
#LoadModule perl_module        modules/libperl.so
LoadModule external_auth_module modules/mod_auth_external.so

[root@stypel httpd.conf]#
Title: Re: php stuff up
Post by: Dan Brown on June 22, 2002, 08:39:39 AM
OK, I guess the next step is rpm -q e-smith-php.  20LoadModule80PHP belongs to that RPM.
Title: Re: php stuff up
Post by: sabu on June 22, 2002, 09:56:58 AM
[root@stypel sabu]# rpm -q e-smith-php
package e-smith-php is not installed
Title: Re: php stuff up
Post by: Dan Brown on June 22, 2002, 04:21:33 PM
OK, well, that's your problem.  Install e-smith-php from your 5.1.2 CD.  Wonder how that got removed?
Title: Re: php stuff up
Post by: sabu on June 22, 2002, 07:11:26 PM
As I stated at the start, after upgrading IMP and then trying to to a blades update, i had to remove somethings to get the blades update working :/

Preparing...                ########################################### [100%]
   1:e-smith-php            ########################################### [100%]
[root@stypel home]# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
[root@stypel home]# whereis service
service: /sbin/service
[root@stypel home]# /sbin/service httpd-e-smith restart
Shutting down http:                                        [   OK   ]
Starting httpd:                                            [   OK   ]
[root@stypel home]#


Thanks so much for your personal time and help,

sabu
Title: Re: php stuff up
Post by: Dan Brown on June 22, 2002, 07:21:22 PM
Glad to hear it's working now.