Jump to content

Byron

Moderators
  • Posts

    9,153
  • Joined

  • Last visited

  • Days Won

    146

Everything posted by Byron

  1. Seems you've gotten the ftp back up and working, but now I have a new problem. Any perl files on my site that use a date format ie: use Date::Format; are giving me a 500 error now. All other perl files seem to be working ok.
  2. Right after you made this post I was able to login OK, but heliohost went down again and now I'm not even able to connect to the ftp at all. This page will tell you when I'm able to connect and login. http://byrondallas.heliohost.org/test/ftp_login.php I'll keep it up awhile until all is well.
  3. Redirect by day of the week: http://byrondallas.heliohost.org/php/redirect_by_weekday.txt
  4. After this last down time I can't login to my ftp. It says my password isn't valid anymore. I've been using the same password that I login to cpanel and it's always worked in the past without me setting up a password in my ftp manager. Should I just go and try to fix it at my cpanel ftp manager or is this something that you (djbob) need to fix? Thanks, Byron
  5. Post your php snippets or links to examples here: Here is a bunch of good snippets: http://www.phpro.org/examples/
  6. This will get you to your cpanel login: http://mhf2.heliohost.org:2082/
  7. I haven't seen any since djbob posted that it should be better now.
  8. Glad you finally came up with something. Sorry I wasn't more of help, but I never was really sure exactly what you were trying to do so I was just suggesting simple fixes for what I did understand. Cheers, Byron
  9. Boy Heliohost is really SLOW today! Shouldn't your array look more like this? http://byrondallas.heliohost.org/test/array_test.txt http://byrondallas.heliohost.org/test/array_test.php
  10. See if this helps you any. This will open a file and get it's contents, then search for 'whatever' and replace it with 'whatever' and put the contents back. $file = "config.php"; # open the file to get existing content $current = file_get_contents($file); # search and replace $fp = preg_replace("@The James Boys@", "$new_site_name", $current); # write the contents back to the file file_put_contents($file, $fp); or your way (fopen, fread, fwrite): # open file for reading and changing $filename = "config.php"; $file = fopen($filename, "r"); $contents = fread($file, filesize($filename)); $newcontents = preg_replace("@The James Boys@", "$new_site_name", $contents); fclose($file); # rewrite new file with changes $file = fopen($filename, "w"); fwrite($file, $newcontents); fclose($file);
  11. How about preg_replace? $sitename = preg_replace("@The James Boys@", "New Sitename", $sitename);
  12. I'm not real clear on what your problem is and my suggestion may be way off, but if your talking about what your writing to your config.php in this line: @ $fp = fopen("config.php", "a"); then "a" is why your appending. See if this helps you out? http://byrondallas.heliohost.org/php/101/file_writing.txt EDIT: btw, here's a little better way of writing to a file: http://us3.php.net/manual/en/function.file-put-contents.php
  13. It will delete itself within a month if you'll not login. Byron
  14. Sorry to hear you've refused such a great host. I don't think you can find another host that's any better for free. If you'll just not login to your account for one month, it will delete itself. Cheers, Byron
  15. Did you receive your confirmation email? I think you should be able to login after 24 hrs. If you still can't login today then make another post in Customer Service. Cheers, Byron
  16. Try logging into your file manager like this and you should see .htaccess files: http://your-domain.heliohost.org:2082/fron...r=/public_html/
  17. Byron

    I'm back again

    Good mornin! Yea it's been slow for me too. I just checked the server load (7:30est) and it was 28.08. I wonder if djbob is still testing the limits?
  18. Byron

    I'm back again

    Great news djbob and you've even got the Wizard posting again! Cheers, Byron
  19. Great and it seems to be working fine now. Good to have you back! Byron
  20. While we are on the subject of Zips. Here's a tool written in php that will show you the files in a zip without opening it first. http://byrondallas.heliohost.org/temp/read_zip.txt Cheers, Byron
  21. Great! Thanks for posting the script. Cheers, Byron
  22. Evidently djbob still cares because we still have our free web space, but it seems he just isn't active in the forum anymore. If he would start posting more this group would be come back alive again and start generating him more money. Cheers, Byron
  23. Use this perl script instead. I found out later after much testing that Zip Archives doesn't copy file permissions and all files get reverted back to 644 even if they where 755. I didn't write this script but it works really well. Upload this to your ROOT directory and chmod 755 and give it a .pl or .cgi extension. http://byrondallas.heliohost.org/temp/backup_zip.txt You couild actually run this in any directory but if it's not in the root then you have to give the directory path the full path: ie: /home/byron/public_html/cgi-bin in the root directory you just give it the simple folder path. ie: cgi-bin
  24. I wrote this into a form so all you have to do is enter the simple folder path (ie: cgi-bin or images) and click "Create Zip". Just upload this text file to any directory and give it a .php extension. http://byrondallas.heliohost.org/temp/zip_archive.txt This tool will create a zipped copy of the directory you enter inside the form and output it in the directory it's run in. Leaves your original directory as it was. Cheers, Byron edit: Use this instead (see post below) http://byrondallas.heliohost.org/temp/backup_zip.txt
  25. For all of those who are familiar with .htaccess. Here's a way to protect ALL files on your site that begin with 'private'. Add the code below to your root directory's .htaccess file. AuthType Basic AuthName "Restricted Access" AuthUserFile "/home/user/.htpasswds/public_html/passwd" <Files ~ "^(private).*$"> require valid-user </Files> # protect another file called info.php <Files "info.php"> require valid-user </Files> Here's a way to protect multible files: <FilesMatch "^(exec|env|private|phpinfo).*$"> AuthName "Restricted Access" AuthType basic AuthUserFile "/home/user/.htpasswds/public_html/passwd" Require valid-user </FilesMatch> The easiest way to set this up is to use the cpanel option to protect your public_html folder for password protection and then go back and edit the code to what I posted so all of your public_html folder doesn't reqire a password. Cheers, Byron
×
×
  • Create New...