Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> FAQ - PHP5 w/phpSuExec Conversion From PHP4
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: 17088

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

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
montego
Site Admin



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

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

I especially liked #5! Wink 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! 
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

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







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

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.
 
999
Regular
Regular



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

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

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







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

php_value and php_flag directives Smile
 
tylerweb
Client



Joined: Dec 02, 2007
Posts: 4

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

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







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

I just changed/corrected all of your folders/files. Let me know if that fixed it.
 
tylerweb







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

Everything seems ok now. Thanks!
 
magnum







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

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?
 
Raven







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

http://www.ravenphpscripts.com/faq-2-.html#17
 
magnum







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

Thanks Raven
 
Raven







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

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.
 
magnum







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

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
 
Raven







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

That is an Apache Directive and belongs in .htaccess.
 
montego







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

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
 
Raven







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

Ah, the blessings of nano-seconds ROTFL
 
montego







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

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
 
magnum







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

my bad hehe thanks
 
magnum







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

now when i put that back in my .htaccess my page goes 500 is it just not needed in there any more?
 
Raven







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

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>
# -----------------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------
 
magnum







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

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.
 
Raven







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

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.
 
Raven







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

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
 
magnum







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

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.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> FAQ - PHP5 w/phpSuExec Conversion From PHP4

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©