Search results

  1. M

    Problem with PHPBB

    The warning message is probably what's causing the headers to be sent. At least on free servers, the PDO extension isn't installed, which is why you get the warning. Now that I look, it seems no SQLite driver is installed on the free hosts. There is a SQLite driver in PECL, but it's old and...
  2. M

    All servers but one on their lips?

    It looks like that status page you gave doesn't work; try this one. Since you can't access cPanel, why do you think your site is on absolut? What's the URL you're using to access cPanel?
  3. M

    file_get_contents()

    You can prevent the display of non-fatal errors in a webpage with ini_set. Try ini_set('display_errors', 0);
  4. M

    What should I learn?

    JS isn't useless, it's (usually) used client side. PHP & SQL for backend, JS on the frontend. @intertec: If you want to jump in with development, learn PHP (as everyone suggests) and, if you want to work with IIS, C# & ASP.Net. Just be aware that PHP may not be the best language to learn...
  5. M

    Finding and deleting duplicate image files

    Given the nature of the problem, I don't expect changing the programming language will have a huge effect, but it's worth testing. Python's fairly fast, even for numeric processing. A mix of C and assembly might be the fastest, but compiler optimizations may be able to beat hand-coded...
  6. M

    Can anyone solve this question in C programming Language?

    strchr(). There's also strstr() and strcasestr() in the std C library. Many of those basic PHP funcs are just wrappers for the C funcs. @Stella Richards: normally in a case like this, I'd just link to "How to ask questions the smart way", but this is important enough to quote here: You'd...
  7. M

    Query String - $_GET problem

    Just be careful to test that short tags are enabled if you move the code to a new host (or the current host upgrades; short tags will be around for awhile but are being replaced with a different syntax). Short tags also don't play well with XML processing instructions, such as an <?xml?>...
  8. M

    Sessions

    session_save_path() just returns the value of session.save_path, which is empty by default. The default storage location for the file session-handler is the system temporary directory (take a look at PHP_FUNCTION(session_save_path) in session.c and PS_OPEN_FUNC(files) in mod_files.c)...
  9. M

    php Upload Function help please

    The standard approach would be to parse the file and throw an exception if the parse fails. For CSV files, use fgetcsv() to parse the next line & then check that the number of fields is correct. If fgetcsv() fails, make sure you use feof() to check whether you've reached EOF or had a parse error.
  10. M

    Finding and deleting duplicate image files

    That was going to be my suggestion: compare files with only 2 size collisions, look for checksum collision when >= 3 size collisions. As for comparing random samples of the content, it's hard to even estimate how many samples you'd need to achieve a given confidence interval without knowing...
  11. M

    php Upload Function help please

    The temporary name is pseudo-random and not based on the original file name. Use $_FILES['userfile']['name'] to get the original file name, including extension.
  12. M

    Forbidden?

    Google is your friend. Accessing file permissions using cPanel.
  13. M

    php Upload Function help please

    Which is the point of the page. As the entry point for the PHP file upload documentation, it links to specific subject pages. The <label> element is supposed to contain a label for a form control, not a form control itself. Why are you using them as <input> containers? Example: <form...
  14. M

    global mysqli variable?

    Nope. Each function has its own scope. The "global" declaration imports a global variable into a function's scope (actually, it creates a local variable that holds a reference to the global variable). It doesn't make a variable a superglobal. In any case, pass the connection around as a...
  15. M

    global mysqli variable?

    Validate() doesn't declare $con as global. I recommend passing $con as a parameter rather than using a global; it's cleaner.
  16. M

    help urgently needed

    @woodyl: I believe "Even offline [...]" is the error message brewtal69 is getting. @brewtal69: Placing quotes around (or changing the font for or even using [code] tags around) error messages will help delineate them. Make your subject meaningful. The subject should reflect the post's...
  17. M

    php Upload Function help please

    This is where to start: "Handling file uploads".
  18. M

    global mysqli variable?

    2 problems: You left the '$' off of 'email' in 2 lines here. Also, grammar maven says that that should be "You're" ("you are"), not "Your" (possessive). This is the source of the error. You say you're going to provide 2 values, ID and Email, but only provide 1. If the ID column is...
  19. M

    form to mysql

    Then it sounds like the problem is that the variables you want to insert aren't defined because browsers won't pass values for unchecked checkboxes. If PHP were more like Perl or Javascript, you could use $Guitar[hard] = $_REQUEST['Guitar']['hard'] || 0; (in Perl and JS, || returns the value of...
  20. M

    form to mysql

    Almost there. You gave a minimal test case and said what you want it to do, but didn't say what it ends up doing (i.e. what the problem is). Looking at your insert statement for table SONG, the instruments and difficulty levels are stored in one row. Your current client-side form...
Top