|  | 
  Claude Gélinas - 2015-10-30 01:59:50I've included the mysql2i.class.php at the top level page like this:<?php
 //include_once('Classe/mysql2i/mysql2i.class.php');
 $db = mysql_connect("localhost", "user", "blabla") or die(mysql_error());
 mysql_select_db("gestion", $db) or die(mysql_error());
 ?>
 
 when I load the page I get a blank page and firebug give me the following error
 
 500 Internal Server Error
 
 what's wrong
  Dave Smith - 2015-10-30 02:17:09 - In reply to message 1 from Claude GélinasThat is the problem with 500 errors, they don't tell you anything. If you have access to the error logs, they may shed a little more light on the problem. If you can't get the logs, then it will have to be debugged.
 I see in your example that the include is commented out, I assume that you did this to get the page loading and not that you no longer have the old mysql extension... correct?
 
 I am also assuming that you are running at least PHP5?
 
 If those aren't the problem and you need help debugging, just shoot me an e-mail to dave at wagontader dot com and I can help. If I haven't responded within 24 hours, then the e-mail probably went into my spam filter, just let me know here that you sent it.
 
 Dave
  Dave Smith - 2015-10-30 02:26:01 - In reply to message 1 from Claude GélinasOne other thought... you also put the mysql2i.func.php file in the same location as the class... correct?
 Dave
  Dave Smith - 2015-10-30 02:55:43 - In reply to message 1 from Claude GélinasI just downloaded the package from here and tested and it worked fine.
 I did notice one other thing while I was duplicating your example...
 
 Your classes folder is really 'Classe' without the s? Which is the path in your example.
 
 Dave
 
 
  Claude Gélinas - 2015-11-02 01:37:47 - In reply to message 2 from Dave SmithThank you for reply, the line is comented out because the page is not loading if I don't comment it out. I'm still using the mysql extention as I will have to change over then 5000 files to switch to the mysqli extention. That's why your class is soooo important to me.
 My PHP version is :
 php -v
 PHP 5.3.8 (cli) (built: Sep 28 2011 17:34:42)
 Copyright (c) 1997-2011 The PHP Group
 Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
 
 The mysql2i.func.php is in the same location that the class.
 
 dir Classe/mysql2i/
 example.php  mysql2i.class.php  mysql2i.func.php
 
 The Classe directory is at the following location:
 
 /var/www/html/marvini/Classe
 
 and the calling page is
 
 /var/www/html/marvini/db.php
  Claude Gélinas - 2015-11-02 01:47:06 - In reply to message 4 from Dave SmithFound it !!The path was not absolute path so I've changed it to:
 
 include_once('/marvini/Classe/mysql2i/mysql2i.class.php');
 
 and now it load fine so I will start to play with the class
 
 Thank you
  Dave Smith - 2015-11-02 02:09:49 - In reply to message 6 from Claude GélinasGlad you found it, would have been so much easier if you got the php warning about the include instead of the unknown server error.
 Keep in mind that the class is designed to take over when it detects that the old mysql extension is no longer present, until then the old myslq extension is still used, otherwise we would have name collisions with the functions.
 
 Dave
 |