Jump to content

justsomeguy

Moderator
  • Posts

    31,575
  • Joined

  • Last visited

  • Days Won

    77

Posts posted by justsomeguy

  1. It should be safe to change this option.I'm not entirely sure how webservers execute PHP (and each host I'm sure can do it however they want), but changing this should not affect others on the shared host. For security risks, there is only a risk if you make the directory world-readable. Make sure that only your account can access it, not the anonymous web account. Also browse to the directory (in a web browser) and make sure it does not show the contents. If it does, you can always add an empty index.php.You need to change the option every time you use sessions, it will not carry over from one execution of PHP to the next. Each time PHP executes, it loads the options from php.ini, so you will have to change it each time. If you have an include file with configuration options that you use on every page, that would be a good place for it.

  2. Well, you can actually dynamically set where session info is stored. This is the ini option:session.save_pathYou can use the ini_get function to see the current value (ini_get("session.save_path")), and you can also use session_save_path to get/set this option:http://us2.php.net/manual/en/function.session-save-path.php (see the comments on that page as well)Just make sure you set the save path before any calls to session_start are made.

  3. Dan is correct, you are sending the javascript code before you send the actual page. You will want to send all of the page information, and display the javascript last (ideally, you will want the javascript to appear before the closing </body> tag, so you may need to indicate an error in message_rep.php, but have message.php or index.php check if an error occurred and actually send the javascript). This is the reason why both the page is blank and the content is misaligned - the browser doesn't know how to handle the javascript code coming first. If you want the popup over the page with the content already on it (not a blank page), send the page first, then send the javascript code.

  4. Hmm.. well, depending on what kind of access you have to the server, you could probably locate the directory where PHP is storing the session information (specified in php.ini), and simply delete all the files. You can go one step further, and get your own session ID, and delete all other files, so that you stay logged in. Of course, you can also just manually delete the files.

  5. I want to be able to destroy all sessions, even if they are not created by my own, but do only apply to my very own site. (so not accidentally also from the other webhosts users )
    I'm not quite sure I'm understanding correctly. I think though that you can only destroy sessions you have created, you don't have access to destroy a session that you haven't created.
  6. What you have:

    $query = "SELECT * FROM challanges WHERE (challanger = '$user' OR challanged = '$user') AND declined != '$user' ORDER BY id DESC";$result = mysql_query($query)or die(mysql_error());while($row = mysql_fetch_array($result)) {extract($row);echo "<a href='console.php?p=EditChallenges&cid=$id'>$challanger vs. $challanged</a> - $date<br>";}

    When you make the query, and start the while loop, you are using mysql_fetch_array, which results in $row[0], $row[1], $row[2], etc. If you want $row['id'], $row['challanger'] (btw, it's "challenger") you need to use mysql_fetch_assoc instead. Try this:

    $query = "SELECT * FROM challanges WHERE (challanger = '$user' OR challanged = '$user') AND declined != '$user' ORDER BY id DESC";$result = mysql_query($query)  or die(mysql_error());while($row = mysql_fetch_assoc($result)) {  extract($row);  echo "<a href=\"console.php?p=EditChallenges&cid={$id}\">{$challanger} vs. {$challanged}</a> - {$date}<br>";}

    You can also do this:

    $query = "SELECT * FROM challanges WHERE (challanger = '$user' OR challanged = '$user') AND declined != '$user' ORDER BY id DESC";$result = mysql_query($query)  or die(mysql_error());while($row = mysql_fetch_assoc($result)) {  echo "<a href=\"console.php?p=EditChallenges&cid={$row['id']}\">{$row['challanger']} vs. {$row['challanged']}</a> - {$row['date']}<br>";}

  7. You need a webserver to execute your PHP files and send the result to the browser. When you have your browser visit an address that ends in .php (like you are now), your browser asks the server for that PHP file. The server in turn executes the PHP code, and instead of sending your browser the PHP code, the server sends the browser what PHP tells it to.The easiest thing to do in your case, unless you want to install your own webserver for testing (Windows does include one you can use), and then install PHP on the server, is rent a server online (or find someone willing to let you use theirs). Here's a good host for $2/month:http://geekhosting.com/Then what you have to do is connect to the server through FTP, upload your PHP files, and visit them in your browser. If your site is called mysite.com, and your PHP file is page.php, you would FTP to mysite.com, upload page.php, and then in your browser visit http://mysite.com/page.php to see the result.

    Gahh, this is too hard, I will do ASP.

    ASP works the same way, except it only works on Microsoft servers. If you want to learn PHP well, I can recommend this book:http://www.oreilly.com/catalog/progphp/
  8. One thing you might try is to remove the </input> closing tag, it's not necessary. IE might be confused over that. If you are going for XHTML conformity, you can close the input tag like this:

    <input type="image"  name="msearchitem" src="butt_chairs.jpg" value="CHAIRS" />

  9. You probably want to ask hotmail about this. Also try copying and pasting the headers for an email you received (not the code, the headers that the actual email contains). You may need to reconfigure the mail server to send out different headers.

  10. You can use this function to bring all request variables into the global scope:http://www.php.net/manual/en/function.impo...t-variables.phpOnce you do that, you would have to use 'variable variables' to refer to the individual request variables:

    inport_request_variables("p", "varprefix_");$varname = "varprefix_" . $fileinfo[0];echo "the value of {$varname} is {$$varname}"; //note the double $ signs

    More on variable variables:http://www.php.net/manual/en/language.variables.variable.phpHowever, your example should still work. You should also be able to do this:

    $varname = $fileinfo[0];echo $_POST[$varname];

    If you are getting an array index error, you could try changing the error reporting in php.ini to not report those errors (the value would just be ""), or you can also check to see if the value has been set before using it:

    $varname = $fileinfo[0];if (isset($_POST[$varname])){  echo $_POST[$varname];}

    More on the isset function:http://www.php.net/manual/en/function.isset.php

  11. community don't know the email of guest for helpful contact
    That's the guest's problem, not the community's, or maybe they simply just want to remain anonymous.
    Before this topic goes any further...How old are you??? Do you have a job???
    I am 26. I have a BS in computer science from Arizona State, I hold a job working four 9 hour days per week (currently writing hardware simulation for a military project), and I also co-operate a home-based web development business out of my house on the 3 remaining days of the week, as well as nights. I also own my own house, and have built a porch, a garage, laid a wood floor, and painted the entire interior over the past 2 years. I'm not trying to be condescending here, but if your title is 'moderator', I would expect that you would indeed take the responsibility that comes with the title (and before you get angry at me, I'm not trying to imply that you aren't doing your job). I wasn't trying to imply anything else, but the replies I have gotten over the guest suggestion have mostly revolved around not wanting to deal with messages that require moderation.
    This was not said by any member of the moderating team or administration. This is not the message we are trying to send out. You are twisting what is being said to start an argument.
    No I'm not, I was replying directly to the author of the quote I referenced. I didn't make that clear, but I was. I'm only trying to give my reasons for why I think guest accounts should be allowed, and rebutting other people's reasons for not wanting them if I think the argument is incorrect.
    As for the DNS suggestion, isn't it easy to input just only "w3schools" and hit [Ctrl] + [ENTER]
    Yes, Opera will fill in the extra parts, but it requires a few extra seconds of waiting while it sends out the various DNS requests. Not a big deal, but my main reason for asking the DNS fix is so that I can simply refer people to "w3schools.com", and have the web site respond when they type that in.
    That's the dream, isn't it? But is it realistic?
    Of course not, that's why moderators are required. Which is why the requirements don't change for guest accounts, moderators are still required either way.
    I have to say I find it funny that you register here and accuse us of not actually moderating. What is the basis of this claim?
    Now I never made that claim or accusation, that's not the language that I used. I'm not trying to be offensive here, I apologize if I came off that way.The arguments against guest accounts have been:1) aspnetguy's argument to promote long-term involvement, which is a valid argument that I haven't argued against.2) an increase in spam will follow. I don't consider this argument valid, because a bot could already create an account and post a spam. There already is no spam protection and I haven't seen any spam (I haven't looked for it either, and I doubt any would be left regardless).3) leet-speak will follow. This argument is completely without logic. I fail to see how guest accounts and people who use leet-speak are related.Now this thread is completely off-topic from the point of the forum, so at this point I'll drop it. I didn't mean to ruffle any feathers, I was genuinely trying to suggest that it would be an improvement, I think it would encourage more people to seek help. If that's not the consensus, then I'll drop it.
  12. If guests post you will get people who are like|_| 9|_|¥2 ® ƒ462like serious hacker talk languge
    That's simply not true. The link I posted above is to a forum for a programmer's text editor, and the rules are almost always followed, even by guests. If they aren't, then like I said, that's what moderators are for. If everyone always followed the rules, then you wouldn't need mods.Also, I just have to say this. Make sure I get it right:leet-speak: badgiant pictures of tired web cliches in your signature: goodIs that about right?
    So screw the guests!!
    If that's the attitude you want to project, fine, but that's not very conducive to having a helpful, inclusive community.From what I see the mods saying, I realize that this isn't going to happen, I'm just trying to point out that your reasons for not wanting to do it are not very good reasons, based on the forums that I visit. It seems that the mods would rather not do the extra work of actually moderating. I'm simply trying to reason with you.
    sorry not going to happen
    That, however, cannot be reasoned with.
  13. Sheilds UP is a free service from Steve Gibson, I don't think he advertises anywhere.I should also mention that Steve Gibson has his web site at grc.com (Gibson Research Corp.).

  14. 1. Update your DNS server to redirect all requests for w3schools.com on port 80 to www.w3schools.com. Seriously. There's no technical reason why you can't. It looks lazy, and considering the site's content, it looks incompetent. It would be nice to be able to refer people to go to w3schools.com, it's easy to remember, but instead I have to make sure I specify and they understand that they have to type in the www subdomain for it to work, or else I field questions from people saying they can't get to the server.2. Allow guests to post on the forum for people who don't plan on posting more than 1 message.Thanks.

×
×
  • Create New...