Jump to content

JohnnyDoomo

Members
  • Posts

    61
  • Joined

  • Last visited

Posts posted by JohnnyDoomo

  1. Thank you for your info.

     

    I will hunt down those last two files and see if anything relevant is in them.

     

    I have never used Frontpage while developing this site, but I had used it many years ago. I'm beginning to wonder if my host put these lines in there, perhaps maybe not even knowing what exactly they would do, or forgot to remove them when they didn't resolve the problem at hand.

  2. Do I need to be concerned about any of these lines in my .htaccess file?

     

    # -FrontPage-

     

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

     

    <Limit GET POST>

    order deny,allow

    deny from all

    allow from all

    </Limit>

    <Limit PUT DELETE>

    order deny,allow

    deny from all

    </Limit>

    AuthName domain.com

    AuthUserFile /home/domain/public_html/_vti_pvt/service.pwd

    AuthGroupFile /home/domain/public_html/_vti_pvt/service.grp

     

    If it makes any difference, my site is a proxy service, and for the past few months my server has had regular spiked loads of 23 and higher. I found the above code in my htaccess file when trying to figure out the reason for the high load. (traffic stats don't seem to point to the load being caused by legit traffic.)

     

    Thanks for any help on shedding some light on what those lines do, and if I should leave them alone, or simply remove them.

  3. I don't know if this is beyond the scope of asking for free, but if it falls into the freelancer forum, then please move it.

     

    Sorta long story, but I need to give a little background of what I'm looking for. I have some websites and it seems as though "hackers" have found them and are constantly trying to take them down through finding exploits, or DDOS and plain old hammering the servers.

     

    What I'm looking for is a php script that writes visitors ip addresses to a text file, and if it already exists in the text file, it writes it out with how many times it's a duplicate: 5 | 255.255.255.255

     

    Then it also needs to organize the ips in the text file from most popular ip addresses first.

     

    Then on a separate page I want to be able to have a readout that displays the top 10 popular ip addresses and how many times they've been caught hitting the site for the last 24 hours.

     

    The files need to reset themselves so they don't get too large, or take a lot of time to process.

     

    Basically I want these text files being generated on all my websites, and the ability to call them all from iframes into a single page, so I can check a single page and see if any of my sites are being exploited by having a quick look at the top ip addresses hitting the sites.

     

    If something like this is out of the scope of free, I'd be interested in getting contacts from programmers of how much something like this might cost.

     

    If people here have better suggestions on how to keep an eye on my multiple domains all from a single page, I'm interested in hearing your ideas. This is a simple and hopefully pretty inexpensive way of at least watching if an attack is coming from a single or a few ip addresses.

     

    I chose text file storage because I want them stored on their individual servers, and only called up when I access the main page that shows the top 10 from each domain. I also didn't want stats to not be accessible because one of the servers was getting hammered. I'm unsure about the amount of data and if it will still work (fast) with only text files, but I wanted to keep this as simple as possible to cut costs, and make it easy to distribute across my domains. If a programmer recommended mysql database, I would consider it, but I understand at that level this is likely far outside of free.

     

    If anybody knows of a script that can do what I'm considering here, I'd love to get a link to it or if you've created something similar.

     

    As I finish writing this, I would also be open if somebody was willing to start free, and wanted to only do certain features for a paid amount. I'm open to paying, but I need set price quotes if that's the case.

     

    One last note, if this somehow turns into a paid job, I would be interested in quotes on a few more features, add IPs to ignore list, receiving an email if an ip was duplicated so many times, more tracking than just the latest 24 hours, and for the script to go and edit my .htaccess file and auto ban the ip address that has been duplicated a given amount of times within a given timeframe.

     

    Thanks for any help or contacts on this matter. I'm looking forward to getting a type of "ban hammer" control panel up and running for me to use with my sites.

  4. I currently run 3 servers with CentOS and cpanel/WHM at a host.

     

    I am looking to begin hosting a new server myself. While this server won't contain large sites just yet, it may at some point. (Which I'm not sure if that makes a difference on what is recommended?)

     

    I recently found out that there is a decent yearly price tag attached to WHM if you want it to power your server, and since I'm just starting this out, I really didn't want to test with that just yet, unless I find nothing comparable.

     

    Can an experienced person give me the layers of software I'm going to need to get started at minimal to no cost (software wise)? I have the hardware, and I've heard terms thrown around like apache, CentOS, WHM, etc., but I have no idea, what is sitting ontop of which program, or which is a "module" to which.

     

    Can somebody perhaps name the programs and their order that I will need them in? I am not looking for completely free, if it's going to be crap or unsecure though as I'd like it to be more than just a learning server, and would at some point to use the same system and the OS/"panel" that I've learned to have a production site on it.

     

    I'm wondering if cpanel/WHM is the way to go, and actually IS the place I should be starting, and progress upwards from it, even though it has the pricetag it does?

     

    I know I need something Linux based, and hopefully built for speed. My current host has my 3 servers on nGinx, which from my understanding is a slimed down part of the needed softwares to help the server handle well, and perhaps run better under a higher load. I need to be able to run php, and hopefully not have all the backend software to difficult to learn (IE: GUI and not command based).

     

    On a side note, can somebody tell me that if it's Linux based, if that means that it's possible to clone the hard drive, and have it duplicated in another server, even if the hardware differs from the original? This is a feature that is low on my list, but if it's possible, it would be nice to know in advance that it can be duplicated without having to redo all the setup work all over again.

     

    If anybody can take the time to help me out with where I should get started, that would be a great help, thanks.

  5. Can somebody help me with this, I'm not a programmer and am simply looking to get items pulled that are random, but I want them only from the last so many days.

     

    I currently have this:

     

    $res = ppmysql_query("SELECT * FROM {$Globals['pp_db_prefix']}photos WHERE approved=1 AND cat IN (501,502,511,503,562,504,506,505,508,2,510,509) ORDER BY rand() LIMIT 30", $link);
    

     

    which pulls from my proper categories, and gives me random results, but they are random and some of the results are from years ago. I want the same thing, but I want results that are within the last 10 or 30 so days.

     

    Can somebody help me with this?

     

    After searching, it looks like people don't recommend the rand() as "it doesn't scale well", but it's what I have at the moment, and I'm stuck with it until I can afford a programmer to go through my entire code.

     

    It just need it so that the way it's currently being done, is left intact, even tho there maybe better ways of doing it, but I need results to only be within a few days timeframe.

     

    Thanks for any help you provide me, I'm thinking it's something super simple added to that line.

  6. I have this code in a javascript and I am trying to make a change to it.

     

    function nicetime(a,out){
    	var c = a.length > 1 ? a : new Date;
    	var d = Math.floor(parseInt((c.getTime() - a) / 1e3),10);
    		d = d < 0 ? d + -(c.getTimezoneOffset()*60) : d ;
    		if(out == 0){
    			var chunks = new Array();
    				chunks[0] = [60 * 60 * 24 * 365 , 'year'];
    				chunks[1] = [60 * 60 * 24 * 30 , 'month'];
    				chunks[2] = [60 * 60 * 24 * 7, 'week'];
    				chunks[3] = [60 * 60 * 24 , 'day'];
    				chunks[4] = [60 * 60 , 'hr'];
    				chunks[5] = [60 , 'min'];
    				var i = 0;
    				var j = chunks.length;
    				for (i = 0; i < j; i++) {
    					s = chunks[i][0];
    					n = chunks[i][1];
    					if ((xj = Math.floor(d / s)) != 0)
    						break;
    				}
    				val = xj == 1 ? '1 '+n : xj+' '+n+'s';
    				if (i + 1 < j) {
    					s2 = chunks[i + 1][0];
    					n2 = chunks[i + 1][1];
    					if ( ((xj2 = Math.floor((d - (s * xj)) / s2)) != 0) )
    						val += (xj2 == 1) ? ' + 1 '+n2 : ' + '+xj2+' '+n2+'s';
    				}
    				val += ' ago';
    				return val;
    		} else {
    			return d;
    		}
            }
    

     

    I am not a coder, but I am trying to get it so that if it's going to display a date that has a year in it, instead of doing what it's currently doing (Showing a date of "-1 years + 12 months ago") is says something like "Now" or "5 Minutes ago".

     

    For some reason the above code is showing the "-1 years + 12 months ago" on the latest additions using the script.

     

    I am looking for a patch to simply replace it if it is going to display the year date, or if you see why the code is displaying the "-1 years + 12 months ago" in the first place on the most recent items the script is showing the date for, and can fix it that would be appreciated.

     

    Thanks for any help you can provide.

  7. I almost posted this in the freelancing forum, because I am looking for it to be created, but I first needed more info on what a coder would need to know about the project.

     

    I have a script that is designed for a single person, and I want a coder to design it to become an online service with user registration, etc.

     

    I'm weary of posting publicly the details about what the script does, but is something like that needed in order for a php programmer to take on a job? Could something like that be left out, until actually giving the coder the job?

     

    Do I have to give at least a vague idea of what the script does?

     

    I don't understand enough about what a programmer would need to know, but at the same time, I don't want to reveal my idea either.

     

    Can somebody help me on how much I am going to need to reveal?

     

    Thanks.

  8. I am trying to use this url shortener that works like this

     

    http://lil2u.com/?module=ShortURL&file=Add&mode=API&url=http://www.websitename.com/blah/

     

    However, when I add that in my input field, it displays the exact api line, and my url, instead of processing it, and showing short url that it is suppose to generate.

     

    I'm sure this is a really noobie quesiton, but I've searching for the answer and either it's so base level knowledge, there isn't anything, or I'm searching for the wrong terms.

     

    I just want it so that an input field is shown on the page, and in it is the short url for that page. I already have the means of generating my current url, but I don't know how to get the api to process it, and only show the shortened url in the input field.

     

    Can anybody help me with how I go about doing this.

     

    Thanks for any help.

  9. I am trying to get an htaccess file to block users from looking at files.

     

    If I even password protect the folder, the script that needs those files fails.

     

    I have used "Options -Indexes" on the main htaccess, but this still allows somebody to type in the exact file name and view it's contents.

     

    I'm not sure if my server is configured wrong or what. I just need the htaccess to block USER access to any file with a .x extention, while still allowing the server and scripts to access it. I'm trying to say away from having to include the servers ip address, but I'm not sure if that's the whole way around.

     

    Here's what I currently have

     

    <Files ~ "\.x$"> 
    order allow,deny
    allow from localhost
    deny from all
    </Files>
    

     

    Any help would be appreciated, thanks.

  10. I need something that won't be directing visitors to dead pages though. I just assumed that the pinging of websites through php and the ping I do at a command prompt would be similar, as my ping at a command prompt knows when I am trying to ping a dead domain.

     

    It will probably need something that runs a whois on the picked domains, or something to ensure that they are still active websites, and have not been abandoned.

     

    I'm assuming anything at this depth is farther than you are willing to code for free?

     

    In my mind, I need it so that I'm not redirecting users to dead pages. If slow pages can't get passed the random redirection, I don't want dead pages to make it through.

     

    Do you think this would only require a little bit more coding, or would what I'm looking for be a lot more coding to check if a website actually is serving a web page at its domain? (If you have a better idea of how to check and if you'd like to price quote it, give me a figure.)

     

    Thanks again for your help. I'm sure I can use what you've written, and I may have to have it tweaked by somebody more knowledgeable than me, but it's an excellent start for what I have planned.

  11. hmm, when I test with a complete list of fake domains, I get sent to one of the fake domains that's a dead page.

     

    Also, after the line that reads

     

    header('Location: http://'.$fastest_domain); // can't be anything sent to the web browser before this

     

    I add echo 'Redirecting...'; just like how you have the line echo if a domain isn't found, and I don't see anything saying "Redirecting...".

     

    Did I do something wrong?

     

     

  12. When I talked more with my host, they said that this is the query that needs to be optimized:

     

    | 229 | clipup_clipper | localhost | clipup_newclip | Query  | 2    | Sending data | SELECT userid,date,photo FROM pp_ipcache WHERE ipaddr='165.152.14.81' AND type='view' AND photo=45042 |

     

    I don't know if that's enough data, but if someone was able to tell me what that query is specifically doing, my script has an admin control panel that I might be able to turn off the feature that is causing the issue.

     

    If it is not, does this data look like it's enough to have a programmer optimize my mysql database without the php files, or from that query, would the programmer need the php files as well? (or is it not enough data to tell that either?)

     

    I would like to not give a programmer a complete backend if at all possible, as I try to get my problem fixed.

     

    Thanks for any help!

  13. It looks like it's working now, but I did notice that it doesn't like domains in the format of google.com or www.google.com. Only http://google.com and http://www.google.com format seem to work.

     

    If I wanted it to sit on the page before redirecting the user for 2 seconds with a message that simply says "Redirecting...", could you include that? I would normally have an idea about how to do this, but with all the other stuff going on and in php I have no idea where to even start.

     

    Thanks for creating this little script, it will really help me out quite a bit. I don't know coding, but I am still amazed that you wrote it so quickly. I do still need to test it with some known bum domains to test it, but maybe you already did that?

     

    Thanks again!

  14. Is there more I need to add to this to get it to do the actual redirecting?

     

    I try it, and all I get is a white page.

     

    My domains.txt file is structured like this:

     

    http://google.com

    http://yahoo.com

    http://apple.com

     

    When I uncomment the $domains line, I get a read out of the text file that looks like this:

     

    Array ( [0] => http://google.com [1] => http://yahoo.com [2] => http://apple.com )

     

    Did I do something wrong, or do I need to do more to get the actual redirection to work?

     

    Thanks again for your help!

  15. I would prefer it to just be a text file. I am not a programmer, though I do know how to create a mysql database with a user that has access to it, and I can insert a chunk of code for a query to create the needed tables.

     

    I would say if I am paying for something I would want it in a text file, but if you would be willing to create this for free, I would be more than happy to accept whichever backend you decide, but I would need instructions on what to run on the empty database to create the required tables.

     

    You're right on the script could constantly pick slow or dead domains.

     

    If you want to get fancy, it could always have groups of known slow domains, and once they are pinged a certain amount of times and are dead or over a certain ping response, it removes them from the main list of domains to check.

     

    I was trying to keep it simple, in the hopes that I could get it free, or at a cheap cost, but even at low price with some of these features I would be willing to pay, though if I were to pay, I may have a request or two to make, or at least questions on how much it would increase the cost.

     

    If the script can modify the text file and move the domains from it to another text file if they've been removed, that would be cool. So the text files functioned like a database, but without all the trouble (speed?) of a mysql database.

     

    Again, I'm not a programmer, so I don't really know if asking for this to function out of text files would have other side effects to the script, like slowness, CPU load, etc. I am interested in the script though, either way.

     

    Thoughts?

  16. Yes, that is showing you that the query in question, scans the entire table, reading 44310 rows, even though you provide a list of categories, and there is an index on cat that *could* be used.  This could be a low cardinality issue, or the choice of the optimizer.  Although you aren't in a position to do much else, you can and should run analyze on your tables, on the off chance that the statistics being used by the query optimizer have gotten stale, and the db is making bad decisions to not use certain indexes that could help.

     

    Doing database analysis and query optimization is something that requires a technical understanding of the application code, as well as how to read and understand explain plans.

     

    With that said, a database that is not overly large will run well, albeit in a non-optimized fashion, if the server has been resourced and configured adequately.  In the scheme of things, tablescanning 44k rows, while to be avoided if possible, is not something that should be that big of an issue.  You are running apparently on a shared host where the database resources being allocated might not be sufficient to run your system. 

     

    Again however, you need a pro to help you go through your system, looking at some of the things being discussed (slow query log, report from the hosting company, explain on the individual queries, analysis of the database schema, indexes and queries being executed) if you are interested in having a performant system, that uses resources competently.    Unfortunately there is no magic button (other than analyze) you can push.

     

     

     

    Thank you for your reply.

     

    I don't know that this makes any difference to your comments, but I am on a dedicated server, I just haven't upgraded it... ever. (2.33 Dual core, 2GB memory).

     

    I'm assuming having a programmer optimize my code, would be better than upgrading the server, if I can only do one or the other? (I do have plans to upgrade the server, but at current, I can only afford one way or the other.) If I did upgrade the server though, it would be able to be upgraded to a i7-3820 CPU @ 3.60GHz (quadcore) with 16GB of ram.

  17. Nothing fancy, I am just looking for a simple php script that would check a text file on my server that has a bunch of domains in it. I want the script to ping a random 5 or 10 sites in the list, and then redirects the visitor to the fastest one, or at least one that responds, and is not down. If all that are checked are down, then it would need to recheck the list.

     

    I want it to pick random domains out of the list, as I don't want users directed to the same site(s) all the time, just because it pings the best.

     

    When I say ping, I am talking about making sure the user isn't directed to a website that is down, or a slow loading website. I am not sure if "ping" is the correct word for that tho?

     

    Can anybody offer me code like this for free, or is this type of request getting into something that would need to be paid code? (and if so, any idea how much? I didn't post this in the freelancing forum, because it sounds like it might be something simple to code.

     

    I am not a coder, so I am looking for something complete that I can add to a php file and it works.

     

    Thanks for any code, pointers/problems with this idea, or price quotes (if necessary) on this little script I am looking for.

  18. For all we know you could be storing image data in your database and the site is an image hosting site ...

     

    LOL, I just reviewed your previous thread, which I'm assuming is this same problem. There were a lot of references to images/photos in the queries you posted.

     

    The advice here is the same as your last thread - "You should get a programmer to go through everything."

     

    You don't have the knowledge or skills to find the problem, let along pin down the many possibilities to one specific area or to fix it once it has been identified. In that last thread, a suggestion was given to do an EXPLAIN query on one of the queries. Did you even accomplish that?

     

    Strange, I never got an email or perhaps I just missed it, that any new reply was on any of my previous threads. I have replied to that thread, however, with the "explain" details. I've also requested from my host the "slow_query_log". Sorry for the two posts asking nearly the same questions. I never saw that one was waiting for a reply from me.

  19. There might be a couple easy things you can do.

     

    Find the place that phpMyAdmin lets you run queries and enter

    EXPLAIN SELECT * FROM pp_photos WHERE approved=1 AND cat IN (501,511,502,503,562,504,506,505,508,2,510,509)

    What do you get?

     

    This is what I got when I ran that: http://www.dumpt.com/img/viewer.php?file=zphc1qi75qx2ztuy82s7.gif

     

    Does that give you anything? I can see that it looks like it's pointing out that I have a lot of entries in my database, but that's all I can tell from it.

     

    Anything else I should be concerned about here?

  20. I am not a programmer and have no idea what this would entail.

     

    Am I looking at an expensive programmer cost?

     

    Is it possible to send just my mysql database to someone to look at, or do they need everything that powers the site, like the php files as well? I ask because I'm concerned about sending my whole site backend to someone.

     

    Are there factors that all this depends on?

     

    My server load is hitting 20 and sometimes even 30 daily, yet it's a small visited, but growing in content site, but I'm not sure if someone is "attacking" or exploiting my site because the problem seemed to happen almost suddenly, and since it's a small site, I kind of don't think this should be happening.

     

    It seems like I almost have to beg my host to check on anything concerning this issue, as they are adamant about either the server needing upgraded, and/or getting a programmer to optimize my database. IS there anything I can tell them to check on so that I could find out if somebody is exploiting my site?

     

    I've talked to them about optimizing the mysql config, but they seem to almost ignore me, when I mention specific things I've read in articles on the internet that should be optimized. All they continue to say is that they've "finetuned" and "tweaked" mysql.

     

    Thanks for any help people can provide me with on these questions.

×
×
  • 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.