Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Clicking solved helps as a note your need allow_url_fopen enabled for that to work!
  2. Yes you can put that at the top of any page which is for members only, i have made a one line update, that will redirect guest to login.php (update as you see fit) <?php stsession_start(); if(!isset($_SESSION['myusername'])) { //die("Ahhha a guest.. Go away!"); header("Location: login.php"); } echo "Hello ".$_SESSION['myusername']; ?>
  3. Oh I remember you now.. do you still have phpmyadmin access ? if so you can use that to create a new user, (by clicking Privileges->Add user)
  4. Erm..the MySQL daemon probably isn't running SU - enter root password /sbin/chkconfig mysqld on /sbin/service mysqld start enter root password, I'm sure the service is stored their.. EDIT: Then previous post
  5. 1.go to the server and check 2.Login on to that server and check 3.ask someone near the server to check 4. http://www.phpfreaks.com/forums/index.php/topic,257619.msg1212590.html#msg1212590
  6. what one was not found ? try su instead of sudo shame i don't have a Mac at home, i could of jumped on one at work! if the access problem is due to it being inuse then try this /etc/init.d/mysql stop cd /usr/local/mysql/bin/ safe_mysqld --skip-grant-tables mysqladmin -u root password 'newpassword' /etc/init.d/mysql restart or /etc/init.d/mysql stop cd /usr/local/mysql/bin/ safe_mysqld --skip-grant-tables mysql -u root mysql UPDATE user SET Password=PASSWORD('newpassword') WHERE User='root'; Exit with ctrl+c or ctrl+z or ctrl+x (i really can't remember) /etc/init.d/mysql restart try it now
  7. cd /usr/local/mysql/bin/ sudo mysqladmin password NEWPASSWORD
  8. 1.change the CD to the bin path of mysql 2. you forgot the quotes
  9. LMAO.. yeah missed that, just grabed The Little Guy and tweaked it, i always miss things like that! finished work now.. off home! ttfn
  10. cd /usr/local/bin/ sudo mysqladmin password NEWPASSWORD You will be prompted for your Mac root password, if that fails, just go into mySQl client and do password = password('newpass')
  11. My 2 Pence if (preg_match('/<a[^>]+?href\s*=\s*(["|\'])(?!(?:javascript|mailto|aim)(.+?)\1/sim', $html,$match)) { $match = $match[2]; //I used 2 as 1 was used to capute the ' or " }
  12. This is an encoding problem, check your page is using UTF-8 encoding try adding this to your page header <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  13. Heres a simple function from BB to HTML <?php // Syntax Sample: // -------------- // [-img]http://phpfreaks.com/images/deadrats.gif[-/img] // [-url="http://phpfreaks.com"]phpfreaks[-/url] // [-mail="webmaster@phpfreaks.com"]Webmaster[-/mail] // [-size="25"]HUGE[-/size] // [-color="red"]RED[-/color] // [-b]bold[-/b] // [-i]italic[-/i] // [-u]underline[-/u] // [-list][-*]item[-*]item[-*]item[-/list] // [-code]value="123";[-/code] // [-quote]John said yadda yadda yadda[-/quote] // // Usage: // ------ // < ?php include 'bb2html.php'; ? > // < ?php $htmltext = bb2html($bbtext); ? > function bb2html($text) { $bbcode = array("-<", "->", "[-list]", "[-*]", "[-/list]", "[-img]", "[-/img]", "[-b]", "[-/b]", "[-u]", "[-/u]", "[-i]", "[-/i]", '[-color="', "[-/color]", "[-size=\"", "[-/size]", '[-url="', "[-/url]", "[-mail=\"", "[-/mail]", "[-code]", "[-/code]", "[-quote]", "[-/quote]", '"]'); $htmlcode = array("<", ">", "<ul>", "<li>", "</ul>", "<img src=\"", "\">", "<b>", "</b>", "<u>", "</u>", "<i>", "</i>", "<span style=\"color:", "</span>", "<span style=\"font-size:", "</span>", '<a href="', "</a>", "<a href=\"mailto:", "</a>", "<code>", "</code>", "<table width=100% bgcolor=lightgray><tr><td bgcolor=white>", "</td></tr></table>", '">'); $newtext = str_replace($bbcode, $htmlcode, $text); $newtext = nl2br($newtext);//second pass return $newtext; } ?>
  14. I think you want this ! <?php echo "Here is my content flush(); sleep(5); echo "continuing to show my content"; ?> if you want some user interaction then see JavaScript
  15. Humm, try using an an account, instead of local system, i have a feeling your using Vista, if so try turning off UMA
  16. I assume this is solved ? if not then change the apache service to interacte with desktop is services.msc
  17. It takes a screen shot of the server.. as PHP is server based thats all it can do! maybe try adobe flash!
  18. $total = "£".$total; or $total = "£".$total; maybe use the money_format(), ie setlocale(LC_MONETARY, 'en_GB'); $total = money_format('%n', $total);
  19. I ran some tests here and yes its quicker but i had different results (i fixed the no dot problem) only real issue with the basefile is if you have a dot but no extention ie hello.world would be dropped the world, so the RegEx has a little more control but slightly slower.. i hashed the names to stop the caching. <?php //0.255233 $start = microtime(); for($i=1;$i<5000;$i++) { $h = md5($i); $link = "site.com/bfdgnh/$h/$h.jpg"; $filename = basename($link); $lastdot = strrpos($filename, '.'); if ($lastdot !== false) {$filename = substr($filename, 0, $lastdot);} } echo microtime() - $start."\n"; ?> <?php //0.306391 $start = microtime(); for($i=1;$i<5000;$i++) { $h = md5($i); $link = "site.com/bfdgnh/$h/$h.jpg"; preg_match('/(.*?)(?:\.[^.]{0,3})?$/', $link,$regs); $titles= $regs[1]; } echo microtime() - $start."\n"; ?> as we have taken over this thread.. wanna run the scripts at your side see if you get the same..
  20. Thats not really true, yes you can do that for your own web login but if they have your HASH then they can run it on any system they like! and if they got your hash then your probably have bigger problems.
  21. True, they shouldn't just add it without knowing why.. the i don't understand why you would say the following Hardly it protects against rainbow table lookups These are two different areas, unique passwords can still be in a rainbow tables.. they are like brute force, so its worth salting your password.. of course a unique password is always recommend but that to stop guesses this is a different subject.. this is about a login not MD5, however the password and secret number should have MD5+salt
  22. That's not the point of MD5.. holy hell, MD5 has NOTHING to do with the security level of the password.. its to make something non-reversible THAT'S IT.. adding salt is used to render *rainbow tables unusable, adding a filter to force the user to use a complex password has NOTHING to do with MD5 or Blowfish or DES or ANY encryption method, *a Rainbow table is a simply a list of words with their MD5 equivalent Now i thought i make that clear in my previous post I have been though all this before so i am stopping here.. if you don't get it, then theirs nothing i can do! What is the point of MD5?
  23. Well that's even less secure.. why replace HASH (one-way encryption) with encryption (2 way) (that goes for your first post before you replaced it with the above, and the one above) PS its nice to give credit when you pull from another site http://www.justskins.com/forums/get-string-encryption-without-reconfiguring-or-recompiling-php-76812.html
  24. Don't include the $ mysqladmin -u root password NEWPASSWORD
  25. Not really, md5(md5("redarrow")."salt") is more secure than md5(sha1(md5("redarrow"))) they are rainbow tables for MD5 and SHA1, so 3 lookup could resolved and easy password, using MD5 on SHA1 is pointless since you're passing 128-bits of information to generate a 256-bit hash, so 50% of the resulting data is redundant. thus no security improvement at all! the second method is more secure.. but your using salt thus disproving your first point!.
×
×
  • 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.