MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: WISTFUL on 2013-02-17, 20:41:13

Title: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-17, 20:41:13
Quote
I have CentOS 6.3 (64 bit) on KVM VPS
I'm using kloxo-mr 6.5.0.c.2013021701 by nginx-proxy + bind

I've configured my webserver as follows:
Php Branch : php54_(as_5.4.11)
Php Type : php-fpm_event
Enable Php 5.2 (use Lxphp) As Secondary Php
Apache Memory Optimize : default
Mysql Convert : to-myisam
I've tryed:
Code: [Select]
sh /script/fix-chownchmodand
Servers > Webserver Config > Fix 'ownership' And 'permissions'

In kloxo official I already tried this instruction by mustafaramadhan: http://forum.lxcenter.org/index.php?t=msg&th=18036 (http://forum.lxcenter.org/index.php?t=msg&th=18036) but don't try it on kloxo-mr yet!

I imagined that this problem is solved in the kloxo-mr  :|
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-17, 21:17:58
For suphp, this issue related to ownership and or permissions. For others, it's related to php itself.

Try switch to php (that mean php 5.3 on Centos 6) and try 'sh /script/fixweb; service php-fpm; service httpd restart; service nginx restart'.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-17, 21:38:42
Thanks,

I try it by selecting "php_(as_5.3.21)" as Php Branch from Webserver Config.
Then try ssh without any error

Now when I try to view php files, browser download it instead show it!

In Advanced PHP Config I used follow settings:
Enable Dl = 0
Allow Url Fopen = 0
Allow Url Include = 0
Magic Quotes Gpc = 1
Disable Functions : symlink,shell_exec,exec,proc_close,proc_open,popen,pclose,system,dl,passthru,escapeshellarg,escapeshellcmd,readfile,show_source
Magic Quotes Sybase = 0
Safe Mode = 1
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-17, 21:50:56
Don't use safe-mode because useless and will be remove for php next release.

