rch1231 169 Posting Shark

Hello,

If it is just a text file then all you rellay need is to give it a .TXT extension and windows will see it as a file for NOTEPAD. If the server is a Linux server then you might run into a well know issue. The format of Windows and Unix text files differs slightly. In Windows, lines end with both the line feed and carriage return ASCII characters, but Unix uses only a line feed. As a consequence, some Windows applications will not show the line breaks in Unix-format files. Likewise, Unix programs may display the carriage returns in Windows text files with Ctrl-m ( ^M ) characters at the end of each line.

The following page as several options for changing the format of the file to go either way.

http://kb.iu.edu/data/acux.html

rch1231 169 Posting Shark

Hello,

The loud clicking noise are you sure it is coming from the speaker and not from inside the system? My first guess would be a wire that is interfering with the CPU fan.
If it is coming from the speaker then I would double check the BIOS settings on everything.
What is the boot order?
Is there anything in the floppy or CD ROM?

You really need to open it up and determine exactly where the sound is coming from.

rch1231 169 Posting Shark

The lazy answer is get every thing else done and pipe it to the awk command I gave in my last answer. The only issue I see is if a "." was to show up somewhere else in the line.

You could use Substitution Functions and substitute nothing for the period...

Awk provides two substitution functions: sub() and gsub(). The difference between them is that gsub() performs its substitution globally on the input string whereas sub() makes only the first possible substitution. This makes gsub() equivalent to the sed substitution command with the g (global) flag.

Both functions take at least two arguments. The first is a regular expression (surrounded by slashes) that matches a pattern and the second argument is a string that replaces what the pattern matches. The regular expression can be supplied by a variable, in which case the slashes are omitted. An optional third argument specifies the string that is the target of the substitution. If there is no third argument, the substitution is made for the current input record ($0).

The substitution functions change the specified string directly. You might expect, given the way functions work, that the function returns the new string created when the substitution is made. The substitution functions actually return the number of substitutions made. sub() will always return 1 if successful; both return 0 if not successful. Thus, you can test the result to see if a substitution was made.

rch1231 169 Posting Shark

You can use regedit and search the keys for the dll but personally I hate making changes to the registry. Download Malwarebytes and run it. It should find the entries and give you the options to remove them.

http://www.malwarebytes.org/

rch1231 169 Posting Shark

May I suggest that you look at UBCD4Win (Ultimate boot CD for Windows) it gives you many more options than just a single virus scanner. Password hacks, hard drive utilities, registry editors and scanners, Backups and you can add additional drivers and software.

http://www.ubcd4win.com/index.htm

rch1231 169 Posting Shark

Hello,

You should be calling the file from it's actual location instead of the web location. And the reason you are getting emails is you are not redirecting the output from the php script to somewhere. Since there is no terminal cron sends it to you in an email.

For example, the entry

10 17 * 6,7,8 1,5 /usr/bin/ps >> /tmp/psfile 2>&1

in your crontab file schedules the ps command to execute at 5:10 PM (17:10) on every Friday and Monday during June, July, and August.

When using crontab, redirect any output that is normally sent to the terminal to a file. In this example, 2>&1 redirects any error messages to the file psfile.

rch1231 169 Posting Shark

Hello,

The sound you are referring to, does it come from the computer or from the speakers (i.e. sound card)?

rch1231 169 Posting Shark

Hello,

Can you boot in "safe mode" or "safe mode with networking" and attempt to run malwarebytes? Sometime the malware will block safe mode but they don't block safe mode with networking.

rch1231 169 Posting Shark

Hello,

There is a "How To" tutorial discusing this at the following site:
http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/uploading-files-to-mysql-database.aspx

rch1231 169 Posting Shark

I would say you need a table that contains the two pages and when the first page is selected you use the table to create the redirect.

rch1231 169 Posting Shark

I understand and again I suggest gallery2 It is easy to install and the basic setup will do what you want. Should you choose to make it more complex in the future the options are there. You unpack the package and a basic setup takes about 1 minute and you can start posting images. No compiling, no configuration other than having a database in mysql for it to use, which it creates for you. Check out CNET for suggestions on different packages for different operations.

rch1231 169 Posting Shark

I may be missing something but where is $count assigned a value?

rch1231 169 Posting Shark

hello,

Via awk I presume...

echo 1140.95 | awk -F. '{ print $1 $2 }'

-F tells it the field delimiter. But I have a feeling you are looking for something a little different. Can you post the actual line you are trying to parse and what the result should look like and I can do better.

rch1231 169 Posting Shark

Hello,

I am not sure what you are trying to update but the following sql would update fields in two separate tables:

UPDATE table1, table2
set table1.field1 = 1,
table2.field2 = table1.field1
where table1.field1=table2.field2

Not the greatest example in the world but I think it will give you the idea.

rch1231 169 Posting Shark

The three things that I can think of are:

1. Open Device manager and Select View from the main menu (File, Edit, View, etc.) and click the option to show hidden devices and see if there is a device creating a conflict.

2. If it is a built in device: Go into the BIOS (System setup) and make sure the Audio Device is not disabled.

3. If it is a card: shut the system down, remove the card, boot up windows and let it completely start all services and run for a few minutes. Shut the sytem back down and re-install the car. I would also suggest putting it in a different slot if one is available.

rch1231 169 Posting Shark

Hello,

I think the error is because you are missing the $ in front of dir2/* and anywhere else you are referencing the variables dir1 dir2 dir3. The only line that should not have the $ is the initial definition when you set them to d1, d2 and d3 respectively.

It would look like this:

#!/bin/bash

dir2="d1"
dir1="d2"
dir3="d3"

for file in $dir2/*; do
    file_in_dir1=$dir1/$(basename ${file})
    if [ ! -e  ${file_in_dir1} ]; then
        # If the file in dir2 does not exist in dir1, copy
        cp ${file} $dir3
    elif ! diff ${file} ${file_in_dir1}; then
        # if the file in dir2 is different then the one in dir1, copy
        cp ${file} $dir3
    fi
done

But that is still off a little in the second test. Also this only tests to see if a there is a new file in d2 that is not in d1. What about new files in d1 not in d2?

You might be able to use the following command to get what is different in the directories and then copy the files.

diff -qr d1 d2
griswolf commented: good to mention diff -qr +1
rch1231 169 Posting Shark

Hello,

However, is there a way to easily log off of a samba share in general from windows XP other than logging off the windows session or restart?

I am not sure. The only thing I can think of is to map it as a network drive and disconnect when you are done. That will drop the login as a specific user and the mapping so they wuld have to reconnect and supply a password.

Why is browseable commented out on the first instance of the nts directory?

It makes the share invisible to un-authenticated user when browsing the server. Basically it does not show as a possible connection for un-authenticated users if you connect to the server via My Network Places, View Workgroup Computers, Samba on SRVR4 and browse the available shares. Until you authenticate as a user with rights to the share it is invisible and you have to know it exists and put \\srvr4\nfs as the location to map a network drive.

Took about three runs to get that sounding right.. I think I confused myself writing that one LOL......

Let me know if it does not make sense....

rch1231 169 Posting Shark

VMware is based on a Linux Kernel and really easy to use if you just do a little reading first. As for licensing you can get a free copy of ESXi to install by simply registering at their site. There are several companies in our Datacenter running multiple servers off of the Single License they registered and they administer them remotely.

No matter what provider you choose make sure you start with an OS that is designed to do Virtual hosting. Virtual systems run much smoother if you start with an operating system designed for virtual hosting and add other operating systems for the jobs you need. If you start with a standard operating system and add a virtual application under it you sometimes have to fight with the OS to get your virtual systems back on line. Start with the right tool and the work goes a lot smoother and works a lot better. (You can drive in a screw with a hammer but it is not going to look pretty, could fall apart, and when the boss sees it, you are going to have to replace it.)

rch1231 169 Posting Shark

Yes there is but it depends on which operating system you are using and what typoe of lLAN connection you have. If it is wireless then it could be something interfering with the signal.

IF it is Windows XP go to Start, Control Panel, Network Connections. Right click on Local Area Connection and check the status. If needed do a "Repair".

If it is Vista go to Network and Sharing Center and click the status option to the right of your Local Connection. Do a "Diagnose and repair" and try what they suggest.

What you really need is to find out what is causing it.

rch1231 169 Posting Shark

Just to clarify Gallery2 IS a pre-built web application that uses PHP and MySQL to store your images on the server. It creates thumbnails, allows for restricting access to specific users and is easy to administer and install.

The most important thing is to have something you are comfortable using and personally I try to pick an application that has been out for a while. Some new applications can be easily hacked or are know to be front ends for hackers to get access to your server. If you find a package you like the look of Google it and add "hacks" to the search (i.e. "gallery2 hacks") and see what pops up. It is better to be safe than sorry.

rch1231 169 Posting Shark

Here are some of the entries from the bottom of my smb.conf file. Remember that either # or ; makes the line into a comment.

[nfs]
        path = /var/nfs
        writeable = yes
;       browseable = yes
        valid users = jordan, rod

[share]
        path = /var/nfs
        writeable = no
        browseable = yes
        valid users = jordan, kep, lisa, rod

[REMINST]
        path = /var/tftpboot
        browseable = yes
        writeable = No
        guest ok = yes

Based on this windows sees the following shared directories on the server: nfs, share, and REMINST.

Windows users map to samba users like this:

Rodney                rod
Jordan                jordan
Lisa                  lisa
David Mitchell        kep

nfs - Can only be attached to by Windows systems without entering a password by Jordan and Rodney and can be written to by both of them. If you browse the windows network you will not see the nfs mapping no matter what user you are you have to know where it is to attach to it. If Rodney or Jordan are on a Windows system logged in as someone else they can still attach to the nfs directory by mapping a network drive (say N:) to the server \\srvr4\nfs and connecting using the option for using a different user name and putting their name and password in.

share - Can only be read by the users Rodney, Jordan, Lisa and David Mitchell but not written to. Anyone browsing the windows network will see the server and if they click the server they โ€ฆ

rch1231 169 Posting Shark

Your httpd access logs will have the IP address for every request to apache.

69.19.14.29 - - [11/Jul/2010:23:03:17 -0500] "GET /mdam.exe HTTP/1.1" 404 282
69.19.14.29 - - [11/Jul/2010:23:03:32 -0500] "GET /mdam.exe HTTP/1.1" 404 282
69.19.14.29 - - [11/Jul/2010:23:03:52 -0500] "GET /mdam.exe HTTP/1.1" 404 282
69.19.14.29 - - [11/Jul/2010:23:04:01 -0500] "GET / HTTP/1.1" 200 2433
69.19.14.29 - - [11/Jul/2010:23:04:02 -0500] "GET /mm_lodging1.css HTTP/1.1" 200 1289

rch1231 169 Posting Shark

I do not think a single row (across) will work but you put them in a single column (down the page) with this from the command line of a bash shell:

for x in `cat myfile`
do
echo $x >> newfile.txt
done

The for loop will treat the spaces as a delimiter. When you hit enter at the end of the first line the second line will prompt you with a > symbol which will continue till after you type done.

Will that work?

rch1231 169 Posting Shark

OK sorry I misunderstood the original question. In this case you could use the Tools, Map network drive, option from explorer along with the samba rights. Then when you create the connection from windows you click the "Connect using a different user name." that is available and put in the inforamtion for the user that is allowed access.

For example on my server at home I have two seperate shared connections to the same directory. For most of the users normal windows logins I set up a connection with read only access to /var/nfs which has the windows name of "Public". However I have a second connection also to /var/nfs called "Admin" that has read/write privileges and only the user rod has access. If I try to connect to it from a standard user it prompts me for user name and password and if I put in my username and password I get access for read and write.

If this is not what you need let me know either here or you could send me a Private message with the samba config attached and I could make a few suggestions.

rch1231 169 Posting Shark

You need to look at the file /etc/samba/smb.conf and you will see the current configuration for the users and shares they are able to access. You would have to change the configuration for the restricted shares to match the unrestricted shares and restart the samba service.

rch1231 169 Posting Shark

You might want to check out some of the used computer retailers or Craigs list for an old card rather than investing the money on something that you may upgrade soon.

As for the upgrade questions it is your time and money. I stand bu the line in my signature.....

rch1231 169 Posting Shark

Greertc,

My fault on the httpd logs if your on a windows system with IIS it will be in the IIS logs. httpd access and error logs are for Apache on either Windows or Linux.

On the question about why you did not see an error message when it did not connect, it probably did give a warning but you may not have set up the any code to post the warning to a field and display it so you did not see it. Does that make sense?

Glad you got the connection working.

rch1231 169 Posting Shark

It may or may not be the problem but you changed the command line I suggested. You are not specifying the server IP or name in yours. Try this and see what happens:

Mine:

C:\Users\Geert\mysql -u root@localhost -pjuist fietsen

Yours

C:\Users\Geert\mysql -u root -pjuist fietsen

The first one is what php is sending vs the second which could default to 127.0.0.1 instead of localhost. You probably have the user root@127.0.0.1 in the mysql users table but if you don't have root@localhost then no connection.

Or I could be wrong but I know it once gave me fits. If it works just fine we need to figure out where else it could be dying... Have you looked at the mysql log or the httpd access and error logs for the results of the script?

rch1231 169 Posting Shark

It really is not problem for the driver for the second card to load. Basically it is like adding a second NIC or other card. I know a lot of systems where they simply added a card to get the dual monitor capability from their system when the primary adapter was on the mother board. My HP tower has a setting in the BIOS to let me use my PCIe card as the default over the built in. The Nvidia has two ports and I can use the onboard as a third. I Have tested it and even won a bet with another sysadmin that I could hook up a third monitor and use it without the onboard being the primary adapter. You can also change the primary display from windows if you don't have a BIOS setting.

rch1231 169 Posting Shark

You have 4 PCI Express and two PCI slots so go but a PCI or PCIE video card. It probably won't have the power of your current card but it will still work for the third monitor.

rch1231 169 Posting Shark

You should be able to set the router up manually. If it is a Linksys, D-Link, netgear or other brand the router is probably has a local address of 192.168.0.1 or 192.168.1.1. You can easily find out and configure the router with this:

1) Plug the router WAN port into the internet connection.
2) Plug your computer into one of the lan ports and if needed do a repair.
3) Run ipconfig and get the settings for the routers address since it is now your gateway. For exaample if ipconfig shows:

IP Address 192.168.1.100
Subnet Mask 255.255.255.0
Default Gateway 192.168.1.1
DNS Servers 192.168.1.1

4) Open a browser and go to the IP address for the router which is the gateway address. (in the above case it would be 192.168.1.1)

5) You should get a login prompt and the normal default Login:Password are one of the following combinations depending on manufacturer (and <Blank> means leave it blank):

admin:password
<Blank>:admin
<Blank>:password
admin:<Blank>
password:<Blank>

If it not one of those check the manual or the mfg website.

Once you get in set the WAN for Static IP and put in the information you collected:
IP Address 192.168.4.53
Subnet Mask 255.255.255.0
Default Gateway 192.168.4.1
DNS Servers 24.247.15.53
12.127.16.67
24.247.24.53

rch1231 169 Posting Shark

Images can be tricky. If you just want an application that will work, is free and is already written for php and mysql look into Gallery2. Pretty easy to install and gives you options for customer logins.

rch1231 169 Posting Shark

What if you run it from the command line? In workbentch (and I will bet in QuantumDB) you manually connect to a database first through the GUI and stay connected till you disconnect. Try testing it from the command line. Get to a command prompt (Windows) or bash shell (Linux) and enter:

mysql -u root@localhost -p<root mysql password> <Database name>

If you connect then the login you are using is correct so next try your select query and see if it runs. If you do not connect then the problem is in your login to the server. **Note that there IS A SPACE between the -u and user name but NO SPACE between the -p and the password.

rch1231 169 Posting Shark

Ok if I understand correctly you want to update the empty truck field in the customer_orders table with the correct truck based on the location of the order. If that is correct then you need to use update instead of insert. Insert is to create a completely new record for the order and update is used to change the value of an existing record even if the field in question is blank.

The statement:

mysql_query("INSERT INTO `customer_order`(Truck) VALUES ('$truck')");

Attempts to insert a new record in the Customer_Order table and only fill in the field Truck with a value and set it equal to $truck.

What you need is something like:

mysql_query("UPDATE customer_order set `Truck` = '$truck' where Order_Number = '$order_number' ");

Or something pretty close.
Does that make sense?

rch1231 169 Posting Shark

Sonja,

I am really not sure of what you are trying to ask. What is a "Moveit server". Are you referring to the modified date vs the creation date?

rch1231 169 Posting Shark

Hello,

Well if you don't want to reformat your hard drive then that limits the scope of available applications to run a Virtual system. What OS are you currently running and what hardware do you have in the system (CPU's, Memory, Available HD Space)? Personally the best one I have used is VMWare's ESXi which is well written and easy to administer.

rch1231 169 Posting Shark

Hello,

It would really help if your could post part of the code giving you the problem. In the mean time have you tried your sql statement from the command line with the mysql interface? Login as the user you have defined in your script and try the code.

rch1231 169 Posting Shark

Hello,

I think I can help but I need a little more information.

Which Outlook are you having trouble with? Is it the default one with your Windows OS (if so which OS) or is one from an MS Office install?

How do you know it is not receiving all emails and what can you tell about the ones that you are not getting? COuld be a size limit on your mailbox or the number of recipients.

IF one of the messages was rejected and returned can you post the rejection notice.

rch1231 169 Posting Shark

If it is on a linux server change to the doc root directory (usually /var/www/html/domainname.com) for your web site and issue the following command as root:

ln -s subDirectory subdirectory

The format for the command is:

ln [OPTION]... TARGET... DIRECTORY

to get the manual page enter:

man ln

rch1231 169 Posting Shark

Normally you would want them set to 755 with a umask of 022. There are a couplle of places you can set this depending on the ftp server you have running.

in /etc/inetd.conf

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -u 022

In /etc/xinetd.d
server_args = -l -a -u 022

If you are running vsftp like I am:
In /etc/vsftpd/vsftpd.conf

# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#

Hope this helps.

rch1231 169 Posting Shark

The insert will create a new record in customerorders. Are you trying to do an update instead of an insert?

The other thing I see is the ( ) around truck in the insert:

mysql_query("INSERT INTO `customer_order`(Truck) VALUES ('$truck')");

I think what you would need is:

mysql_query("INSERT INTO `customer_order.Truck` VALUES ('$truck')");

But again that will create a new record instead of updating the original. Can you verify what you really want done....

rch1231 169 Posting Shark

Hello,

II agree with Tesu but wanted to throw this in. Your shared drive must have some subdirectories and you may run into cases where there are duplicate file names in different directories and the files are not the same or are unrelated to each other. Do you plan to consider the full path of the file as a unique name or just the file name its self?

Also do you want to track the creator or owner of the file in your database?

Just trying to help you cover the bases.

rch1231 169 Posting Shark

Hello,

If I am reading you post correctly you have A desktop (XP), a Laptop (Vista), a router (wireless or not) and a Modem (Cable or DSL) and want to be able to use the internet and to share files on both systems.

The systems should have no problem connecting to the router and provided the network cards on both are set to get an IP from the router (DHCP or Obtain an address automatically) you should be able to use the internet on both at the same time. TO get the two to communicate you will need to make sure a protocol is loaded on the Desktop system. Go to Control Panel, Network Connections the right click on Local Area Connnection and then select properties. When the box comes up look through the list for

NWLink IPX/SPX NetBIOS Compatible Transport.

This protocol is what lets two windows systems see each other and communicate. If it is not listed click the Install button just below the box and select "Protocol" you should see NWLink IPX/SPX in the list. Selcet it and click OK. It will take a second to load then OK the first screen and reboot the computer.

On the Vista system go to Network and sharing center and turn on File Sharing, Network Discovery, and Public folder sharing.

If this is not what you had in mind send a little more detail.

rch1231 169 Posting Shark

OK sorry about that I though you were having trouble with the calculation. I believe what you need is something like this for your where clause. I spread it out a bit so you would see the Parentheses and catch the order of precedence.

WHERE 
(
TO_DAYS( NOW( ) ) - TO_DAYS(  `pDate` ) >20
AND 
(rfDate LIKE  '0000-00-00' or rfDate is null)
)
OR
(
(rfDate not LIKE '0000-00-00' and rfDate is not null) 
AND 
TO_DAYS( NOW( ) ) - TO_DAYS(  `rfDate` ) >20
)
rch1231 169 Posting Shark

I think this is what you are looking for:

Date arithmetic is less straightforward than time arithmetic due to the varying length of months and years, so MySQL provides special functions DATE_ADD( ) and DATE_SUB( ) for adding or subtracting intervals to or from dates. Each function takes a date value d and an interval, expressed using the following syntax:

DATE_ADD(d,INTERVAL val unit)
DATE_SUB(d,INTERVAL val unit)

Here, unit is the interval unit and val is an expression indicating the number of units. Some of the common unit specifiers are YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. (Check the MySQL Reference Manual for the full list.) Note that all these units are specified in singular form, not plural.

Using DATE_ADD( ) or DATE_SUB( ), you can perform date arithmetic operations such as the following:

ยท Determine the date three days from today:
mysql> SELECT CURDATE( ), DATE_ADD(CURDATE( ),INTERVAL 3 DAY);

rch1231 169 Posting Shark

Hello,

It could be any number of reasons that the system does not see the drive when connected as a secondary.

If it is a PATA (Parallel ATA) drive with the ribbon style connector it is probably a jumper of the drive that is set wrong. On PATA (or IDE) drives jumpers are used to decide if it is the primary (master) drive on the cable or the secondary (Slave) or does it use the position on the cable (cable select) to decide if primary or slave. Also double check in the bios to see if the secondary drive is set to "NONE" or and set it to "AUTO" to tell the system to look for a drive. On Dell's you turn it ON instead of OFF.

If it is SATA again check the BIOS to see if the drive port is enabled.

As far as reading it with a MAC, probably. If the drive is not dead (and that is why the PC does not see it) then you could put it in a USB housing and connect it. Any MAC or Linux PC should see it and auto mount it for you to be able to access the data.

rch1231 169 Posting Shark

If I am reading your posts correctly you can get to sites via Internet Explorer but not with FireFox. If that is the case check under the File menu on Firefox and see if the "Work Off Line " option is checked. Drove me crazy one afternoon.

rch1231 169 Posting Shark

Hello,

Do you still have your old DSL modem? If so you can probably put it back in the place of the new router and then connect to it and find out the protocol used to connect to your ISP. Most ISP's have the basic instructions on their support site about how to connect a third party DSL modem. But your best bet is to call tech support and get them to talk you through it.

rch1231 169 Posting Shark

Should be:

nslookup google.com 156.154.70.22
nslookup <domain name> <name server to query>

Sorry it is probably the way I listed the command options.

rch1231 169 Posting Shark

I agree with gerbil that cloning is NOT the way to go. That is why I recommended nlite. It creates an installation ISO you can burn to multiple disks and allows you to install even if the systems are not the same manufacturer. It's free, easy to use, menu driven and you can deploy it now. Then later when you have time set up a PXEBoot server and use the image for the XP installs.

PXE boot is the fastest easiest but it takes a little while to get one properly set up and XP is a real pain to get right. I use the nLite image on my PXE boot servers for Windows XP and Server 2003 because I can include the service packs and update raid and other drivers in the build. It also allows me to include the VLK, remove packages that are not needed, and much much more.