Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™
Author Message
Tethra
Hangin' Around


Joined: Jun 25, 2005
Posts: 30

PostPosted: Fri Jun 24, 2005 11:09 pm Reply with quote

I have spent the last several hours on the forums trying to find the answer to my question and havent been able to. After trying everything that I saw I still can't seem to get a field to appear to input a path for htaccess and staccess. I am running Apache version 1.3.33 (Unix), PHPNuke 7.6 patched 2.9. I am only posting because my eyes have started to burn from reading all the posts from other people.

Any help or ideas will be appreciated.

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


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Fri Jun 24, 2005 11:50 pm Reply with quote

Load this script to your web folder, run it and post back the result
Code:
<?php

echo "\$_SERVER['SERVER_SOFTWARE'] = ".$_SERVER['SERVER_SOFTWARE'];
exit();
?>
 
View user's profile Send private message
Tethra
PostPosted: Sat Jun 25, 2005 10:34 am Reply with quote

This is what is displayed when i run that code $_SERVER['SERVER_SOFTWARE'] =

Maybe there is a mistake in the code?
 
Raven
PostPosted: Sat Jun 25, 2005 10:52 am Reply with quote

Nope. You should see something like this
$_SERVER['SERVER_SOFTWARE'] = Apache/1.3.31 (Win32) PHP/4.3.10

It appears your host may be masking your server software identity which means that NukeSentinel is unable to determine if you are running Apache or not.

Try this code to see if we can determine it is or isn't Apache
Code:
<?php

echo "<br />\$_SERVER['SERVER_SOFTWARE'] = ".$_SERVER['SERVER_SOFTWARE'];
echo "<br />\$_SERVER['SERVER_SIGNATURE'] = ".strip_tags($_SERVER['SERVER_SIGNATURE']);
echo "<br />PHP SapiName = ".php_sapi_name();
exit();
?>
 
Tethra
PostPosted: Sat Jun 25, 2005 10:54 am Reply with quote

I got the same output. I know I am running apache but if they are masking my server software is there anything else i can do?
 
Raven
PostPosted: Sat Jun 25, 2005 10:59 am Reply with quote

Yes. In admin/modules/nukesentinel/ABMain.php, find this line of code, around line 108
Code:
if(stristr($_SERVER['SERVER_SOFTWARE'], "Apache")) {
and change to
Code:
//if(stristr($_SERVER['SERVER_SOFTWARE'], "Apache")) {

if(1) {
 
Tethra
PostPosted: Sat Jun 25, 2005 11:13 am Reply with quote

Ok so that gave me access to the .staccess file path but not the .htaccess. Also after entering the path for .staccess i get a message under the field "File does not exist or is not correctly CHMODed."
 
Raven
PostPosted: Sat Jun 25, 2005 11:18 am Reply with quote

You changed the wrong line. You changed line 122 Smile. Leave it but also change line 108.
 
Tethra
PostPosted: Sat Jun 25, 2005 11:18 am Reply with quote

Ok so I double checked abmain.php and I think i may have originally missed something and i put that code in another spot. Now i get a internal server error.
 
Raven
PostPosted: Sat Jun 25, 2005 11:21 am Reply with quote

Changes to this file will not cause a 500 internal server error.
 
Tethra
PostPosted: Sat Jun 25, 2005 11:22 am Reply with quote

There is serveral lines of commented out code around where you are telling me to make the changes and one of the lines is the same as I should be changing. Should I uncomment this code?
 
Tethra
PostPosted: Sat Jun 25, 2005 11:26 am Reply with quote

Ok, I think if works now, once i put the file path like this /home2/**admin/public_html/ it didnt give me the server error. Do i need to include .htaccess at the end of the file path?

PS sorry if i seem like a complete idiot but I am not much of a programmer. THanks for all your help!
 
Tethra
PostPosted: Sat Jun 25, 2005 11:30 am Reply with quote

Nope I was wrong. When i enter .htaccess to the end of the file path i get the server error, any idea what is causing this?
 
Raven
PostPosted: Sat Jun 25, 2005 12:24 pm Reply with quote

In .htaccess entry box, only put the one word: .htaccess
 
Tethra
PostPosted: Sat Jun 25, 2005 4:35 pm Reply with quote

This is what I am getting when I put either /home2/**admin/public_html/.htaccess or just .htaccess in the field

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, Only registered users can see links on this board! Get registered or login! and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.33 Server at Only registered users can see links on this board! Get registered or login! Port 80
[/b]
 
Raven
PostPosted: Sat Jun 25, 2005 5:22 pm Reply with quote

Do you have a file called .htaccess in your nuke root directory with permissions of 777?
 
Tethra
PostPosted: Sat Jun 25, 2005 5:28 pm Reply with quote

Yea i set both htaccess and staccess at 777. Also I didnt tell you before but I just realized that the only option i have is to do CGIauth. HTTPAuth is unavailable.
 
Raven
PostPosted: Sat Jun 25, 2005 5:34 pm Reply with quote

What is in your .htaccess file?
 
Tethra
PostPosted: Sat Jun 25, 2005 5:37 pm Reply with quote

Options all
DirectoryIndex index.php index.htm index.html

# -------------------------------------------
# Start of NukeSentinel(tm) admin.php Auth
# -------------------------------------------
<Files .staccess>
deny from all
</Files>

<Files admin.php>
<Limit GET POST PUT>
require valid-user
</Limit>
AuthName "Restricted"
AuthType Basic
AuthUserFile /home2/okadmin/public_html/.staccess
</Files>

# -------------------------------------------
# Start of NukeSentinel(tm) DENY FROM area
# -------------------------------------------
 
Raven
PostPosted: Sat Jun 25, 2005 5:42 pm Reply with quote

My guess is that your hyost does not allow you to use all of the commands that are in there. Start by commenting out the Options all

#Options all

If that still err's then comment out the next line.
 
Tethra
PostPosted: Sat Jun 25, 2005 5:50 pm Reply with quote

No luck, would the best thing to do now be to contact my host? I really appreciate all that you are doing and I will def be making a donation to you even if we cant get it to work.
 
Raven
PostPosted: Sat Jun 25, 2005 5:56 pm Reply with quote

It's very possible that they don't allow you to use .htaccess. Try deleting everything from the file.
 
Tethra
PostPosted: Sat Jun 25, 2005 7:48 pm Reply with quote

I still get the error when I delete everything from the file so I will contact my host and see what they say. Thanks for all your help raven
 
VinDSL
Life Cycles Becoming CPU Cycles


Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Sun Jun 26, 2005 1:03 am Reply with quote

Raven wrote:
Do you have a file called .htaccess in your nuke root directory with permissions of 777?

Hrm... is this for testing purposes? I set mine to octal 644 as an added measure of security.

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: 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 ICQ Number
VinDSL
PostPosted: Sun Jun 26, 2005 1:09 am Reply with quote

Raven wrote:
My guess is that your host does not allow you to use all of the commands that are in there...
Raven wrote:
It's very possible that they don't allow you to use .htaccess...

Believe it or not, there are quite a few hosts that don't allow .htaccess on shared servers... ROTFL
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™

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 ©