Although I've been programming for over 30 years I am new to web
development.
As an introduction I've been using a book "PHP and MYSQL Web
Development" by Luke Welling and Laura Thomson.
I've set up an Apache Server v1.3.31.
I've also installed MySQL V5.0.13 and PHP v 5.0.5.
I've gone through the installations several times. I'm reasonably
confident about the Apache Server but I have a problem with the
interaction of the PHP and MYSql.
I'm trying to connect to a MySQL database using PHP. I'm using the new
mysqli_connect structure. I've also tried the straight procedural
version mysqli_connect function.
When I run the code I get a "Call to undefined function mysqli_connect" .
I've set up my PHP.ini file to point to the correct php ext file and
I've included references to the php_mysqli.dll but I still get the error
message.
In addition if I stop and then restart the Apache server - which is
linked into PHP - I get an error message saying that PHP can't find the
module php_mysqli.dll.
I'm sure I have defined my extension_dir correctly as
extension_dir = "C:/PHP/ext/"
I know the dll is in this directory but it is not getting picked up. As
this is currently a total block can anyone help please!
Thanks
Malcolm 7 1711
The first thing to check is if your installation is using the version of
php.ini which you think it is.
Run a script containing only
phpinfo();
and take a look.
If that's all OK, then did you stop IIS when installing PHP and Apache? If
not, try uninstalling and reinstalling with IIS stopped.
Cheers
Mark Although I've been programming for over 30 years I am new to web development. As an introduction I've been using a book "PHP and MYSQL Web Development" by Luke Welling and Laura Thomson. I've set up an Apache Server v1.3.31. I've also installed MySQL V5.0.13 and PHP v 5.0.5. I've gone through the installations several times. I'm reasonably confident about the Apache Server but I have a problem with the interaction of the PHP and MYSql. I'm trying to connect to a MySQL database using PHP. I'm using the new mysqli_connect structure. I've also tried the straight procedural version mysqli_connect function. When I run the code I get a "Call to undefined function mysqli_connect" . I've set up my PHP.ini file to point to the correct php ext file and I've included references to the php_mysqli.dll but I still get the error message. In addition if I stop and then restart the Apache server - which is linked into PHP - I get an error message saying that PHP can't find the module php_mysqli.dll. I'm sure I have defined my extension_dir correctly as extension_dir = "C:/PHP/ext/" I know the dll is in this directory but it is not getting picked up. As this is currently a total block can anyone help please!
Mark thanks but....
Mark Rees wrote: The first thing to check is if your installation is using the version of php.ini which you think it is.
Run a script containing only phpinfo();
Did that and it looks as if its using the php.ini in c:/php which is
what I would expect. and take a look.
If that's all OK, then did you stop IIS when installing PHP and Apache? If not, try uninstalling and reinstalling with IIS stopped.
Don't have IIS installed. IIS is a server (I think!) and I'm using the
Apache server.
I stop the Apache server every time that I made a change to php.ini and
then restarted but it still doesn't see the php_mysqli.dll.
Malcolm
Cheers
Mark
Although I've been programming for over 30 years I am new to web development .
....
I'm trying to connect to a MySQL database using PHP. I'm using the new mysqli_connec t structure. I've also tried the straight procedural version mysqli_connect function. When I run the code I get a "Call to undefined function mysqli_connect" . I've set up my PHP.ini file to point to the correct php ext file and I've included references to the php_mysqli.dll but I still get the error message.
....
Well, what your phpinfo(); script says? Check the manual for it's
specific location of php.ini file. This file location matters!
Don't loose your hair rightaway! You might forget about all these
installaton troubles, just get a full php+mysql+apach e package on
windows ... like xampp! http://www.apachefriends.org/en/xampp.html
with MySQL 4.1.15 and PHP 5.0.5 ....
Just download the whole package and extract that to some root drive
a-n-d you are on the run!
--
Raqueeb Hassan
Bangladesh
Raqueeb Hassan wrote: Well, what your phpinfo(); script says? Check the manual for it's specific location of php.ini file. This file location matters!
Don't loose your hair rightaway! You might forget about all these installaton troubles, just get a full php+mysql+apach e package on windows ... like xampp!
http://www.apachefriends.org/en/xampp.html
with MySQL 4.1.15 and PHP 5.0.5 ....
Just download the whole package and extract that to some root drive a-n-d you are on the run!
-- Raqueeb Hassan Bangladesh
Thanks for this tip Raqueeb. I've downloaded and got it working though
I'm still having problems. Do you know into what directory I have to put
the PHP source files?
Cheers
Malcolm
Malcolm Wright wrote: Raqueeb Hassan wrote:
Well, what your phpinfo(); script says? Check the manual for it's specific location of php.ini file. This file location matters!
Don't loose your hair rightaway! You might forget about all these installaton troubles, just get a full php+mysql+apach e package on windows ... like xampp!
http://www.apachefriends.org/en/xampp.html
with MySQL 4.1.15 and PHP 5.0.5 ....
Just download the whole package and extract that to some root drive a-n-d you are on the run!
-- Raqueeb Hassan Bangladesh
Thanks for this tip Raqueeb. I've downloaded and got it working though I'm still having problems. Do you know into what directory I have to put the PHP source files?
Cheers
Malcolm
Malcolm,
It's also possible Apache can't load the MySQL client library
(libmysqlclient .lib or mysqlclient.lib ). Ensure this library is in a
path where it can be loaded.
What happens if you type just
mysql
at a command prompt? This will load the mysql command interpreter.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
Jerry Stuckle wrote: Malcolm Wright wrote:
Raqueeb Hassan wrote:
Well, what your phpinfo(); script says? Check the manual for it's specific location of php.ini file. This file location matters!
Don't loose your hair rightaway! You might forget about all these installaton troubles, just get a full php+mysql+apach e package on windows ... like xampp!
http://www.apachefriends.org/en/xampp.html
with MySQL 4.1.15 and PHP 5.0.5 ....
Just download the whole package and extract that to some root drive a-n-d you are on the run!
-- Raqueeb Hassan Bangladesh
Thanks for this tip Raqueeb. I've downloaded and got it working though I'm still having problems. Do you know into what directory I have to put the PHP source files?
Cheers
Malcolm
Malcolm,
It's also possible Apache can't load the MySQL client library (libmysqlclient .lib or mysqlclient.lib ). Ensure this library is in a path where it can be loaded.
What happens if you type just
mysql
at a command prompt? This will load the mysql command interpreter.
Hi Jenny,
Yes it responds with the mysql prompt and login. I can there get to the
normal mysql functionality. I set all the neccessary paths - which made
it all the more confusing that it couldn't see the dll.
Thanks
Malcolm
Jerry Stuckle wrote: Malcolm Wright wrote:
Raqueeb Hassan wrote:
Well, what your phpinfo(); script says? Check the manual for it's specific location of php.ini file. This file location matters!
Don't loose your hair rightaway! You might forget about all these installaton troubles, just get a full php+mysql+apach e package on windows ... like xampp!
http://www.apachefriends.org/en/xampp.html
with MySQL 4.1.15 and PHP 5.0.5 ....
Just download the whole package and extract that to some root drive a-n-d you are on the run!
-- Raqueeb Hassan Bangladesh
Thanks for this tip Raqueeb. I've downloaded and got it working though I'm still having problems. Do you know into what directory I have to put the PHP source files?
Cheers
Malcolm
Malcolm,
It's also possible Apache can't load the MySQL client library (libmysqlclient .lib or mysqlclient.lib ). Ensure this library is in a path where it can be loaded.
What happens if you type just
mysql
at a command prompt? This will load the mysql command interpreter.
Strangely enough there was another person with exactly the same problem
as I was having - see "PHP Configuration Troubles" further down this
newsgroup. I followed the advice given in that answer, upgraded to
Apache2 and copied libraries as suggested and it all works now.
Thanks to all who responded.
Malcolm Wright This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: yzzzzz |
last post by:
Hi,
I am compiling PHP 5.0.2 myself with MySQL support.
I did a ./configure --with-mysqli=/usr/local/mysql/bin/mysql_config
(see end of post for complete configure)
Note: I also have --with-mysql=/usr/local/mysql/. However, I get the
same errors when I configure without the mysql extension, just mysqli.
And as the documentation says, I use the same version of MySQL for both
extensions to avoid conflicts.
|
by: Roy Shaw |
last post by:
When configuring PHP5 (5.0.3) to use the mysqli libraries I get a "No
such file or directory" from the configure script. My goal is to get
PHP5 running with mysql 4.1.09 with both the mysql and mysqli options.
I can get it to configure and work correctly with just the mysql but NOT
the mysqli or both.
Environment:
Red Hat Enterprise Linux 3, rel 4
php 5.0.3 from sources from php.net
|
by: ojorus |
last post by:
Hi!
Some questions regarding the mysqli-extension (php5)
1) Prepared statements: If I understand things right, prepared statements
will give better performance if you make several similar querys. (where you
only change the parameters) But what if you do only ONE query; will it then
be usefull to use prepared statements? Can it actuelly give better
performance NOT to use prepared statements in that case?
2) Are there any DISadvantages...
|
by: davids58 |
last post by:
trying to figure out how to use a mysql database with PHP. I ran the
following code:
<?php
// defines database connection data
define('DB_HOST', 'localhost');
define('DB_USER', 'ajaxuser');
define('DB_PASSWORD', 'practical');
define('DB_DATABASE', 'ajax');
// connect to the database
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
|
by: Curtis |
last post by:
Hello everyone:
Recently, I decided to upgrade to PHP 5.2.0. I have C:\php5 in the
Windows XP PATH, so upgrading is quite painless; just unzip new
release, and restart Apache! Usually it goes off without a hitch, but I
noticed that phpMyAdmin was not able to utilize the MySQLi library
(which was working with my last 5.1.x release). As I was looking
through php_info(), I noticed that MySQLi didn't even load. However,
when I restarted...
| |
by: Schmidty |
last post by:
If you do a page reload with $_SERVER will your program
lose a mysqli connection upon the reload of the page? Would this code
work? I need to know how to carry over a connection between methods as
I am new to OOP? Thanks...
Example; ========================================
<?php
// webpage
$newsignon = new newuser();
logon();
|
by: Curtis |
last post by:
Hello everyone:
I have come to love the ease of updating PHP, since getting used to
using it these past few years. Recently, however, when I upgraded from
PHP 5.1 to PHP 5.2.0 and again when moving to 5.2.1, I noticed strange
behavior when trying to load php_mysqli.dll. I am using Apache 2.2.3
on Windows XP Pro (32-bit). I use the php5apache2_2.dll to load PHP as
an Apache module. The PHPIniDir directive in httpd.conf points to the...
|
by: Daz |
last post by:
Hi everyone.
I am trying to create an extension of the mysqli class within PHP, and
I am finding it quite difficult. I am fairly new to PHP classes, and
decided to give them a go. Here's what I have to far:
<?php
class sql_db extends mysqli
{
var $connection = false;
|
by: webcm123 |
last post by:
People say that structural programming isn't good for database
connection. I code fast-running structural oriented CMS and I don't
know what I should do. I use mysql connection using mysql_*. I want
also to use SQLite.
Can you give me some advices?
1. PHP4 is still used. I want to be compatible.
2. There are various methods - MySQL, MySQLi, SQLite, PDO... I have
|
by: Michael |
last post by:
Hi,
I try to use mysqli object instead of standard mysql functions.
Is it ok to create mysqli object within my class or schould I pass
mysqli object to my object.
The problem is, with code below I must call mysqli->connect() each
time I call class methods. How do I create an connection for hole
object, so methods can do queries without connect each time?
Best Regards, Michael
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |