zCMS [PHP, OOP, Phoenix, Secure]

Page 10 of 13 FirstFirst ... 2345678910111213 LastLast
Results 136 to 150 of 185
  1. #136
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Robloxz View Post
    Notice: Undefined index: HTTP_CF_CONNECTING_IP in D:\HoloMAM\Desktop\Xampp\htdocs\zCMA\global.php on line 21
    Title: Table 'uberdb.user_stats' doesn't exist
    Text: Table 'uberdb.user_stats' doesn't exist :((
    People have been complaining about getting hacked whilst using this, so I wouldn't recommend it. ;3

  2. #137
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by davidaap View Post
    yeah thats fucked up but if you fix that + exploits + mysqli its good :D
    There's nothing wrong with using MySQL aslong as you filter all input. Personally, I've started using MySQLi for the security functionalities(binding) it has, unlike others such as Cobe who just use it like if it was an object-oriented style of MySQL and don't use all of its potential.

  3. #138
    No, Just no. Matthew is offline
    MemberRank
    Jul 2008 Join Date
    United KingdomLocation
    1,408Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Kryptos View Post
    There's nothing wrong with using MySQL aslong as you filter all input. Personally, I've started using MySQLi for the security functionalities(binding) it has, unlike others such as Cobe who just use it like if it was an object-oriented style of MySQL and don't use all of its potential.
    What do you mean by binding? Like pre-pairing MySQL Queries?

  4. #139
    Member XenoGFX is offline
    MemberRank
    May 2010 Join Date
    97Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    If you control the amount of queries being run at one time. You don't need to enhance the way you code your queries or how MySQL operates and obviously it matters how you create the queries..Learn more about caching in general and such to keep the systems running cooler then the breeze :)

  5. #140
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Matthew View Post
    What do you mean by binding? Like pre-pairing MySQL Queries?
    No, if you've seen Cobe's MySQLi class, you could see he prepares the query before executing, right?

    Well, he doesn't really have a reason to prepare the query, since he isn't doing any further operations to the statement.
    He should just do execute() and it'd be fine.

    By binding I mean binding the parameters.

    Example:

    PHP Code:
    <?php
    $mysqli 
    = new mysqli('localhost''my_user''my_password''my_database');

    $stmt $mysqli->prepare("INSERT INTO users VALUES (?, ?, ?, ?, ?)");
    $stmt->bind_param('isssi'$id$username$password$email$credits);

    $id 1;
    $username "Kryptos";
    $password "783749374035RJFFMRMCUBRR894579";
    $email "kryptos@yopimpdaddy.com";
    $credits 1337;

    $stmt->execute();

    printf("%i Row inserted.\n"$stmt->affected_rows);

    $stmt->close();

  6. #141
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Kryptos View Post
    No, if you've seen Cobe's MySQLi class, you could see he prepares the query before executing, right?

    Well, he doesn't really have a reason to prepare the query, since he isn't doing any further operations to the statement.
    He should just do execute() and it'd be fine.

    By binding I mean binding the parameters.

    Example:

    PHP Code:
    <?php
    $mysqli 
    = new mysqli('localhost''my_user''my_password''my_database');

    $stmt $mysqli->prepare("INSERT INTO users VALUES (?, ?, ?, ?, ?)");
    $stmt->bind_param('isssi'$id$username$password$email$credits);

    $id 1;
    $username "Kryptos";
    $password "783749374035RJFFMRMCUBRR894579";
    $email "kryptos@yopimpdaddy.com";
    $credits 1337;

    $stmt->execute();

    printf("%i Row inserted.\n"$stmt->affected_rows);

    $stmt->close();
    My problem is that I over think things, how are you supposed to know how many params they define?

  7. #142
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Makarov View Post
    My problem is that I over think things, how are you supposed to know how many params they define?
    It's pretty complicated to explain, google it up.

  8. #143
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Kryptos View Post
    It's pretty complicated to explain, google it up.
    It's why I never tackled it at the start. I've been reading up on a developer's class, seems liable.

  9. #144
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Makarov View Post
    My problem is that I over think things, how are you supposed to know how many params they define?
    PHP: func_get_args - Manual

    Quote Originally Posted by XenoGFX View Post
    If you control the amount of queries being run at one time. You don't need to enhance the way you code your queries or how MySQL operates and obviously it matters how you create the queries..Learn more about caching in general and such to keep the systems running cooler then the breeze :)
    After doing some reseasch, it almost doesn't matter how manny queries you do.

    I runned 200 queries and refreshed it for like 10 min.

    There was no overload in the mysql server and it didn't slow down the load time, Thank you

  10. #145
    prjRev.com Kryptos is offline
    MemberRank
    Feb 2010 Join Date
    Planet EarthLocation
    579Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by joopie View Post
    After doing some reseasch, it almost doesn't matter how manny queries you do.
    Where did you get that idea from?

  11. #146
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Kryptos View Post
    Where did you get that idea from?
    I tested it?

    100 write queries
    100 read queries

    Without overloading the server

  12. #147
    No, Just no. Matthew is offline
    MemberRank
    Jul 2008 Join Date
    United KingdomLocation
    1,408Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    I don't think you fully understand. Unless you have an SSD drive, The HDD is the slowest component inside your computer/server. And where is MySQL data read/written to? Yeah, your disk. Therefore MySQL (unless on a SSD) will become a bottle neck in any application. But even on an SSD it can slow down during transitions.

    You should cache everything you can - when you can. Memory is faster than reading from the HDD. You also want MySQL to do more important tasks than re-query everything on a page load.

    It's logical sense, also the less reading/writing a HDD has to do the longer life span it has.

    Therefore caching is both the best, cheapest and most scalable solution.

    Also to add, that's 200 queries. Let's try over 1000 per second.. and lets see what happens then..

  13. #148
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Less queries the faster the site is? ;3

  14. #149
    Garry's Mod is addictive! Law is offline
    MemberRank
    Dec 2009 Join Date
    NorwayLocation
    993Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Jupos View Post
    Less queries the faster the site is? ;3
    Less queries, less load on the mysql server...

  15. #150
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: zCMS [PHP, OOP, Phoenix, Secure]

    Quote Originally Posted by Matthew View Post
    I don't think you fully understand. Unless you have an SSD drive, The HDD is the slowest component inside your computer/server. And where is MySQL data read/written to? Yeah, your disk. Therefore MySQL (unless on a SSD) will become a bottle neck in any application. But even on an SSD it can slow down during transitions.

    You should cache everything you can - when you can. Memory is faster than reading from the HDD. You also want MySQL to do more important tasks than re-query everything on a page load.

    It's logical sense, also the less reading/writing a HDD has to do the longer life span it has.

    Therefore caching is both the best, cheapest and most scalable solution.

    Also to add, that's 200 queries. Let's try over 1000 per second.. and lets see what happens then..
    Raid 0 (HDD):
    Code:
    1 => 0.360518 sec
    2 => 0.630954 sec
    3 => 0.367923 sec
    4 => 0.634839 sec
    5 => 0.36757 sec
    6 => 0.627775 sec
    7 => 0.368542 sec
    8 => 0.642663 sec
    9 => 0.366623 sec
    10 => 0.659323 sec
    ------------------
    Total: 5.02673 sec
    Queries: 10000
    It isn't that bad.
    1000 queries per page



Advertisement