Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. Hehe, thanks. I think I had about 1200 on the old mysqlfreaks.com board (RIP).
  2. Well, here is the line in question: $lists[$i]->text = $params->get('showtitloc', 0 ) ? $row->title : htmlspecialchars( $row->venue, ENT_COMPAT, 'UTF-8' ); So if you just want to omit that behavior remove the if-then-else behavior of the ( ? : ). Change that line to this, as an example. $lists[$i]->text = $row->title . ' - ' . htmlspecialchars( $row->venue, ENT_COMPAT, 'UTF-8' );
  3. Shhshshhh -- the post farmers aren't spossed to know about that.
  4. Well, your bottom query is totally different from the top one. Needless to say, the bottom one will be as slow as the number of row_id's it has to churn through, and it will get slower and slower because you are -probably table scanning the entire syslog table, since I'm going to assume that the table_name has low cardinality in the syslog table, -- then grouping (a temp table probably) --- then passing the entire list of row_id's in the correlated subquery back to the main query -returning a lot of rows While I can surmise this is some sort of generic logging system, I don't know what the significance of row_id is, although again I can surmise that it's the primary key of the table in question. Last but not least, I don't know what you are trying to get out of the query. Is this suppossed to list just the last few transactions? Some number of transactions? Hard to say, without a clear requirement from you.
  5. I believe the board was modified to remove them for normal members, because they encouraged post count farming. You'd have to ask Daniel about that, since I think he implemented the mod. I am able to see the post counts
  6. Hey one more note, please try and use the code or php bbcode tags around your code. [code=php:0] [/code]
  7. Well, this is my 2500th post (again), at phpfreaks. In the many board reshuffles, I lost a good 1000 or so posts, but heck who's counting? If anyone wants to buy me some beers, I'm very willing to drink them. My answers are so much more creative when I have had a six pack Paypal your cash to gizmo (AT) gizmola (DOT) (COM) 8) 8) 8) 8)
  8. The bottom line is that the smtp server they gave you, is treating the mail coming from your server as foreign, and will not allow your server to relay mail from it. The notices are probably coming from this line: if ($_GET["mail_$x"]) because the prior loop attempts to access the checkbox GET params of 'mail_#' without knowing that the index exists. In fact, the entire premise looks erroneous to me, since the count() of elements in the $_GET has no correlation to the items that are checked. The way checkbox forms work, is that you'll get a $_GET param if the item is checked. Let's say you have 50 people in your list and you check # 50 which has the name of 'mail_50'. The count() of $_GET params is going to be way less than 50, so that will never be processed. A better solution to this is to use the array_keys() function to get the list of all the keys in the $_GET() and foreach() through that list looking for ones that match the 'mail_' pattern, to process.
  9. Wow that is one moldy tutorial. It uses addslashes and stripslashes instead of mysql_real_escape_string. You are waaay off base with what you're doing. To tell you how to fix it entirely, i'd need to understand more about what the folder value is. Is this a new column you added to the Users table? If so, you'd simply add that as a param to this method, and to the insert. Needless to say your current code won't work, not only because of the numerous syntax errors and misunderstanding of $this->, but also because if you look at what you're doing -- how could you attempt to update a value in a row, where you haven't even inserted the row for the user yet?
  10. There's nothing more I can say about it. Spammers provide plenty of examples of how to avoid spam filters. It's not something I attempt to help facilitate.
  11. FYI, that is not a "random string". You are taking only a portion of a hash, so there's a strong possibility you will have duplicates.. You might try writing a test program to spit out a few thousand variations and make sure you don't have colisions -- assuming that you care about that.
  12. There's no way you're going to achieve this without writing your own plugins. There is also no browser plugin api standard. In both cases you need a plugin of some sort. If it's IE, then you can write your own activex control -- or whatever the equivalent tech is called these days.
  13. Yes, this was assumed. Ok, so you hopefully have your answer. Big ISP's expect valid reverse dns, and SPF entries. SPF is done in the DNS entries for the domain. Yahoo has been pushing their own key based system, known as DKIM, but I don't know too many people using it. There is also the actual content of the email, and depending on what it is -- your email will possibly end up in the spam filter anyways.
  14. The alternative is a switch statement. If you set up some arrays, you could also potentially use either the letter itself as an index into the array, or the letter's ord() value.
  15. Read the php manual section on php Session handling: http://us2.php.net/manual/en/book.session.php Alternatively, you could set this type of thing in a cookie.
  16. All an alias is -- as the name suggests is an alternative to using the full table name. MySQL supports a few different join syntaxes, so in this case I'll use a simple inner join specified in the WHERE clause to illustrate. SELECT foo.id, foo.name, bar.id, bar.name FROM foo, bar WHERE bar.id = foo.bar_id This is exactly the same, only using aliases: SELECT f.id, f.name, b.id, b.name FROM foo f, bar b WHERE b.id = f.bar_id Technically, you only need to prefix the table name where there is ambiguity. In the example, I assume that table foo and bar both have columns named id and name. This is ambiguous, so if I specified "SELECT id", I'd get an error because mysql doesn't know which id column (foo.id or bar.id) I want. However, we'll assume that bar_id only exists in table foo, and is a foreign key from the bar table. That would not be ambigous, so I don't technically need to specify the table prefix of foo, as mysql knows all the columns that exist in the 2 tables. I could thus, write the query this way and it will still work. SELECT f.id, f.name, b.id, b.name FROM foo f, bar b WHERE b.id = bar_id
  17. What you're doing doesn't make sense. When you group rows together, you in essence reduce multiple rows to single rows. The dates at that point are unpredictable as are the values of any other columns. You could use a summary operator like this to handle the date, but I suspect that is not going to be what you are after. So for example, you could issue: select row_id, MAX(log_date) as max_log_date FROM syslog WHERE table_name = 'user_profile' GROUP BY row_id ORDER BY max_log_date desc And you will find the dates to be what you expect, but the actions column will not be predictable.
  18. You don't need the aliases. All the "part a" does is create an alias for part, that you can use rather than having to specify the full table name. Because you only have one table, there is no possible ambiguity, and thus no need for prefixing columns with the table name. That is used when you have multiple tables, in the cases where you are joining them together.
  19. So when a spammer comes to your site and puts in his ads for viagra and sends them to me, that's something you want to help him with? Even if you were to take the steps needed to avoid the issues you are having (your mail server IP better have a valid reverse DNS entry, and Google SPF for a start), all it is going to take is a few people using your "remailer" to send a few pieces of spam, and fairly soon thereafter, you will be on RBL's everywhere. When that happens you'll probably get the entire IP block on the RBL list, and people who have the misfortune to be hosted by the same ISP will end up having their mail RBL's as well. Hurray! In other words -- all you will ultimately end up achieving is getting yourself kicked off your ISP, and making your own life and the life of others miserable. Sorry to be blunt, but the facts are the facts, and naivety in the area endangers the service levels not only of yourself, but those who share your IP block, in many cases.
  20. So your goal is either to facilitate spam or send spam yourself?
  21. The answer is -- you can. There is nothing inherently wrong with the lines of code you provided. We can't see if and when you actually issue the query, or if there's an error. If there is, perhaps that is the problem, and you should be catching that from the mysql_error() code. The other thing I wonder about is why you are running strip_tags? Whether or not someone includes html tags in their password or not shoudl be irrelevant -- you aren't storing that, you're storing the md5() version of it. strip_tags() is unnecessary here.
  22. The setting should be there already, and you should only need to edit it. Perhaps you need to change the IIS setting that allows you to change it while the server is running: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/1d1e5de4-fd63-40cd-bc5d-c20521548eed.mspx?mfr=true
  23. %SystemRoot%\System32\Inetsrv Needless to say, you have to open them as Administrator to change them.
  24. The settings I outlined are what control that behavior. From what I saw with IIS6, it's more likely the defaults are 4mb, but then again, I avoid IIS.
  25. So first a comment on terminology: A "hit" is generally understood to mean a request to the web server. Pages are made up of many requests. So the generally used term to mean "an entire page" is a "pageview". For logging there are many different ways to go. You can outsource things to google by signing up for google analytics and including their counter. This might be good enough for you, and the reporting is very flexible. The main knock against this is that it will probably undercount things, and it depends on google's servers, so if there's any latency issue that might be a problem. Also it depends on you adding their code in all your pages, which might be easy, or time consuming depending on how your site is constructed. So -- here's the ones that are primarily used: http://awstats.sourceforge.net/ http://www.mrunix.net/webalizer/ There is a php/mysql based hybrid analyzer you can run on your own server, but otherwise looks and acts a lot like google analytics. It's a lot prettier than awstats and webalizer, although it really isn't doing anything different than what they do. With that said, I do use an older version of it on my blog. http://piwik.org/ It has the same issues I raised about load, whereas webalizer and awstats work on the raw web logs of your server. In this case, both for completeness, and because you stated that you're a newbie, I thought I should include it for consideration. Out of the 3, all have setup issues associated with them, unless you're on a hosted server. In my experience most hosted servers offer awstats and/or webalizer out of the box. You just have to know where to look for them, and sometimes turn them on. Configuring either one can be quite an exercise unfortunately.
×
×
  • 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.