rch1231 169 Posting Shark

remove the space between the -p and the password.

rch1231 169 Posting Shark

Hello,

Try:

mysqldump -u root -p DBase > outfile.sql

it will prompt you for the root password and create a file in the current directory called outfile.sql

rch1231 169 Posting Shark

Hello,

Your subnet mask should have been provided by your hosting server service provider. Basically what it does is determine how many IP addresses are on your local segment of the network so the system knows what addresses it must go out through the gateway to access. i.e. If you were assigned 8 Ip addresses (say 120.5.72.8 through 120.5.72.15) your subnet mask would be 255.255.255.248 or
255.255.255.255 - 0.0.0.8


Here is a table which may help.

ID	# Bits	Number Hosts	Usable Hosts	Netmask		Note

6	/6  	67108864	67108862	 252.0.0.0  	

7	/7 	33554432	33554430	254.0.0.0 	

8	/8 	16777216	16777214	255.0.0.0 	Class A Network 

9	/9 	8388608		8388606		255.128.0.0 	

10	/10 	4194304		4194302		255.192.0.0 	

11	/11 	2097152		2097150		255.224.0.0 	

12	/12 	1048576		1048574		255.240.0.0 	

13	/13 	524288		524286		255.248.0.0 	

14	/14 	262144		262142		255.252.0.0 	

15	/15 	131072		131070		255.254.0.0 	

16	/16 	65536		65534		255.255.0.0 	Class B Network 

17	/17 	32768		32766		255.255.128.0 	

18	/18 	16384		16382		255.255.192.0 	

19	/19 	8192		8190		255.255.224.0 	

20	/20 	4096		4094		255.255.240.0 	

21	/21 	2048		2046		255.255.248.0 	

22	/22 	1024		1022		255.255.252.0 	

23	/23 	512		510		255.255.254.0 	

24	/24 	256		254		255.255.255.0 	Class C Network 

25	/25 	128		126		255.255.255.128 	

26	/26 	64		62		255.255.255.192 	

28	/28	16		14		255.255.255.240	

27	/27	32		30		255.255.255.224	

29	/29 	8		6		255.255.255.248 	

30	/30 	4		2		255.255.255.252
rch1231 169 Posting Shark

Sorry to take so long responding but if you have not resolved this you really need to run it from the CD. If you run it from the CMD prompt and windows is using one of the files you are trying to replace it does not replace the file but acts like it did.

rch1231 169 Posting Shark

Hello,

Sorry been busy and could not get back to reply till now.

Linux holds command line arguments in variables $1 $2 $3 etc. where the variables are separated by white space (tab or space char). So the following command line:

scriptname var1 var2 var3

would set the following variables:

$1 = var1
$2 = var2
$3 = var3

Does that makes sense?

As far as finding the number of files do you need to know how many are readable as one output, then how many are writeable as a second and so on or just how many are all three or what? Have you tried the following command:

ls -la

It will give you a long directory list and show files with owner, group and the permissions.

rch1231 169 Posting Shark

Witch OS.

If it is Linux the next question becomes readable, writeable and executable by whom (owner, group and/or world)?

If Linux here is a security check script I wrote to look for files that may be security issues:

#!/bin/bash
#This program looks for possible security risks to the server and stores the list 
#in a file in the /var/log/chksec/ dir for review using the supplied parameter $1 as 
#the file name.  If no paraeter supplied then show usage info.
#
if [ $1 ]
then
	echo $1 > /var/log/chksec/$1
	echo "Starting Checks..." >> /var/log/chksec/$1
	echo "Open Directory check." >> /var/log/chksec/$1
	find /home -type d -perm 777 -ls   >> /var/log/chksec/$1
	find /var -type d -perm 777 -ls   >> /var/log/chksec/$1
	echo "Open File check." >> /var/log/chksec/$1
	find /home -type f -perm 777 -ls | grep -v '/proc'  >> /var/log/chksec/$1 
	find /var -type f -perm 777 -ls | grep -v '/proc'  >> /var/log/chksec/$1 
	echo "Open Group and other Directory check." >> /var/log/chksec/$1
	find /home -type d -perm /022 -exec ls -lad {} \;  >> /var/log/chksec/$1 
	find /var -type d -perm /022 -exec ls -lad {} \;  >> /var/log/chksec/$1 
	#
	#check for web or other writeable directories and files.
	find /home -type f -perm -022 -ls | grep -v '/proc' >> /var/log/chksec/$1
	find /var -type f -perm -022 -ls | grep -v '/proc' >> /var/log/chksec/$1
	#
	#check for web writable files
	#Dispaly file when done.
	less /var/log/chksec/$1
else
	echo "usage securitycheck.sh <outputfile>"
	exit 0
fi
rch1231 169 Posting Shark

Opps. My mistake, I often forget about RAID 0 and consider anything less than 5 to be mirroring. Did not mean to lecture. I normally use RAID 5 for the best of both worlds but it takes at least 3 drives. Many of the systems I set up now a days use 6 to 10 Drives in RAID 10 (3 RAID 5 mirrored to other 3).

rch1231 169 Posting Shark

evstevemd,
Normally I would agree but this is a java script and may not be a virus but an attachment to one of their php files or includes. That is why I ask which OS was on the server and from there what type of server so I could recommend support routes.

rch1231 169 Posting Shark

Hello,

It looks the syntax you are using is based in PHP and your first line tells the system to use the bash shell to execute the script. If this is a php script remove the first line and it should run from a browser. If you meant to use bash then your syntax is all wrong.

rch1231 169 Posting Shark

The purpose of RAID is to allow you have redundancy in case one of your hard drives dies. If you have third 500GB HD you could act as if one of the drives had failed and put the new drive in place of the "Failed" drive and the RAID controller would rebuild the array using the available drive as source. The new drive does not need to be the same model or mfg as the drive it is replace but must have the same capacity or greater (i.e. 750GB would work but 400GB would not.)

Personally I like 3ware or adaptec. You can find them on ebay for good prices.

rch1231 169 Posting Shark

Hello,

Are you on a windows server or linux and is it a dedicated server or shared?

rch1231 169 Posting Shark

Hello,

You just have to open the system and find it. Normally a round large watch battery (about 3/4 inch diameter) set in the motherboard.

What happens when you boot it up does it show anything and what are the settings on the CMOS for the CDROM, Harddrive and date?

rch1231 169 Posting Shark

I agree with Xlphos about checking the BIOS to make sure the drive is recognised also would not hurt to open the system and make sure the wires are still connected.

rch1231 169 Posting Shark

Seagate has always made excellent drives and WD does normally too. Seems like they (WD) have had some trouble with the 500GB and 750GB drives as I had a lot of initial failures in those versions. Switched to Seagate and paid a little more but no issues.

If you have the capability I suggest setting one of the drives to one side and recreating the mirror with a new drive so you have a place to go back to. The mother board raid controller issue is one reason I always use a controller card instead of the motherboard.

rch1231 169 Posting Shark

Hello,

What you need to do is to select your records and do the join with the C_ID and Inst_No and then use the WHERE to select a subset of the data where the fields are not equal. Something like:

SELECT Table_1.C_ID, 
Table_1.Inst_No,  
Table_1.Paid_Dt, 
Table_2.C_ID 
Table_2.Inst_No 
Table_2.Today_Dt
From Table_1 Inner Join Table_2 on Table_1.C_ID = Table_2.C_ID 
AND
Table_1.Inst_No = Table_2.Inst_No
WHERE 
Table_1.Paid_Dt <> Table_2.Today_Dt
rch1231 169 Posting Shark

Did you check to see if the replacement motherboard had the RAID controller enabled and is it the exact same motherboard and BIOS revision?

rch1231 169 Posting Shark

Hello,

All you have to do is select from a list like this:

Select * from table1
where ID in (5, 6, 23)
rch1231 169 Posting Shark

Hello,

Ok. I see a couple of things that are a little off:

1. Why do you have a number as part of the field name? And do you have an ID field (record number that auto-increments)?

2. There should be a space after each field name.

3. A semi-colon (the one after "Photo); " and before "VALUES" ) ends a sql statement so instead of one you have two separate statements that are missing the other half. Remove the semi-colon.

4. Your field list shows you inserting to Last_Name then First_Name but your value list starts with
1, 'Smith', 'Janet'

So the system is trying to insert 1 into the Last_name field.

5. You have your dates in two different formats which may cause a problem depending on the version of MySQL.


If I may.... try this instead:


INSERT INTO employees
(Last_Name, First_Name, Title, Title_of_Courtesy, BD, Hire_Date, Address, City, State, Zip, Country, Extension, Notes, Reports_to, Photo)
VALUES ('Smith', 'Janet', 'Sales Manager', 'Mrs.', '12-30-1974', '08/05/2000', '123 My Street', 'canton', 'OH', '44720', 'USA', '4632', 'MBA from Ashland University', 'Andrew Fuller', 'No Photo Available Yet');

rch1231 169 Posting Shark

Hello,

This will probably need a little work but it should go something like:

SELECT table1.createdate, table2.group, count(table2.group)
FROM table1 inner join table2 on table1.username=table2.username
group by table1.createdate, table2.group

but that is just off the top of my head.

rch1231 169 Posting Shark

Hello,

Yes American Megatrends is a company that produces motherboards and this BIOS loading and is the screen you normally do not see when your computer is booting properly and set to quick boot.

http://www.ami.com/

Could be your hard drive has died or could be simply a boot track problem. Can you supply the exact message?

rch1231 169 Posting Shark

Msasif is correct about the query time being reduced. One other thing are you storing the date as a date only or a datetime. If it is a date time that would cause it to take a long time because every record would have a unique datetime and you would have very few exact matches but still some.

rch1231 169 Posting Shark

Normally you run that by booting from the installation CD and using the recovery console to get your to a dos prompt. Otherwise the files will be in use by window and you will not be able to replace them.

rch1231 169 Posting Shark

Hello

Try
sudo chmod 755 /var/www

Your problem is the third permission which is for every one else. First is the owner, second is the groups permissions and third is everyone else in the world. 755 will set it to rwxr-xr-x (r=4 w=2 and x=1 ) you add them to set each group of permissions.

ls -la /var/www/
total 32
drwxr-xr-x.  8 root      root 4096 2010-04-10 10:22 .
drwxr-xr-x. 27 root      root 4096 2010-08-12 00:28 ..
drwxr-xr-x.  2 root      root 4096 2010-04-10 10:22 cgi-bin
drwxr-xr-x.  3 root      root 4096 2010-07-12 07:15 error
drwxr-xr-x.  7 root      root 4096 2010-08-16 13:50 html
drwxr-xr-x.  3 root      root 4096 2010-07-12 07:15 icons
drwxr-xr-x. 14 root      root 4096 2010-07-12 07:25 manual
drwxr-xr-x.  2 webalizer root 4096 2010-08-08 03:11 usage

It is the next directory down (html) that should be set for apache to read:

ls -la /var/www/html
total 28
drwxr-xr-x.  7 root   root   4096 2010-08-16 13:50 .
drwxr-xr-x.  8 root   root   4096 2010-04-10 10:22 ..
drwxr-xr-x   2 apache apache 4096 2010-07-28 23:27 default.com
drwxr-xr-x  13 rod    apache 4096 2010-08-11 16:20 SmokeDepot
drwxr-xr-x   8 rod    apache 4096 2010-08-21 02:41 smokeshop
rch1231 169 Posting Shark

Hello,

Ok the problem is that your where clause is true for every record. If I understand you want only records where the count of the number of records on any specific date is 2 or greater. If that is so what you would need to do is create a sub query to determine which records you want and then generate the output using those records. The way I do this is a three step process. First create the query to get the dates with count of how many on each date.

SELECT record_date, count(*)  
from TIME_TABLE 
group by record_date

Verify your data and then limit the selection to only records where the count on that day is > 1

SELECT record_date 
from TIME_TABLE 
group by record_date 
HAVING count(*) > 1

Finally get your records based on the dates you determined.

SELECT * FROM TIME_TABLE
WHERE record_date in (SELECT record_date 
from TIME_TABLE 
group by record_date 
HAVING count(*) > 1) 
order by record_date
rch1231 169 Posting Shark
rch1231 169 Posting Shark

Go to network connections and right click on the Local Area Connection and select Properties. See if "NWLink NetBIOS" and "NWLink IPX/SpX/NetBIOS Compatible Transport" are in the list. If not then click Install, then Protocol and add them and REBOOT. Windows needs them to see the names of other systems and broadcast its name.

rch1231 169 Posting Shark

