Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Gender
  • Location
  • Interests
    Soccer, soccer and more soccer! Also love my hi-fi!

kcraighead's Achievements


Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges



  1. I am using the exit() command in one of my scripts and it is being ignored. Any idea why this would be? The exit() is within a function which is attempting to grab a value out of an array as follows: > function get_setup_fee($prod_id, $M_PRODS, $M_SETUP ) { //figure out the location of the product_id in the array and get it's key $keyz = array_search($prod_id,$M_PRODS); // now we have the key we the use the same key against the setup fees to find the matching one $setup_fee = $M_SETUP[$keyz]; echo "The keyz is: " . $keyz; echo "The prod_id is: " . $prod_id; echo "M_PRODS is: " . $M_PRODS; echo "The setup_fee is: " . $setup_fee; exit(); return $setup_fee; } The $setup_fee value being returned is wrong so I want to echo the values to the screen so I can figure out the issue with the code. However the script continues to run so I can't see what the values are. Any idea why this would be? I read on another forum that in shared hosting it may be "something with either safe_mode being enabled, output buffering being enabled, or error_reporting being enabled.". Anyone know anything about that? Thanks for the help! Hi! I am the guy behind NetChimp, a web design company. NetChimp offers Web Design York and Web Design Aberdeen plus SEO York and are known as a good Small Business Web Designer with a website packed with Good Web Design Examples.
  2. Is there a way to search all of the directories but to miss one directory out (I have a cache directory that is always being updated so I am emailed every 4 hours with changes that are not important)?
  3. Wow! That is cool! Will add it to all of my hosting accounts so that I get any updates sent to me over the holiday period. Thanks!
  4. I'll probably run it far less - probably every 4 hours - but the default in the script is 15 minutes.
  5. Found this script that looks like it may do the job: Monitor Changes Script Setup a cron job to run every 15 minutes but it is generating errors at the moment - probably due to invalid paths and file permissions. Fingers crossed I'll get it working!
  6. I have a reseller account rather than a dedicated box. I have managed to setup cron jobs which monitor files/directories so I thought that there might be a commercial product that does something similar - but better!
  7. I am keen to improve the security on my servers. I want to be able to monitor my hosting account to find out if any new files or directories have been created or changed. If so, I want an emailed sent to me so I can check it out. I have done a bit of digging and it looks like a possible solution would be a shell script. I am clueless about these but I have cobbled together a script that runs daily. All it does is scan for any new/changed files or directories then puts the result in a file which is emailed to me. I would like to improve the script so that it monitors for new files more often than daily - perhaps hourly - and sends an email only when a change is detected. This will ensure that I get less emails and they are only sent when something has changed. My questions are: 1. Has anyone written a script like this I could use? 2. Is there a tool I could buy that could perform this action that I could install on TCH servers (I saw tripwire mention on my travels round the web)? Any help would be appreciated!
  8. I have another weird problem with this script. I get an error which only occurs once a day at 7am UK time. It says: I wouldn't expect that many connections at 7am so I am confused about this. I also get the following error on other hosting accounts that I run the script on: Any ideas what could be causing these problems. I have setup all of the scripts in the same way on each hosting account so I am not sure why I get these particular errors!
  9. You are right it was created Windows. It now works perfectly! Thanks!
  10. I have written a simple shell script which I plan to use to see if any directories have been created on my hosting account without my knowledge. I have been caught over the last few days by people putting fishing sites up and I want to know within an hour or 2 if this has happened so I can remove it before the hosting account is suspended and I have to contact support to sort it all out. An early warning system if you like. I have created 2 files send.sh: find /home/????/public_html -type f -mmin -240 > /home/????/public_html/change.txt cat /home/????/public_html/mail.txt /home/????/public_html/change.txt | /usr/sbin/sendmail -t mail.txt: Date: Wed Oct 29 10:41:54 2008 To: MY-EMAIL Subject: Hacking Alert From: EMAIL I have then created a cron job to run send.sh every 2 hours. The email is sent but the problem is that I get an error email which says: cat: /home/????/public_html/change.txt: No such file or directory When I use Filezilla to look at the directory the file change.txt is listed with a size. However when I try to copy, delete or move the file to my local PC I get an error which says "no such file or directory". Any ideas why this would be and how I can fix it? Thanks for the help guys I am totally confused!
  11. 1. http://www.competitiveedgedesign.com 2. Competitive Edge Design 3. We provide Graphic Design, Web Design and Free Marketing Tips for business. 4. Commercial 5. We have have the required link back to TotalChoice on this page
  12. Got a webpage that allows a user to replace a picture of their holiday cottage on one of my websites. Once the image is uploaded the user is redirected to another webpage which shows them the picture. However, when the user is redirected the webpage shows the original image, not the new one. I want them to see the new one so they can visually check that they are happy with the new picture. This problem only happens on Internet Explorer. In Other browsers, such as Firefox, the page that the user is redirected to shows the new image, not the original one. I have the following HTTP headers set: header("Date: ".gmdate('D, d M Y H:i:s \G\M\T', time())); header("Last-Modified: ".gmdate('D, d M Y H:i:s \G\M\T', time())); header("Expires: Mon, 20 Dec 1998 01:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header( "Pragma: no-cache" ); I have the following headers set: <META HTTP-EQUIV="EXPIRES" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT"> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <META HTTP-EQUIV="EXPIRES" CONTENT="-1"> I have also placed a second "Head " section at the bottom of the page (as per Microsoft's recommendation to preventing page Cache) with the same values as above. I have even tried modifying the .htaccess file but the changes I made caused the page to crash. I added: ExpiresActive On ExpiresByType image/jpg A0 But regardless of these measures the orginal images on the page are always cached, even if the page itself is not. Anyone have any other ideas how I can prevent the images being cached in ie? It's driving me mad!!!! Thanks!
  13. I have found the solution! Thanks for all the suggestions - getting back to basics was what got me to the solution. As ever, it was simple. Basically the absolute path "http://www.whatever.com/images/etc" stopped working. If I replaced them with the relative path "/images/etc/" it worked. The only remaining issues is why absolute paths fail to find the files when they worked perfectly previously? For now I have to go round and do lots of link replacements on my websites... Cheers!
  14. Techs tell me: "Please be advised that the help desk does not provide developer level support for the coding of web pages, html code, php code, cgi code, graphics, sql backend or any other programming or design elements." Anyone else got any ideas?
  15. I have a php script which checks to see if an image exists by using "@GetImageSize". If a value is returned then the image is displayed, if not a different image saying "no picture on file" appears. I have used this on 3 different websites and all of them have worked perfectly until today. On ALL of them I now get "no picture on file" as though the "@GetImageSize" function I have been using has suddenly stopped working. Previously all of the pictures have been showing fine. I have checked my webpages and php scripts and they are unchanged and all of the images are in the right place on all of the websites. This lead me to conclude that something has changed on my reseller account that has stopped this function working. Anyone got any ideas? Here is a copy of the php script I use: $path = "http://www.myaccount.com/images/properties/self_catering/"; $file = "sc_".$row['picture_id'].".jpg"; $desc = "Link to ".$row['property_name']; $noimage = "no_image"; //check if image exists if($img = @GetImageSize("$path$file")) { echo "<td width='150' height='100' align='left' valign='top'><a href='self_catering_detail.php?propertyid=".$row['property_id']."&propertyname=".$row['property_name']."&nearesttown=".$nearesttown."'> <img src=$path$file alt='$desc' title='$desc' width='150' height='98' border='0'></a></td>"; } else { echo "<td width='150' height='100' align='left' valign='top'><a href='self_catering_detail.php?propertyid=".$row['property_id']."&propertyname=".$row['property_name']."&nearesttown=".$nearesttown."'> <img src='$path$noimage.gif' alt='$desc' title='$desc' width='150' height='98' border='0'></a></td>"; } Edit: TCH-Bruce removed account information
  • Create New...