Jump to content

dustinnoe

Members
  • Posts

    187
  • Joined

  • Last visited

    Never

Everything posted by dustinnoe

  1. Once again I have solved it myself, although my hats off to thorpe for pointing me in right direction. I believe writing things here helps me sort my thoughts and actions. Anyway, the nameservers were incorrect during the transfer. I discovered this by comparing zone settings from transfered sites to the zones settings for newly created sites. A quick update to the namesever and now I'm good to go. It only took me a night and a morning and I'm just a little smarter now.
  2. OK, I learned all about zone settings using BIND but I'm still in a bind. It seems that when I transfered multiple hosting accounts into one VPS something went haywire. The 'www' sub-domain does not work for any of those sites. The zones settings are correct. On the flip side, all the sites I have setup since the transfer using WHM are working properly. Is there another file in BIND that needs to be edited. I'm learning a lot from this but it is a bit frustrating.
  3. How do you configure the DNS to accept both?
  4. With those settings I can only see dustinnoe.com and not www.dustinnoe.com I am totally confused.
  5. I am having issues with VirtualHost. I cannot seem to get ServerAlias to work properly. Here are my settings: <VirtualHost ipaddress> ServerName www.dustinnoe.com ServerAlias www.dustinnoe.com dustinnoe.com DocumentRoot path/to/pages </VirtualHost> These settings will display the page when the url dustinnoe.com is used bt not when www.dustinnoe.com is used. If I remove the ServerAlias all together it displays using www.dustinnoe.com
  6. I am renting a VPS and everything works great except for any php file that tries to operate on a file or directory(ie: chmod). I found that the problem lies in who the owner of the file/dir is. In order to work properly it must be owned by php. When I upload through ftp(filezilla) the file/dir uploaded will get the username of the user that is connected. How can I set up my server so that I do not have to manually change the owner of files and directories that php will need to operate on? BTW: Is it safe to set a directory to 777 and leave it that way? Currently my script will chmod right before and after an operation needs to occur.
  7. So I put together a Vanilla Forum Fan Site for a friend of mine. Let me know what you think. http://idolbrookewhite.com
  8. <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-pro-overview-outside">Paypal Payflow Pro</a> does not send you to their website for processing it all takes place on your site.
  9. I was playing around in the sandbox about a year ago and always found answers on the forum. Although I don't really know the answer to your question here is my thought on the subject. If you have a page where you are collecting sensitive information(ie. Credit card numbers) it needs to be secure.
  10. Oops! I didn't realize I was still running php4 on this machine. Upgraded to php5 and everything works great.
  11. Do you have a paypal sandbox account? If so, the forum there is awesome for answering this type of question.
  12. I am trying to use pear's text highlighter by searching for tags in an article and highlighting the content between the tags. Something is causing the script to crash with no errors. Error reporting is set to E_ALL. When there are no tags to replace the script completes and outputs the article. Maybe I am missing something obvious but this one has me scratching my head. <?php $phpsearch = '/\<\?php(.*?)\\?\>/is'; $sqlsearch = '/\[sql\](.*?)\[\/sql\]/is'; function highlight_sql($matches){ global $sqlsearch; $matches[0] = preg_replace($sqlsearch, '$1', $matches[0]); $sql = Text_Highlighter::factory('SQL'); return $sql->highlight($matches[0]); } function highlight_php($matches){ $php = Text_Highlighter::factory('php', array('tabsize' => 2)); return $php->highlight($matches[0]); } $article = preg_replace_callback($phpsearch, 'highlight_php', $article); $article = preg_replace_callback($sqlsearch, 'highlight_sql', $article); ?>
  13. <?php echo '<select name="rate">'; $rate = 10; while ($rate <= 1000) { echo "<option value=\"$rate\">$rate</option>\n"; $rate = $rate + 10; } echo '</select><br />'; ?>
  14. It's also a great opportunity to use AJAX.
  15. GD library can't tell you what size the browser is. Use javascript to handle behavior.
  16. Use javascript window object. That's the only way you are going to gather the information required to do that.
  17. I was considering dropping the $ for Guild wars because it has free online play. What is so bad about it?
  18. if you cannot access php.ini http://us2.php.net/manual/en/function.session-cache-expire.php
  19. Have you thought about using microtime()? Just grab the time at the beginning of the script and then when it is complete. Try this with both scripts and see which is faster. You can even grab more times at key points in your script if you really want to see whats happening. I assume you are looking for improvement in execution speed. Hope that helps!
  20. This may serve you better. Note that this script escapes the username and password. Anytime you update or insert usernames and passwords you will need to escape them using mysql_real_escape_string(). <?php session_start(); $username = mysql_real_escape_string($_POST['username']); // Stop SQL injection attacks $password = mysql_real_escape_string($_POST['password']); // Do the same thing on user sign up // Use require, include will not stop the // sript if an error occurs, require will // cause the script to die require 'db2.php'; $sql = "SELECT * FROM NICF_Login WHERE UserName = '{$username}' AND Password = '{$password}' LIMIT 1"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error in SQL");} if (odbc_num_rows($rs)){ // UserName and Password match echo "{$username} {$password}"; }else{ echo "Wrong"; } odbc_close($conn); ?>
  21. <?php if (($username === $User) && ($password === $Pass)) ?> using === ensures that the variables are of the same type. This may or may not help.
  22. my suggestion would be to echo out the strings you are comparing in the if statement just so you can see for yourself if there are any differences. Could be something as simple as case which can be solved with strtolower()
  23. Installed apache 2.0.59 and problem go bye-bye. I honestly think there is some sort of bug with 1.3 on WAMP.
  24. Installed apache 2.0.59 and problem go bye-bye. I honestly think there is some sort of bug with 1.3 on WAMP.
×
×
  • 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.