Windows can be a pain about changing the driver. Try this... Uninstall the current driver (if there is one) and shut the system down completely (pull the plug and wait 1 minute) then reboot go into the BIOS and see if you can change the IRQ of the NIC or reset the data (ESCD Configuration Data or something like that). Then boot windows and see if it picks up the device as new and loads the correct driver. I have had to do this before and it works 80% of the time. If it down not email me the specs on the computer and I have almost every NIC driver ever made and will send you a link to one that works.

rch1231 169 Posting Shark

Hello,

Try this site for a good comparison.
http://en.wikipedia.org/wiki/Comparison_of_Windows_and_Linux

rch1231 169 Posting Shark

Did you try it from the second repair option like I suggested?

rch1231 169 Posting Shark

Ok this is going to sound odd but have you tried opening and closing the CD ROM drive. I have had them not start back up but once you get them going....

rch1231 169 Posting Shark

Also is this a dell? There is an option in the BIOS for setting the memory for installation or something like that. Limits the memory to 256MB and some will not load unless this is set.

rch1231 169 Posting Shark

One other thing to check.. Are the drives set up with the primary HD on IDE0 as the Primary and the CD as either the secondary or on IDE1 as the primary? I have noticed the XP only wants to talk to the Primary HD and if it is on the secondary channel then no go like you are getting. Also acts odd if CD ROM is Primary. Are you using cable select or jumper as primary and seconday? Have you tried it jumpered as master with no secondary on the cable?

rch1231 169 Posting Shark

You set constants by using the define statement. The format is
define(“constantname”,”constantvalue”);
For instance, to set a constant with the company name, use the following
statement:
define(“COMPANY”,”My Fine Company”);
Use the constant in your script wherever you need your company name:
echo COMPANY;
When you echo a constant, you can’t enclose it in quotes. If you do, you
echo the constant name, instead of the value. You can echo it without any-
thing, as shown in the preceding example, or enclosed in parentheses.

You can use any name for a constant that you can use for a variable. Constant
names are not preceded by a dollar sign ($). By convention, constants are given
names that are all uppercase, so you can easily spot constants, but PHP itself
doesn’t care what you name a constant. You don’t have to use uppercase, it’s
just clearer. You can store either a string or a number in it.
The following statement is perfectly okay with PHP:
define (“AGE”,29);

rch1231 169 Posting Shark

If this is XP go to Tools, Folder Options and then click the View tab. At the bottom of the list is an option called "Use Simple File Sharing (Recommended)" Uncheck this and you will get a new tab at the top called "Security" where you can take control of any file and change it's attributes as an administrator.

rch1231 169 Posting Shark

Hello,

I have seen this when there is a partition that XP does not recognise on the drive. Try deleting all of the current partitions and run setup again. (I have seen it when there was any type Linux partition and/or a partition from Vista or WIndows 7) If you have a server 2003 setup disk you can use it to delete the partitions and even create a partition and everything works.

rch1231 169 Posting Shark

Does the hard drive show up under the computer setup and does it have the right settings?

If so you may need a specific driver for the controller card in your system. Windows is going to want to install the driver as you do the setup. If you notice there is an option when setup first starts that says "Press <F6> to load third party drivers." You will need to download the drivers from your vendor and put them on a floppy disk (yes a floppy disk). Windows Xp will only load the drivers from a floppy unless you build your own installation cd with something like nlite.

rch1231 169 Posting Shark

If it has been sitting in the box for three years the CMOS battery is probably dead. I may be as simple as putting a valid date in the CMOS. Windows is funny about starting some apps prior to the date they were written. If it is mediacenter edition again it could be the CMOS configuration is out of wack. See what is available from setup and the try the boot.

rch1231 169 Posting Shark

