Error 500 after ./build all

WebArts

Verified User
Joined
Jul 14, 2010
Messages
108
Hi
I was using PHP CLI mode. i used "./build all" and in options.conf i changed cli=no and cgi=1 but afterward my website showed me error 500. i Know:
9. Why do I get "500 Internal server error"?
Check your suPHP log for any errors
but suphp log file was empty.

I rebuilded php to CLI mode and internal 500 error not again occurred.

but what was wrong? how i can rebuild php to CGI mode?

Thanks
 
Hello,

You should read then apache error log for particular domain.
Most popular cases:

- wrong permissions on PHP script.
- wrong permissions on a parent directory with a PHP script.

Code:
cd /usr/local/directadmin/scripts && ./set_permissions.sh user_homes
 find /home/*/domains/*/public_html -type d -print0 | xargs -0 chmod 711
 find /home/*/domains/*/public_html -type f -print0 | xargs -0 chmod 644
 find /home/*/domains/*/public_html -type f -name '*.cgi*' -exec chmod 755 {} \;
 find /home/*/domains/*/public_html -type f -name '*.pl*' -exec chmod 755 {} \;
 find /home/*/domains/*/public_html -type f -name '*.pm*' -exec chmod 755 {} \;
 cd /usr/local/directadmin/data/users && for i in `ls`; do { chown -R $i:$i /home/$i/domains/*/public_html;}; done;

Please, search the forums or use Google before you post a new question.
 
Hello,

You should read then apache error log for particular domain.
Most popular cases:

- wrong permissions on PHP script.
- wrong permissions on a parent directory with a PHP script.

Code:
cd /usr/local/directadmin/scripts && ./set_permissions.sh user_homes
 find /home/*/domains/*/public_html -type d -print0 | xargs -0 chmod 711
 find /home/*/domains/*/public_html -type f -print0 | xargs -0 chmod 644
 find /home/*/domains/*/public_html -type f -name '*.cgi*' -exec chmod 755 {} \;
 find /home/*/domains/*/public_html -type f -name '*.pl*' -exec chmod 755 {} \;
 find /home/*/domains/*/public_html -type f -name '*.pm*' -exec chmod 755 {} \;
 cd /usr/local/directadmin/data/users && for i in `ls`; do { chown -R $i:$i /home/$i/domains/*/public_html;}; done;

Please, search the forums or use Google before you post a new question.

Thanks a lot.
is it meaning in public_html my folders must not have 755 chmode if i use CGI PHP?
 
is it meaning in public_html my folders must not have 755 chmode if i use CGI PHP?

No, it is not. They should have not more than 755; and 711 will be enough. Otherwise you'll get error 500.
 
No, it is not. They should have not more than 755; and 711 will be enough. Otherwise you'll get error 500.

But i use some script that for upload file need to use 777 permission for some folders and some files.
Can i configure CGI PHP for any permission folders?
 
But i use some script that for upload file need to use 777 permission for some folders and some files.

This is true only in case you use mod_php, and all PHP scripts run under apache username.

Can i configure CGI PHP for any permission folders?

Why do you need suPHP then? Doing so, it's insecure and makes using of suPHP mostly meaningless. By default you'll see error 500.
 
Back
Top