Jump to content

robb73

Members
  • Posts

    34
  • Joined

Everything posted by robb73

  1. hi, I'm not sure what that is? Is it the section in the php.ini file which starts with [MySQLi]? I have also just looked again at the php manual XCIX. MySQL Improved Extension, but couldn't find anything mentioning mysqli class? Sorry, I'm being a thicko!
  2. Unfortunately I can't get mysqli to work, I keep getting the error message "Call to undefined function mysqli_connect()". As everything works fine using mysql I am guessing its something to do with my php install? I'm using: Windows xp pro sp2 IIS PHP 5.1.2 MySQL 5.0.27 I have included extension=php_mysql.dll in the php.ini (in the WINDOWS folder). I have also checked the extension to the extension directory extension_dir = "C:/php/ext" The libmysql.dll is in the SYSTEM32 folder. Bizarrely, when I check the version of Mysql using phpinfo() the version shown is 4.1.7 yet when using the MySQL command line client it shows 5.0.27. Rob
  3. oh god, really sorry I've posted in the wrong section and I'm not sure how to delete my topic?
  4. Unfortunately I can't get mysqli to work, I keep getting the error message "Call to undefined function mysqli_connect()". As everything works fine using mysql I am guessing its something to do with my php install? I'm using: Windows xp pro sp2 IIS PHP 5.1.2 MySQL 5.0.27 I have included extension=php_mysql.dll in the php.ini (in the WINDOWS folder). I have also checked the extension to the extension directory extension_dir = "C:/php/ext" The libmysql.dll is in the SYSTEM32 folder. Bizarrely, when I check the version of Mysql using phpinfo() the version shown is 4.1.7 yet when using the MySQL command line client it shows 5.0.27. Rob
  5. I contacted the hosting company and got the following explanation: "Having checked with our engineers I can confirm that the function for emailing the error_log is disabled on the shared hosting servers." Does anyone know if this is usual for shared hosting? Or, as I'm beginning to find a distinct lack of features with my current provider, should I change my hosting? My current provider is Fasthosts. Any recommendations appreciated. Rob
  6. Is there anyway a hosting company can turn off / prevent this facility? Are there any server settings that might affect the error_log function? Rob
  7. Sorry didn't think to post all the code :-\ <?php $live = TRUE; // Flag variable for site status: // Error log email address: $email = 'me@website.com'; // Create the error handler. function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) { global $live, $email; // Build the error message. $message = "An error occurred in script '$e_file' on line $e_line: $e_message\n"; // Append $e_vars to the $message. $message .= print_r ($e_vars, 1); if ($live) { // Don't show the error. // error_log ($message, 3, './err.txt'); error_log ($message, 1, $email, '-fname@website.com'); // Send email. echo '<div class="error">An error occurred.</div><br />'; } else { // Development (print the error). echo '<div class="error">' . $message . '</div><br />'; } } // End of my_error_handler() definition. // Use my error handler. set_error_handler ('my_error_handler'); ?>
  8. Newbie question, I have tried to set up the following custom error log function... (I'm working my way through the Visual Quickpro book on PHP & MySQL) error_log ($message, 1, $email, '-fname@website.com'); ...but I never receive the email. I have tested a PHP email form on the server which works - so I'm assuming PHP is set up for email sending. I have also tested the function by sending an error to a .txt file, which works fine. Is there a setting I should be looking at using phpinfo()? Any help much appreciated. Rob
×
×
  • 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.