Jump to content

garyed

Members
  • Posts

    143
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

garyed's Achievements

Regular Member

Regular Member (3/5)

1

Reputation

  1. It's a calculation program that defaults to about 50 inputs but if the user chooses, it can go up to 1,000 inputs.
  2. That seems like a great idea. I wish I had done that before building my site. I've can have as much as 1,000 variables on one page so it's going to be a lot of work no matter what I do now. Thanks again for the ideas
  3. I've tried these two options & they seem to work OK. The null option works better if I'm using the variable for any mathematical calculations. Is there anything wrong with declaring all variables that might be used in a form with the null fallback value as I did below? $var=$_POST['var']; ?? ''; $var=$_POST['var']; ?? null;
  4. "Now I see", says the blind man Thanks for the explanation. Now it looks like the only problem I'll have to be careful about is not having this type of universal fix to affect my sessions too.
  5. I really appreciate the ideas but I have to admit that I don't understand the examples. I have no idea what the : ?? 'Guest'; does or even means. I am actually learning as I'm going, sort of on an as needed basis. Things that may seem obvious to the experienced programmer, are not obvious to me. I'm going to do a little testing with some of this stuff & see if i can make it work.
  6. On pages where there are only a few variables I've tried : if (!isset($_POST['var1'])) { $var1=""; } else { $var1=$_POST['var1']; } That works but I don't want to have to do that with every variable.
  7. I have a lot form variables where I'm having the errors show up since I updated my php version on my webhost server. Since I have well over 100 variables, it's going to take a lot of time to correct them so i just disabled errors for now in the php.ini file to keep things working. I was wondering that since form variables are in kept an array, if there isn't an easy way to have them all initiated when the page loads. I think that would solve the majority of the errors & there wouldn't be that many left. Any ideas appreciated?
  8. Update, I decided to uninstall my LAMP server & reinstall it to see if that would fix anything & sure enough, it did. I'm not sure what happened to only effect two directories but they are working fine since I reinstalled Apache. Anyways, thanks for all the ideas.
  9. I think I'm going to take your advice & close down port 80 until I can figure out what is going on. I wanted to be able to remotely access my work & I've also been tinkering with the idea of hosting my own website so I've been playing around with this for quite a while. My port has been open for a few years & I've never had any problem until now. It all started when I forwarded one of my domain names to my computer as an experiment about a week or two ago. I used a php password protected index page with a mysql database to see if I had any visitors. When I realized it wasn't a good idea, I got rid of the domain name thing but I was still getting visitors. Then I added the .htaccess file with a password. I'm not sure exactly when my directories started having the problem but I'm sure it wasn't until after I forwarded my domain name. It might have started when I added the .htaccess file & changed some configuration files but I can't be sure. If my whole site was down then I would think it would have to do with something I did, but having just two directories down doesn't make sense.
  10. Did you get to the login page? If you did, did you get to any of the site at all?
  11. Yes, I have quite a few different web sites & each site has its own directory. I use my Apache server to design the pages & test them before i upload them to my web host. So I can either just go to localhost from my browser or type in my ip address to view all my sites & pages. There's only two sites & pages on two separate directories along with their sub directories that I get the error & all the other sites & pages in about 40 other directories work fine. The path is fine & that's why i'm wondering if I've been attacked. I'm running Apache on Ubuntu Linux.
  12. I assume Apache has to be running because 90% of my server site is working & it's only two directories that I'm having the problem with. I created a new directory & copied the index file & the background image from one of the directories that wasn't working into it & it works OK except the background image doesn't work. If I type the url of the image file I get the same error but if I put another image file I don't get the error. It's like something has happened to some of the files in those two directories. I'm at a complete loss.
  13. For a couple days I experimented with hosting my own site by routing a domain name to my computer. I didn't really want any outside traffic but i found i was getting a few visitors & i didn't have confidence in my password security. So i decided to unlink the domain name so at least someone would have to use my ip address to get to my site. I found that I was still getting a few visitors each day so I decided to use a password through .htaccess which was on of the suggestions I got from another thread. Everything seemed to be working fine & as far as I could tell no more visitors were getting in to my site. Now I find that two of my directories will not work through either browser, Chrome or Firefox. When I go to localhost to work on my site & to those two directories I just get: " This site can’t be reached localhost refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED " I've checked permissions & can't find anything different than my other directories that do work. All my files are still there so I'm a little confused. I have plenty of other directories on my site still working. I have messed with some configuration files to get .htaccess password to work but I can't even remember what I did. I tried removing the .htaccess file but that didn't help either. Any ides?
  14. By doing the RewriteRule would that mean if I have any file in the root directory let's say called jimbo.php & someone typed in http://myipaddress/jimbo.php it would redirect them to index.php?
  15. Thanks, If I understand you right, it could either be done through the .htaccess file or else I would have to edit every page to look for the correct session variable that is passed from index.php when the correct password is entered. Assuming that is correct then .htaccess would be a better idea assuming it is reasonably secure. I don't do much other than surfing the web & doing my site on my server but I still don't like the idea of it being insecure.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.