I have a perl program that loads the contents of a file into an array. Is there a quick way to look at the array and see if one of the elements contains "exiting now"? I could do a loop, but was hoping for something simpler. I know for the most part, what I am looking for exists in a particular...
I have a php script that runs when a user uploads a file, the basis of the app is that the php code passes a set of arguments to a perl script that encodes the data and stores it in a database.
I have a section that removes certain characters from the file names due to the passing of...
I have a site where the main page is protected by an .htaccess file so that I can allow only certain people to access the main site. It is a list of wedding guests and I do not want just anyone to change it. However, I installed phpBB in a subdirectory and when I go to the forum it asks for the...
I have a lab of windows xp sp3 machines that I need to "lockdown", the problem is when I use gpedit.msc the changes also affect the administrator. I need to have the administrator able to do everything. How can I setup a group policy that affects only regular users? I do not have a domain...
I have a client using Outlook 2003, when ever she opens Outlook, her calendar reminders pop up and repeatedly flash. If you dismiss them they go away, but if you close and reopen outlook they come back. She cannot snooze them either. I tried running "outlook /cleanreminders" but it did not help...
I have a form in an app that I inherited for creating email addresses. The form passes the user part , the domain part separately to a function that puts them together to make an email address and then validates everything up to the @. Problem is some admins have been putting the whole email...
I have a php page where a user can set information requested and upon submit it writes the information to a file. On my form I have two check boxes. If I check both of them and click submit, the information is put into the file, but when the page reads in the file, I cannot get the first...
I have a script that creates a tbz file as a "backup" of some system directories on a linux server and then rsync's that to another server, the code looks like this:
#!/bin/sh
/usr/bin/find /backup -type f -ctime +1 ! -exec rm {} \;
/usr/bin/find /var/lib/asterisk/backups -type f -ctime +7 ...
I am trying to put together a page that displays different information about the system. One of the commands I want to run is hdparm so that I can gather the hard drive serial number. My code looks like this:
$hd = system("hdparm -I /dev/sda");
echo $hd;
But I get nothing when I pull up the...
I have a php page where I have an HTML form and when clicking submit, PHP runs through a process of gathering variables and putting information into an mysql database. I want an option that the user has to place a check on the form in order for it to submit. I have a javascript function to check...
I am creating a website to propose to my g/f. I have a speech written out to display on the page, but I do not want it to just be there for her to skim her eyes over. I would love to have it display across the screen word by word. Can any of you recommend a good option how to do this?
I have a windows 2008 server running Arcserve r12.5, and I need to either a: output specific information to a file, or b: run a specific job from command line so that I can atleast have windows print the start time and end time once it has ran so that I can input that information into a...
I am using ereg_replace to remove spaces from file names using this line of code:
$target = ereg_replace(" ","","/tmp/".$_FILES['upload1']['name']);
I also want to remove underscores and hyphens from filenames such as My_file-20100406.doc
I am unfamiliar with using ereg_replace beyond a...
I am working on a secure emailing system using PHP and PERL. The basis of the app is to encrypt/decrypt messages and files in the background using PERL. That part is working however to avoid a possible security risk, I need to create in my PHP an option to have the file deleted after the...
Hi all,
I am having a slight issue, I have run a perl script before from php but for the life of me cannot get it to work again.
I have tried many methods using system() exec() shell_exec() passthru() but cannot for the life of me get any of them to work.
When I call up my php page, the...
I am pulling datetime out of a summary file. I have the begin time and end time. What I need to do is convert each to epoch so I can subtract and then convert into run time in 00:00:00 format.
I can do the conversion back no problem bout how would I convert Thu Mar 4 00:02:33 CST 2010 to...
I am working with reading a dos file and putting the information into a database. The file however has ^M after each line and this causes the entry in the database to not match up when relating it to other tables. I need an easy way to strip off the ^M. Chomp is not doing it and when I try to...
Hey all,
I am writing a script that checks to see if my servers have backed up within a certain amount of days. I want to put the server name and number of days into an array for each server, for example @backup would look like:
server1 2
server2 2
server3 1
Then what I want to do is loop...
I have a script that pulls info from a file and populates it into a database. However one of these lines, can sometimes put too much into the field. For example, I could have lines that look like this, the result of doing a du -sh on a file: (not in the same file though)
688M...
I am working on a program for monitoring my server backups. I am filling a table with the server and backup info every time the backup runs. So, I am going to have multiple records for each server. Each server has a different backup recurrence, some are 2 days some are 3 days so going strictly...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.