PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Poll
Was this helpful?
Yes
100%
 100%  [ 2 ]
No
0%
 0%  [ 0 ]
Total Votes : 2


Author Message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Tue Nov 27, 2007 1:06 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7236
Location: Arizona

PostPosted: Tue Nov 27, 2007 5:31 am Reply with quote Back to top

I especially liked #5! Wink Thank you sir!
View user's profile Send private message Visit poster's website
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Sun Dec 02, 2007 7:23 pm Reply with quote Back to top

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
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Sun Dec 02, 2007 7:49 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
999
Hangin' Around


Joined: Sep 12, 2006
Posts: 42
Location: Dsm, IA

PostPosted: Sun Dec 02, 2007 8:23 pm Reply with quote Back to top

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
Code:
memory_limit = 16M
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
View user's profile Send private message Visit poster's website MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Sun Dec 02, 2007 8:31 pm Reply with quote Back to top

php_value and php_flag directives Smile
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
tylerweb
Client


Joined: Dec 02, 2007
Posts: 4

PostPosted: Sun Dec 02, 2007 8:53 pm Reply with quote Back to top

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.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Sun Dec 02, 2007 9:01 pm Reply with quote Back to top

I just changed/corrected all of your folders/files. Let me know if that fixed it.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
tylerweb
Client


Joined: Dec 02, 2007
Posts: 4

PostPosted: Sun Dec 02, 2007 9:46 pm Reply with quote Back to top

Everything seems ok now. Thanks!
View user's profile Send private message
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Fri Dec 07, 2007 8:43 pm Reply with quote Back to top

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?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Fri Dec 07, 2007 10:20 pm Reply with quote Back to top

Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Sat Dec 08, 2007 10:31 am Reply with quote Back to top

Thanks Raven
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Sat Dec 08, 2007 1:32 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Fri Dec 21, 2007 11:47 am Reply with quote Back to top

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
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Fri Dec 21, 2007 11:59 am Reply with quote Back to top

That is an Apache Directive and belongs in .htaccess.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7236
Location: Arizona

PostPosted: Fri Dec 21, 2007 11:59 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Fri Dec 21, 2007 12:04 pm Reply with quote Back to top

Ah, the blessings of nano-seconds ROTFL
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7236
Location: Arizona

PostPosted: Fri Dec 21, 2007 12:06 pm Reply with quote Back to top

Oh my! That is too funny... Hey, just glad that a little tiny bit of you is rubbing off on me...

Dance-Y

I sure have learned a lot from you over the years!

worship
View user's profile Send private message Visit poster's website
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Fri Dec 21, 2007 12:09 pm Reply with quote Back to top

my bad hehe thanks
View user's profile Send private message
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Fri Dec 21, 2007 12:25 pm Reply with quote Back to top

now when i put that back in my .htaccess my page goes 500 is it just not needed in there any more?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Fri Dec 21, 2007 12:39 pm Reply with quote Back to top

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>
# -----------------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Fri Dec 21, 2007 2:35 pm Reply with quote Back to top

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.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Fri Dec 21, 2007 2:55 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 14928
Location: Kansas

PostPosted: Fri Dec 21, 2007 3:02 pm Reply with quote Back to top

Shocked 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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
magnum
Client


Joined: Jun 23, 2006
Posts: 83

PostPosted: Fri Dec 21, 2007 3:42 pm Reply with quote Back to top

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.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum