Jump to content

Byron

Moderators
  • Posts

    9,153
  • Joined

  • Last visited

  • Days Won

    146

Everything posted by Byron

  1. It got changed. I'm not seeing decode.heliohost.org in our database anymore even though I still see it through my browser. Give it another day to clear out. I am seeing this in our database and it's working too. decoded.cz.cc
  2. Here's an image script that I've used several times in the past to grab info on some of my pages. It creates a 1x1 transparent gif: <?php # your script here # make a 1x1 transparent .gif header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Content-type: image/gif"); $im = @imagecreate(1, 1); $background_color = imagecolorallocate($im, 255, 0, 0); imagecolortransparent($im, $background_color); imagegif($im); imagedestroy($im); ?>
  3. It's not working on the administrator's test account either: http://area51.heliohost.org/jsp/test.jsp Escalating...
  4. More than likely it's do to high server load. Are your JSP pages working now?
  5. What happened after you tried changing your domain name? Did you wait at least 24 hours after you changed your domain name for it to take effect?
  6. There shouldn't be any problems. Like jje posted, they all go to the same place. If you'll look at the source code at your cpanel, you'll see inside of an iframe, the renew script with your username. You can also see where it goes through this handy dandy tool. http://byrondallas.heliohost.org/php/tools/curl_get_info.php
  7. What kind of an error do you get? Have you tried logging in using all lowercase on your password? Do you live in Hong Kong?
  8. No mod_deflate is not enabled but you can use this on any of your pages that end in .php Insert this at the very top of your page: <?php ob_start("ob_gzhandler"); ?>
  9. If the script isn't generating any kind of html output then cron doesn't send an email. Look for this in the script: # write new file $day = date("l"); file_put_contents("$day.$fname", $result); and add this below it: echo "Backup File Successful"; So then it looks like # write new file $day = date("l"); file_put_contents("$day.$fname", $result); echo "Backup File Successful"; Then try it with Hotmail or another email service.
  10. If you go here you'll see where I'm grabbing the gzipped backup file and where it gets restored also. http://stevie.heliohost.org:2082/frontend/...ckup/index.html You might want to set it up some where in your public_html directory at first just for testing so you can run the script without using a cron. Then once you've got it like you want it, move it to your home directory and call it from there with a cron job. The backup file will be a gzipped file stored in the same directory as the script is run in. Also don't forget that the username and password are your cpanel login and not your database user and pass.
  11. If you don't want that script to email you the backup and instead write it to a directory, replace the email part with this: $day = date("l"); file_put_contents("$day.$fname", $result); And have a cron job run it every day. I can't remember the exact setting for every day, but the path will look something like this: php -q /home1/username/public_html/cron_job.php Here's the entire code that needs editing for your domain and username and password and dtabase info. It will over write each day every 7 days (Sunday, Monday, Tuesday, etc). <?php # Edit cPanel backup info # login is cPanel login username and password $user_name = "byron"; $user_pass = "********"; $database = "byron_test"; $domain = "byron.heliohost.org"; $url = "http://$domain:2082/getsqlbackup/$database.sql.gz"; $agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $cook_file = "curl_login_cookie.txt"; # get file extension $extract = pathinfo($url); $fname = ($extract['basename']); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_REFERER, "http://$domain"); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, true); curl_setopt($ch, CURLOPT_USERPWD, "$user_name:$user_pass"); curl_setopt($ch, CURLOPT_COOKIEFILE, $cook_file); curl_setopt($ch, CURLOPT_COOKIEJAR, $cook_file); $result = curl_exec($ch); $extract = curl_getinfo($ch); $httpcode = $extract['http_code']; curl_close($ch); if ($httpcode >= 200 && $httpcode < 303) { # write new file $day = date("l"); file_put_contents("$day.$fname", $result); } else { echo "cPanel Login Failed!"; } # delete cookie file if (file_exists($cook_file)) { unlink($cook_file); } ?> Here's what the setting would look like for 1900 hours 00 19 * * * php -q /home1/username/public_html/cron.php >/dev/null 2>&1 This part keeps cron from sending you an email each time it runs: >/dev/null 2>&1
  12. Does this account belong to you? banaanvraag.co.cc
  13. This support request is being escalated to our root admin.
  14. Would it really be that difficult to try it before you drive down there? I don't think anybody would realize much of a difference while rebooting than it is now. Today has REALLY been a bad day on Stevie. You do what you think is best. If you can stand it so can I.
  15. Byron

    Cron Job

    Thanks Geoff!
  16. All Johnny accounts seem to be down at the moment. Escalating...
  17. You should be good to go now. Refresh your cache if you still see the suspended page.
  18. Byron

    Cron Job

    I've never used /usr/bin/wget to run a cron. I always use the full path like this: php -q /home/byron/public_html/files/cron.php Only if your not able to test the script by clicking onto the url.
  19. I'm seeing your site ok. Refresh your browser's cache. I think Django still works on Stevie. Not sure what else though.
  20. I hope your right because I'm happy with the server loads now but check out the loads right before the outage which was May 6th. http://byrondallas.heliohost.org/server_load_may.php?page=3 They were a little higher than they are now. Seems we really stay remarkably low now. Regardless, it may not have anything to do with it, but thought it worth mentioning.
  21. Escalating to the root administrator. This must be a parked domain or an addon domain because I'm not seeing it in the database.
  22. Since I've never really gotten into any advanced php programming, that's probably why I never heard about this.
  23. Here's a better way to do it: <?php $images = glob("{*.jpg,*.JPG}", GLOB_BRACE); # shuffle array shuffle($images); # take one from the top $image = array_shift($images); # redirect to browser header("location:$image"); exit; ?> without redirecting to the browser (using imagick): <?php $images = glob("{*.jpg,*.JPG}", GLOB_BRACE); # shuffle array shuffle($images); # take one from the top $image = array_shift($images); header("Content-type: image/jpeg"); $img = new Imagick($image); echo $img; ?> btw, you code works fine if you remove all of that space. I tried this on my site without any errors: <?php error_reporting(0); header("Content-Type: image/jpg"); $d = scandir('.'); foreach($d as $f) if(substr($f,-4)==".jpg") $fs[] = $f; readFile($fs[rand(1,count($fs))-1]); ?> @Geoff: I've never read anywhere that it is good practice to omit the php closing tag. I'm not saying your wrong, but could you provide documentation to this? EDIT: Nevermind Geoff, I did a search and found some arguments about leaving off the php closing tag. I myself would rather just remove the white space to keep from getting the dreaded "headers already sent" error myself. http://activeblogging.com/info/can-you-lea...ur-source-code/
  24. Something I've noticed since the power outage is that the server load has been extremly low ALL the time. Most of the time under 6 or 7. It's never been that low since we had all of the users we have. http://byrondallas.heliohost.org/server_load.php Does that tell you anything? Could it be it's not returning the correct server load?
  25. @cl58tools: I went ahead and deleted his account before I saw your post. His last login was 3-13-11 I believe so I know it's been inactive for quite some time. he should be able to signup now without any problems.
×
×
  • Create New...