Also disable magic_quote.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-17, 22:05:17
I disabled them but browser still download php files instead show them!
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-17, 22:11:08
What's php-type?
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-17, 22:19:36
As I said on first post, Php Type : php-fpm_event
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-17, 22:24:01
Result for running 'php-fpm -v'?
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-17, 22:34:32
After try running 'yum update', this message display on php files by "The page is temporarily unavailable" title:
Quote
The page you are looking for is temporarily unavailable.
Please try again later.  
Quote from: "MRatWork"
Result for running 'php-fpm -v'?
# php-fpm -v (after switch again to php54 from 5.3 by this instruction (http://forum.mratwork.com/viewtopic.php?f=5&t=1298&p=2981#p2984))
Code: [Select]
PHP 5.4.11 (fpm-fcgi) (built: Jan 17 2013 13:25:47)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-17, 22:43:58
So. still appear '500 error'?
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-17, 22:53:21
Quote from: "MRatWork"
So. still appear '500 error'?
No, a page with follow content:
Code: [Select]
<html>
<head>
<title>The page is temporarily unavailable</title>
<style>
body { font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body bgcolor="white" text="black">
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
The page you are looking for is temporarily unavailable.<br/>
Please try again later.
</td>
</tr>
</table>
</body>
</html>
Also now httpd stopped:
[attachment=0:3rwb9utt]Untitled-2.png[/attachment:3rwb9utt]
# service httpd restart
Code: [Select]
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-17, 23:28:15
Try 'service httpd status'.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-17, 23:40:12
# service httpd status
Code: [Select]
httpd.event is stopped
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 00:00:24
It's something with httpd config. Try switch to other webserver (when using httpd/nginx/nginx-proxy, try lighttpd) and switch back to previous.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 00:13:25
After that, httpd changes to started but pages of site still were "temporarily unavailable"
So I try to 'service httpd restart' but httpd stopped again!

# service httpd restart
Code: [Select]
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 19:44:44
Inform here 'dir /etc/httpd/conf.d'
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 19:48:21
# dir /etc/httpd/conf.d
Code: [Select]
fastcgi.conf         php.conf.rpmsave  ruid2.conf         webalizer.conf
fastcgi.conf.rpmnew  proxy_ajp.conf    ssl.conf           welcome.conf
fcgid.conf           proxy_fcgi.conf   suphp52.conf
~lxcenter.conf       README            suphp.conf
php.conf             rpaf.conf         suphp.conf.rpmnew
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 19:55:00
Delete suphp.conf and suphp.conf.rpmnew and then restart httpd.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 20:00:31
# service httpd restart
Code: [Select]
Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 20:09:46
Still the same issue?
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 20:12:14
Quote from: "MRatWork"
Still the same issue?
Yes, unfortunately...
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 20:19:51
what content of fcgid.conf, php.conf and fcgid.conf inside /etc/httpd/conf.d

Also last 10 lines of /var/log/httpd/error_log
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 20:27:44
fcgid.conf
Code: [Select]
#This module not uninstalled but inactive.
#See /home/apache/etc/conf.d to find out 'original' this file
php.conf
Code: [Select]
#This module not uninstalled but inactive.
#See /home/apache/etc/conf.d to find out 'original' this file
fastcgi.conf
Code: [Select]
### MR -- read /usr/local/lxlabs/kloxo/file/apache/conf.d/fastcgi.conf.original for full description ###

User apache
Group apache

LoadModule fastcgi_module modules/mod_fastcgi.so

# MR -- becuase something wrong with fastcgi on 'default' for php53+ so running it without fastcgi!
#LoadModule suphp_module modules/mod_suphp.so

#suPHP_Engine On
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 20:32:57
Look like all httpd modules config was right.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 20:41:10
I'm using kloxo-mr 6.5.0.c.2013021701 by nginx-proxy + bind

I've configured my webserver as follows:
Php Branch : php54_(as_5.4.11)
Php Type : php-fpm_event
Enable Php 5.2 (use Lxphp) As Secondary Php
Apache Memory Optimize : default
Mysql Convert : to-myisam

Those are all things that I have done since the beginning of the installation kloxo-mr.

After '#yum update' httpd stopped ...

If you need more information, please ask.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 20:43:07
Quote from: "WISTFUL"
I'm using kloxo-mr 6.5.0.c.2013021701 by nginx-proxy + bind

I've configured my webserver as follows:
Php Branch : php54_(as_5.4.11)
Php Type : php-fpm_event
Enable Php 5.2 (use Lxphp) As Secondary Php
Apache Memory Optimize : default
Mysql Convert : to-myisam

Those are all things that I have done since the beginning of the installation kloxo-mr.

After '#yum update' httpd stopped ...

If you need more information, please ask.
Also last 10 lines of /var/log/httpd/error_log
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 20:52:47
Code: [Select]
[Mon Feb 18 16:40:30 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Feb 18 16:40:30 2013] [notice] SSL FIPS mode disabled
[Mon Feb 18 16:40:30 2013] [warn] RSA server certificate wildcard CommonName (CN) `*.lxlabs.com' does NOT match server name!?
[Mon Feb 18 16:40:30 2013] [warn] RSA server certificate wildcard CommonName (CN) `*.lxlabs.com' does NOT match server name!?
[Mon Feb 18 16:40:30 2013] [warn] RSA server certificate wildcard CommonName (CN) `*.lxlabs.com' does NOT match server name!?
[Mon Feb 18 16:40:30 2013] [warn] RSA server certificate wildcard CommonName (CN) `*.lxlabs.com' does NOT match server name!?
[Mon Feb 18 16:40:30 2013] [warn] RSA server certificate wildcard CommonName (CN) `*.lxlabs.com' does NOT match server name!?
[Mon Feb 18 16:40:30 2013] [warn] RSA server certificate wildcard CommonName (CN) `*.lxlabs.com' does NOT match server name!?
[Mon Feb 18 16:40:30 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Feb 18 16:40:30 2013] [notice] Digest: done
/usr/sbin/httpd: symbol lookup error: /usr/lib64/libaprutil-1.so.0: undefined symbol: apr_os_uuid_get
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 21:03:00
Look like something wrong with '/usr/sbin/httpd: symbol lookup error: /usr/lib64/libaprutil-1.so.0: undefined symbol: apr_os_uuid_get'
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 21:06:45
If you permit, send pm for your kloxo and root access to me.

I didn't found like this issue before.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: MRatWork on 2013-02-18, 22:12:15
Already fix now. The problem is latest version of apr. Downgrade with 'yum downgrade apr*' make httpd running well.

I will remove new apr from kloxo-mr repo. It's possible new apr only for incoming httpd 2.4 (not ready for Kloxo-MR) and current httpd is 2.2.23.
Title: Re: 500 Internal Server Error appeared on view php files
Post by: WISTFUL on 2013-02-18, 22:15:52
Very Thanks mostafa...