Search results

  1. M

    Server files' domain(s) question

    Mu. Files can be accessed through many domains, they are equally "in/under" all of them. The A1 and M1 both lead to London. user.x10domain.tld and domain.tld might resolve to the same server, but they are different domains. Consider that the X10 servers are mostly shared servers; the host name...
  2. M

    Issues regarding Mysql Injection and PDO

    Connection failures aren't the only thing that will cause exceptions, if the error mode of the connection is PDO::ERRMODE_EXCEPTION. If the connection isn't set to throw exceptions, then you'll need to test the result of every query to see whether or not it succeeded. If the connection fails...
  3. M

    Issues regarding Mysql Injection and PDO

    You're learning, and that's the important thing. Stupidity is the result of remaining ignorant, so never stop studying. Quotes around a value (when the value is interpolated directly into the query) are necessary to make a query safe, since quotes are what separates a value from the rest of the...
  4. M

    Google map

    Rather than having your server-side scripts connect to the Google Maps service, have them generate JS to create the markers. Pull the latitude & longitude from the DB, create a GLatLng then a GMarker for each. Register a click handler for each GMarker using GEvent.addListener.
  5. M

    PHP mysqli_real_escape_string PDO equivilent

    The topic for this thread is what needs to be done when using PDO to prevent SQL injection. Your question is about where SQL injection can come from: what the potential vectors are, in other words. At least, that's what I think you're asking about. The question wasn't entirely clear. There are...
  6. M

    Display all that would be secret while Mysql is broken

    Catching the exception is the only way, but you can make it easier . class LocalDB extends PDO { static $dbs = array(); static function connect($db='dflt') { if (! isset(self::$dbs[$db])) { try { self::$dbs[$db] = new...
  7. M

    'Random Question' Script

    There are a couple of related issues (#523 and #10570), though they aren't resolved. When you view the source of a page that was retrieved with POST, you'll get the source for the page as retrieved with a GET. If there's a cached copy of the page retrieved with GET, Chrome will use that version...
  8. M

    PHP mysqli_real_escape_string PDO equivilent

    Don't threadjack. You'll attract more new posters with a new thread than with an established thread.
  9. M

    Multi-line form <select> option?

    You can create your own widget. You'll need to implement line selection and hilighting by hooking the click event. In your handlers, update a hidden <input> based on the current selection, fire a change event (though you could rely on the change event for the hidden input) and prevent the...
  10. M

    'Random Question' Script

    Chrome re-requests the page when you view the page source. You can use the Web Inspector to examine the structure of the rendered page you're viewing. If you need any more help than that, you need to provide a link to a live page.
  11. M

    Modify .htaccess

    When you accessed what? Errors are a response to some action; HTTP status errors are in response to requesting a URL. An error status doesn't carry enough information for diagnosis. What would your doctor tell you if you said "I have a pain. What's the problem?"
  12. M

    Multi-line form <select> option?

    What specific behavior do you want? Select elements are typically rendered using native widgets (menus, listboxes, dropdown lists), which has very limited behavior for dealing with long lines, given their narrow usage. Even when they are rendered with widgets defined by the browser, they...
  13. M

    PHP mysqli_real_escape_string PDO equivilent

    Explicitly specifying the columns would make it slightly harder to produce a query that executes without error, but only slightly. SQL injection would still be entirely possible. Since prepared statement parameters are completely immune to SQL injection, explicit columns won't matter as far as...
  14. M

    Registration Submit shows code

    This is vulnerable to SQL injection. You can escape the input values to prevent this, but the more modern and simpler approach is to use prepared statements (note: only parameters in prepared statements are invulnerable to SQL injection). Read "Writing MySQL Scripts with PHP and PDO" for more...
  15. M

    [PHP] Script terminating in middle of script for no reason

    Always check for error conditions. This generally means checking the return value of functions that might fail and consulting any error status functions (e.g. mysqli::error and mysqli::errno). PHP scripts are limited to 30 seconds of execution time (though this can be adjusted). Without knowing...
  16. M

    PHP mysqli_real_escape_string PDO equivilent

    You should always specify the fields in an INSERT statement, so that it will continue to work should you change the table schema by adding or reordering fields. It has nothing to do with protecting against SQL injection.
  17. M

    php doing things recursively

    Chrome appears to strip XML processing instructions, even when displaying an unrendered view of the response body. <?foo ?>bar<?qux quux?> If you set the content type to "text/plain", you'll see everything. <?php header('Content-type: text/plain'); $fmt='<?php header(\'Content-type...
  18. M

    CGI Perl upload script 500 internal server error

    Those are safe to ignore. The first means you haven't created a custom error page for the 500 status response, and the latter two mean you haven't created a site icon. Note the links in my post: Read my sig and follow the directions for information on what a BOM and shebang are. (Note: the...
  19. M

    CGI Perl upload script 500 internal server error

    Is there anything in the error log? Do you get the same error with a minimal CGI perl script? #!/usr/bin/perl print "content-type: text/plain\n\n"; print "hello"; Check that there's not a BOM messing up the shebang line. Mode 755 are the most permissive permissions you should set on a...
  20. M

    "XML Parsing Error: no element found Error pls help

    Did you try the suggestions in the other threads, such as "Asp.net problems?" and "XML Parsing Error: no element found Location"? Did you try searching the web at large, which has quite a few pages covering the "no element found" error message? As it stands, we have no idea what you've done, so...
Top