Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke
Author Message
RickJ
Hangin' Around



Joined: Jul 14, 2006
Posts: 27

PostPosted: Wed Aug 16, 2006 7:15 am Reply with quote

Hey Everyone,

My site was recenlty hacked and I've managed to fix up the site and I now want to get the site more secure.

After lots of reasearch I've decided to downgrade my site to phpnuke 7.8 and install nuke sentinal.

I donwloaded the patch from http://www.nukescripts.net/modules.php?name=Downloads&op=getit&lid=100270

I then uploaded all the files from phpnuke 7.6 to site overwriting all existing files.

I then ran the downgrade mysql script but when I try to access me site I get a "You can't access this file directly..." error message.

When I go the admin section of the site it loads up a few icons but then gives me a access denied error message.

I can acess most of the modules except for the calendar module which is event calendar.

Any ideas what I've done wrong?
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Wed Aug 16, 2006 9:09 am Reply with quote

The problem might be with the fact your did a simple 'overwrite all files' with the ones from the RN distro.
You mention a clendar module - this is not included with core RavenNuke so you will have to dig out your back up and look to see what files needed to be edited for the calendar integration and put those back in.

In short, you probably had to edit some core files (probably mainfile) for the forum integration and the calendar script can no longer find what it is looking for and this is causing the site to 'hang'.
If you have added any other mods, you would need to look at those as well.
 
View user's profile Send private message Send e-mail
RickJ







PostPosted: Wed Aug 16, 2006 1:55 pm Reply with quote

I edited the database and removed the calendar module and also deleted it out of the modules section just in case. I can now access the admin panel with no strange error messages.

I was using Calendar v 3.0 and I did add some code to the main.php file which I removed but the main page is still giving me a You can't access this file directly... error message.

The weird thing is that I can go to the downloads section, http://crak.afrihost.com/modules.php?name=Downloads but I cannot go to the main page http://crak.afrihost.com/

The only thing which displays in the index page that doesn't display anywhere else is the news section.

Anyone have any ideas?
 
RickJ







PostPosted: Wed Aug 16, 2006 3:16 pm Reply with quote

I checked the site again looking for any problems and I found that I was using the config.php from phpnuke 7.8.

I tried using the config file for phpnuke 7.6 with db details I got the following error:

There seems to be a problem with the MySQL server, sorry for the inconvenience.

We should be back shortly.

I'm pretty lost at this point in time.. . please help . .. anyone?
 
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Wed Aug 16, 2006 5:54 pm Reply with quote

As Guardian has limited time, Please put this in a txt file.
<?php
// Coded by DARKLORD From SCRATCH. There are other scripts that do this,
// but I did NOT use them as a template of any kind!!!
// No need to edit this, Just upload to the nuke root directory.
// Delete this file when finished!!!!!!!!!!!!!!!!!!!!!!!<--MUST



include_once ("config.php");
$dbi = mysql_connect($dbhost, $dbuname, $dbpass, $dbname);
$db = mysql_select_db ("$dbname");
if ($dbi AND $db){
Echo "Success, A connection could be established to your database";

}else{
$link= @mysql_connect($dbhost, $dbuname, $dbpass);
if ($link){
echo " Establish a connection to the server but not to the database, The database $dbname either is not the correct database name or not there at all, please edit it. Remember when using CPANEL it will most likely be username(cpanel)_database";
}else{
$link= @mysql_connect('localhost', $dbuname, $dbpass);
IF ($link){
echo "Your host is localhost, please change it to that and re-run this script if problems continue";
}else {
if ($dbhost!=localhost){
echo "Either your username or pass is wrong or your host isnt localhost or $dbhost, Please check with your host for further assistance.<BR> Also check to verify that this is a mysql database and not any other form!!";
}else{
echo "Check your username and password to the mysql Database. Either your username or pass is wrong or your host is not localhost, Please check with your host for further assistance.<BR> Also check to verify that this is a mysql database and not any other form!!";
}
}
}
}


?>

Save it as sql.php, then upload it to your site (then goto it like [ Only registered users can see links on this board! Get registered or login! ] This should help get to the root of the problem.
Whatever output it tells you, please post back and let me know. We can gain a lot of information using that. Thanx.

Afterwards DELETE it!!!!

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
RickJ







PostPosted: Wed Aug 16, 2006 9:54 pm Reply with quote

The script showed that a connection to the database could not be established. I started from scratch and cut-n-past all the old details to the new config file and it is now working.

Thanks for the help Darklord.
 
gregexp







PostPosted: Wed Aug 16, 2006 10:35 pm Reply with quote

ok this script will say one of 4 things:

Connection could be estabilshed to the database.

Connection could be established to mysql but not the database.

Connection could be established using localhost as your host

OR no connection at all could be established.

Which of those 4 did it say?
 
RickJ







PostPosted: Thu Aug 17, 2006 2:39 am Reply with quote

it failed on all four but it's working now.
 
gregexp







PostPosted: Thu Aug 17, 2006 7:57 am Reply with quote

ok, so what was the fix?
 
RickJ







PostPosted: Fri Aug 18, 2006 1:48 am Reply with quote

Sorry, The fix was to for me to double check the database connection strings and make sure that I typed the username, password and dbname correclty Smile
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke

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 ©