Bug #33481 [Com]: Fatal error: Class 'mysqli' not found in /path/file.php line #

From: Date: Fri, 08 Aug 2014 03:59:30 +0000
Subject: Bug #33481 [Com]: Fatal error: Class 'mysqli' not found in /path/file.php line #
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187020@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=33481&edit=1 ID: 33481 Comment by: wwdunlap2009 at hotmail dot com Reported by: qjahe at videotron dot ca Summary: Fatal error: Class 'mysqli' not found in /path/file.php line # Status: Not a bug Type: Bug Package: MySQLi related Operating System: Debian 3.1 PHP Version: 5CVS-2005-06-26 (dev) Block user comment: N Private report: N New Comment: add an extension=mysqli.so line to your php.ini or remove the "shared," part from your configure line this did not work. Developer is crazy. The docroot="C:\Program files\PHP" in the php.ini got rid of the input file can not be found. but now it can't find the php file on the server due to paths or bad fact_cgi path setup. It has something to do with paths in the beginning to move forward on this. Developer is not finding out why classes can't be accessed from the mysql database and leaving this php install and mysql install broken for php script runs why? Some type of path or fast_cgi problem when running php -m it fails when running as administrator. Have fixed errors when running as php -m. Now phpinfo.php shows up. But I can't get the mysql database classes to run right in the database. fatal errors trying to use certain php classes that run in php. Developer is a shit head since setup for mysql and php don't see the right phpmysql.dll or libmysql.dll for apache or php and the install fails. Anyone can say its not a bug and just ignore bad paths that are setup and cause this error. PATH and SCRIPTNAME for fast cgi is broken and developer is an idiot. Fails at install due to bad paths or scripts in php. php fails with path errors or library errors due to wrong files setup for php installation. Wondering how to figure out what exactly is run when you run a php script. Where does it go to run a php script so I can fix the paths and files it uses to access the mysqli class run in the mysql database is the question here for! php connect to get data from the database using the class mysqli_connect? This will fix this bug? here is the code that fails. <?php # CONNECT TO MySQL DATABASE. # Connect on 'localhost' for user 'mike' with password 'easysteps' to database 'site_db'. $dbc = @mysqli_connect ( 'localhost', 'mike', 'easysteps', 'site_db' ) //<------fails on this line above due to trying to use a mysqli_connect command in mysql in the database from php # Otherwise fail gracefully and explain the error. OR die ( mysqli_connect_error() ) ; # Set encoding to match PHP script encoding. mysqli_set_charset( $dbc, 'utf8' ) ; Can someone tell me where it goes to run this script step by step and what it needs set for paths or in a batch file to get php working on a server? The install fails because php is not addressing bad paths or files need to run php! Previous Comments: ------------------------------------------------------------------------ [2005-06-26 18:55:23] johannes@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. add an extension=mysqli.so line to your php.ini or remove the "shared," part from your configure line... ------------------------------------------------------------------------ [2005-06-26 18:03:44] qjahe at videotron dot ca I might of forgot to, but I assumed that putting the directive --with-mysqli=shared,/usr/bin/mysql_config would put it on in the php.ini Like I said i'm a bit of a newb and dont know how to "turn it on" in the php.ini. I tried doing a bit of research on the php.net site for "mysqli php.ini" but nothing pointing out how to "turn mySQLi on" in the php.ini. What should I be looking for? I see almost a duplicated of the [MySQL] section except for [MySQLi], does that mean its on? ------------------------------------------------------------------------ [2005-06-26 17:37:21] tony2001@php.net --with-mysqli=shared,/usr/bin/mysql_config And what does your phpinfo() tell about MySQLi ? Didn't you forget to turn it on in your php.ini ? ------------------------------------------------------------------------ [2005-06-26 17:13:14] qjahe at videotron dot ca Description: ------------ CVS Built On: Jun 26, 2005 14:30 GMT Used the same configure command for php 5.0.3 and mySQLi was working fine. I am kind of a noob so I havent really touched my config AT ALL on my server. It compiled with no errors... Dont know what i'm doing wrong I've been told to report it here. Fatal error: Class 'mysqli' not found in /path/file.php line # each time I tried to instantiate mySQLi... Again it was working fine with the same exact setup/server with the version 5.0.3. Reproduce code: --------------- ./configure --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-db4=/usr --with-curl --with-dom=/usr --with-exec-dir=/usr/bin --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-regex=php --with-xml --with-expat-dir=/usr --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --enable-mbstr-enc-trans --enable-mbregex --without-oci8 --with-pear=/usr/share/pear --with-imap-ssl --with-kerberos=/usr/kerberos --with-ldap=shared --with-mysqli=shared,/usr/bin/mysql_config --enable-memory-limit --enable-bcmath --enable-shmop --enable-calendar --enable-dbx --enable-dio --enable-mcal --without-bz2 --disable-sh! ort-tags --disable-pear --disable-cgi --with-apxs2=/usr/bin/apxs2 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=33481&edit=1

« previous php.bugs (#187020) next »