Author |
Message |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Nov 27, 2007 1:06 am |
|
QUICK TROUBLESHOOTER
1. Check that the php script that you are attempting to execute has permissions of no more than 755 - 644 will work just fine normally, this is not something that will need to be changed in most cases.
2. Check that the directory permissions that the script resides within is set to a maximum of 755/644. This also includes directories that the script would need to have access to also.
3. Check that the files are owned by you. ie. not owned by user nobody.
4. Check that you do not have a .htaccess file with php_values within it. They will cause a 500 Internal server error, when attempting to execute the script.
The php_values will need to be removed from your .htaccess file and a php.ini put in its place, containing the php directives as explained above.
5. If you're getting errors about open_basedir restrictions or include paths not being allowed, then put the following into a php.ini file (put into the directory that contains the files being accessed through the user's browser):
open_basedir = "/home/accountusername"
Replace accountusername with your cpanel account's username. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Nov 27, 2007 5:31 am |
|
I especially liked #5! Thank you sir! |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
Client
![](modules/Forums/images/avatars/Animaniacs/Animaniacs_-_Pinky.gif)
Joined: Jun 23, 2006
Posts: 83
|
Posted:
Sun Dec 02, 2007 7:23 pm |
|
so are you saying just remove everything in the .htaccess file? to make my server work again cause after i removed everything in it the page came back. and do i have to put the php.ini in ? with what code if any.
thanks Scott |
_________________ Nukes real friend is a big cup of Java with a valium stirred in. www.islandtitanz.org |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 02, 2007 7:49 pm |
|
Yes you need to add those commands to a php.ini file for every folder that needs them. The syntax is different than .htaccess but that is explained in the emails and in the other forum topics. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
999
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Sep 12, 2006
Posts: 58
Location: Dsm, IA
|
Posted:
Sun Dec 02, 2007 8:23 pm |
|
Just to be clear you remove everything in terms of the php_values, nothing else, and put them in your php.ini. For example, taking Code:php_value memory_limit 16M
| out of your .htaccess and putting in your php.ini .
May seem obvious and Magnum may have just meant that, but I actually saw someone remove everything, sentinel stuff, shortlinks, etc, from their .htaccess. ![Laughing](modules/Forums/images/smiles/icon_lol.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 02, 2007 8:31 pm |
|
php_value and php_flag directives ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tylerweb
Client
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Dec 02, 2007
Posts: 4
|
Posted:
Sun Dec 02, 2007 8:53 pm |
|
Is there a quick way to check/change file owneship? I have several files that give "SERVOR ERROR" until I delete them and re-upload them. I have checked permissions and everything I can think of. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 02, 2007 9:01 pm |
|
I just changed/corrected all of your folders/files. Let me know if that fixed it. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
tylerweb
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 02, 2007 9:46 pm |
|
Everything seems ok now. Thanks! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 07, 2007 8:43 pm |
|
thanks raven but now i have one user getting this error and cant get on the page .
/home/******/public_html/includes/RWH_wiw.inc.php:80)
in
/home/******/public_html/modules/Your_Account/index.php
on line 855
Warning: Cannot modify header information - headers
already sent by (output started at
/home/******/public_html/includes/RWH_wiw.inc.php:80)
in
/home/******/public_html/modules/Your_Account/index.php
on line 906
um im not sure what needs to be changed here? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 07, 2007 10:20 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Dec 08, 2007 10:31 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Dec 08, 2007 1:32 pm |
|
NP. That gets rid of the error message. But, you may or may not have a problem that affects your code. The main reason that output_buffering (OB) was implemented was so that you could manipulate the contents of the rendered html before sending it to the client. It allows you to send the headers whenever you want in the code and the OB process reorganizes the output before sending it to the Client.
Now the potential downside is that if you have started sending any output (non-headers) to the client (browser) in a part of the code where you aren't/weren't aware, then any headers that your code further on down the line attempts to send that may be needed is disregarded.
Bottom line is that you should try to correct the code rather than just hide it. I have found that most often it's not really a logic error as it is a procedural error. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 11:47 am |
|
I keep getting error line 9 in my php.ini
PHP: Error parsing /home/islandti/public_html/php.ini on line 9
ive look for the answer but i dont seem to see it line 9 in my php.ini is
AuthName "Restricted"
what am i missing here ![Sad](modules/Forums/images/smiles/icon_sad.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 11:59 am |
|
That is an Apache Directive and belongs in .htaccess. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 11:59 am |
|
magnum, I believe that directive is for Apache and not PHP. Try moving that one back to .htaccess. If that does not work, you may need to look up just why it is you need that directive or ask Raven (he might not allow you to override that). ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 12:04 pm |
|
Ah, the blessings of nano-seconds ![ROTFL](modules/Forums/images/smiles/rotfl.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 12:06 pm |
|
Oh my! That is too funny... Hey, just glad that a little tiny bit of you is rubbing off on me...
I sure have learned a lot from you over the years!
![worship](modules/Forums/images/smiles/icon_worship.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 12:09 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 12:25 pm |
|
now when i put that back in my .htaccess my page goes 500 is it just not needed in there any more? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 12:39 pm |
|
Keep in mind that a 500 server error means that there is an error in your .htaccess file of some kind.
That directive is no good on its own. It is a part of the Authentication code as in
Code:# -----------------------------------------------------------------------------------------------------
# Leave this block commented out unless HTTPAuth is NOT available in your NukeSentinel(tm) Admin Panel.
# This code is mainly for use with CGI Authentication and most servers do not require it.
# -----------------------------------------------------------------------------------------------------
# <Files admin.php>
# <Limit GET POST PUT>
# require valid-user
# </Limit>
# AuthName "Restricted"
# AuthType Basic
# AuthUserFile /path/to/your/.staccess
# </Files>
# -----------------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 2:35 pm |
|
yes all that is in there but when i leave it in the .htaccess i get the 500 when i remove it all its ok this is my .htaccess
Options All -Indexes
DirectoryIndex index.php index.htm index.html
# -------------------------------------------
# Start of NukeSentinel(tm) admin.php Auth
# -------------------------------------------
<Files .ftaccess>
deny from all
</Files>
<Files .staccess>
deny from all
</Files>
# -----------------------------------------------------------------------------------------------------
# Leave this block commented out unless HTTPAuth is NOT available in your NukeSentinel(tm) Admin Panel.
# This code is mainly for use with CGI Authentication and most servers do not require it.
# -----------------------------------------------------------------------------------------------------
# <Files admin.php>
# <Limit GET POST PUT>
# require valid-user
# </Limit>
# AuthName "Restricted"
# AuthType Basic
# AuthUserFile /path/to/your/.staccess
# </Files>
# -----------------------------
is it ok to just leave this out. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 2:55 pm |
|
There is nothing wrong with your .htaccess. Something else is happening. Let me take a look at your account and I'll get back to you. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 3:02 pm |
|
Okay, your php.ini is all wrong. The only statements that should be in your php.ini are the first 4 lines. All the other lines should be in your .htaccess except PHP_FLAG output_buffering On which you should delete.
Only PHP directives go in php.ini and Only Apache directives go in .htaccess. BTW, it doesn't look like you are using NukeSentinel(tm) CGI Authorization to protect your admin.php files. That's not good. You really should be using it ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
magnum
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 21, 2007 3:42 pm |
|
now i cant get on the page at all im getting Internal Server Error even if i put it back the .htaccess and php.ini the way they were. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|