Ok try this. Instead of selecting R at the first screen continue on as if you were going to install (do the <F8> License, when you get to where you repartition if needed leave it the way it is and Setup will "Search for a previous installation" It will detect the copy of windows that is installed and ask if you would like to repair the installation or install a new copy. Tell it you want to repair and it will delete a bunch of files and then reinstall them from the cd. It will also ask you for your installation key later but it keeps all of your other settings and installations intact.

rch1231 169 Posting Shark

Hello,

It is kind of hard to tell you how to write the script without knowing anything about the database, the tables and the fields involved. As far as a script is concerned you can simply put mysql code in a file and then redirect the file into mysql from the command line and it will execute.

For example:

text file called mycode.sql contains

use mydatabase;
select * from table1 order by table1.order_date, table1.order_number;
quit;

I can call it from the command line with

mysql -u user -ppassword < mycode.sql
rch1231 169 Posting Shark

Right click on the task bar at the bottom of the screen and select Properties. CLick the Start Menu tab at the top of the dialog box and then click customize next to the start menu style you have selected. Go down through the list till you see the option for Run and check the option to show it in the menu.

rch1231 169 Posting Shark

Hello,

There are several things to take into account when you say all log files from the previous month. You need to look at how the various log applications are storing your log files. Are they rotating the files at then end of the month or when the log gets to a certain size or at the end of the day.

For example if today is Aug 8th and your httpd log is set up to rotate when the size of the file exceeds 1MB and the access.log.1 log has entries from Jul 24th through Aug 2nd. it has a last access date of Aug 2nd but contains entries from the previous month. Does it show up in your list of last months logs or not? That is why I originally mentioned /etc/logrotate.d/ so you could go review the scripts doing the log rotations.

The other thing you have to consider is that different logs store data in different formats so how do you scan the different logs for the month in question?

Determining the previous month is really not a problem. You can quickly find the previous month by using the date command and subtracting 1.

date +%m
will give you the current month in numerical format

rch1231 169 Posting Shark

I you cannot read any disk in the drive then it is a drive problem and I still say take it back.
If it is less than 30 days old I would take it back to the store and exchange it for a new one. But before you do that, Dell has removable DVD drives on many of their laptops. Double check that the DVD is seated all the way. Make sure when you insert the CD or DVD that you are pushing down on the center to snap it in place in the drive (sorry if you already know about this but had to mention just in case) Laptop CD/DVDs have small catches on the center spindle that lock the disk in place.

rch1231 169 Posting Shark

find /var/log -mtime 30 -print

-mtime n
File’s data was last modified n*24 hours ago.
or
ls -R /var/log | grep Mar

However it really depends on what your logrotate configuration is set for. You may not be saving that far back.
ls -la /etc/logrotate.d
will give you what is set up to rotate and the config files will tell you how large or how often.

rch1231 169 Posting Shark

It may be that the driver is included in Service Pack 3 for XP in which case they do not list a driver on the HP site. You can download service pack 3 from Microsoft on another system, copy it to CD, DVD or USB drive and install it on the system from the following link:

http://www.microsoft.com/downloads/details.aspx?FamilyId=5B33B5A8-5E76-401F-BE08-1E1555D4F3D4&displaylang=en

Its about 320MB if I remember correctly so be ready for the download time involved...

rch1231 169 Posting Shark

Myivo charges for the service if you want file transfer. Free version that you get a 30 day trial on does not include file transfer or sharing per their site.

http://myivo.com/en/features.php

rch1231 169 Posting Shark

Have you tried sysinternals autoruns.exe ? They have a great set of tools if you can still find them. Microsoft bought them a few years ago and renamed it wininternals. If you can't find the tools there is a copy on my server at:

http://txlinux.com/Sysinternals.rar

rch1231 169 Posting Shark

Go to the HP/Compaq support site and put in your model number. It will take you to a page where you can download the drivers for your system.

rch1231 169 Posting Shark

If it is less than 30 days old I would take it back to the store and exchange it for a new one. But before you do that, Dell has removable DVD drives on many of their laptops. Double check that the DVD is seated all the way. Make sure when you insert the CD or DVD that you are pushing down on the center to snap it in place in the drive (sorry if you already know about this but had to mention just in case) Laptop CD/DVDs have small catches on the center spindle that lock the disk in place.

rch1231 169 Posting Shark

There are several free stats apps out there that you can download and install. Awstats is a good place to start.

rch1231 169 Posting Shark

Hello,

Just jumping in here but are these lines actually in your httpd.conf file:
From root Sat May 5 12:05:29 2007
To: /etc/httpd/conf/httpd.conf

If so that could be your problem.
IF not the next question is Does the apache user on your computer have permission to view the directory
/home/www/mine.website.com/htdocs

Can you run the following command and post the results:

ls -laR /home/www/

It will give me a better idea.

Also if you run this from the command line what do you get:

httpd -t

tests your httpd.conf file.

One other thing what are the permissions on your index.html file?