-
Posts
9153 -
Joined
-
Last visited
-
Days Won
146
Everything posted by Byron
-
I haven't seen any since djbob posted that it should be better now.
-
Help Needed for rewrite variable in config file
Byron replied to IDOXLR8's topic in Website Management and Coding
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 -
Help Needed for rewrite variable in config file
Byron replied to IDOXLR8's topic in Website Management and Coding
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 -
Help Needed for rewrite variable in config file
Byron replied to IDOXLR8's topic in Website Management and Coding
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); -
Help Needed for rewrite variable in config file
Byron replied to IDOXLR8's topic in Website Management and Coding
How about preg_replace? $sitename = preg_replace("@The James Boys@", "New Sitename", $sitename); -
Help Needed for rewrite variable in config file
Byron replied to IDOXLR8's topic in Website Management and Coding
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 -
It will delete itself within a month if you'll not login. Byron
-
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
-
How long does it take for an account to activate?
Byron replied to Queen Chrysse of Webcomics's topic in Questions
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 -
Try logging into your file manager like this and you should see .htaccess files: http://your-domain.heliohost.org:2082/fron...r=/public_html/
-
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?
-
Great news djbob and you've even got the Wizard posting again! Cheers, Byron
-
Great and it seems to be working fine now. Good to have you back! Byron
-
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
-
Great! Thanks for posting the script. Cheers, Byron
-
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
-
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
-
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
-
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
-
Here's a script that will search and destroy (unlink) any files you search for. I use it now to look for core files and delete them really quickly. What I do is enter core in the File: form and click Submit and see what comes up. If I'm happy with deleting those files I then hit my back button and check the check box and click Submit again and they're gone. http://byrondallas.heliohost.org/temp/serch-n-destroy.txt Oh and yea we were down this morning and afternoon.
-
Didn't work for me either and I uncommented the line in the congig file that allowed for scanning .txt files. This is what it said: Clean: /home/byron/public_html/test/eicar.com.txt and this is the fake virus http://byrondallas.heliohost.org/test/eicar.com.txt Maybe it knows it's fake?
-
It happens when the php goes down and someone makes a request for a php file on your site. It seems to be getting better lately. Just delete them when it happens. Cheers, Byron
-
Sure, I'm interested, btw, this should be a way to test it. http://www.eicar.org/anti_virus_test_file.htm I tried his test on an old host I was on a few years ago that had a virus scan as a cpanel option and it worked then.
-
This problem seems to be getting better. If you want your site to email you when this happens or when you have any 500 error read this topic. http://www.helionet.org/index/index.php?showtopic=4140
-
I see were back up and running again after http failed. I was hoping the imagick class would get built back into the php, but alas it didn't Is there anyway you could restore the imagick class djbob? My site use allot of imagick. http://byrondallas.heliohost.org/php/tools/index.php Thanks, Byron
