473,699 Members | 2,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My PHP file is unable to connect MYSQL

Rahulnewdelhi
7 New Member
hello all

Hello all

I installed php, mysql and IIS in xp. Problem is this while i run following file

PHP Code:
----------------

<?php
phpinfo();
?>

it doesnt show mysql info table in result. I seen mysql server it is running well. While i am trying to connect

my php file to mysql database then it doesnt connect. why it is happening? how to short out this problem,

please help me

regards
May 4 '07 #1
12 2888
james01
1 New Member
i will want you to send me your mail adress anmd i will send ou the mailer on
here is my mail adress(jamescot t_2@hotmail.com )...



Hello all

I installed php, mysql and IIS in xp. Problem is this while i run following file

PHP Code:
----------------

<?php
phpinfo();
?>

it doesnt show mysql info table in result. I seen mysql server it is running well. While i am trying to connect

my php file to mysql database then it doesnt connect. why it is happening? how to short out this problem,

please help me

regards[/quote]
May 4 '07 #2
teesha
4 New Member
i think you need to verify dynamic extensions in "php.ini " (your configuration file)
extension=php_m ysql.dll
extension=php_m ysqli.dll
don't forget to restart your server
May 4 '07 #3
pbmods
5,821 Recognized Expert Expert
Did you install PHP after you installed MySQL? DId you install PHP with MySQL support? It's been awhile since I've worked on a PC, but when you're using the PHP installer, it should give you the option to install optional components. Verify that MySQL is selected in that list.
May 5 '07 #4
Rahulnewdelhi
7 New Member
Hello all

I installed php, mysql and IIS in xp. Problem is this while i run following file

PHP Code:
----------------

<?php
phpinfo();
?>

it doesnt show mysql info table in result. I seen mysql server it is running well. While i am trying to connect my php file to mysql database then it doesnt connect. why it is happening? how to short out this problem,

please help me
May 8 '07 #5
ak1dnar
1,584 Recognized Expert Top Contributor
[PHP]<?php
if (function_exist s('mysql_connec t')) {
echo "function available.<br />\n";
} else {
echo "function not available.<br />\n";
}
?> [/PHP]

what is the output that you can get in your end for this script.
May 8 '07 #6
Motoma
3,237 Recognized Expert Specialist
You may still need to configure PHP to work with MySQL. PHP.net is a great resource for such information.
May 9 '07 #7
Rahulnewdelhi
7 New Member
This function is not working and showing result "function not available".



[PHP]<?php
if (function_exist s('mysql_connec t')) {
echo "function available.<br />\n";
} else {
echo "function not available.<br />\n";
}
?> [/PHP]

what is the output that you can get in your end for this script.
May 10 '07 #8
ak1dnar
1,584 Recognized Expert Top Contributor
This probably the configuration on your PHP.ini read this article.
Installation on Windows Systems
May 10 '07 #9
ufitzi
3 New Member
This post may have something to do with your problem.
http://www.thescripts.com/forum/thread429124.html

I'm currently in the same boat as you, both PHP and MYSQL are running, but PHP doesn't seem to be finding the php.ini file, which in turn results in the /ext/ directory (where the php_mysql.dll is located) not being read correctly.

If you run the phpinfo() function, you will see a summary of all php environment.
My guess is you will find the values you've entered in your php.ini file are NOT the ones being used. The post above seems to indicate a solution, however he was not very specific in the steps taken to resolve this issue. I would like to contact him to determine those steps, but he posted as a guest user. Hopefully someone else has info on the permissions solution he described.Good luck, I will post back here once I've figured this out.
bh
May 25 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
483
by: Alan Williamson | last post by:
looking through all the forums and newsgroups it would appear that mysql.sock is definitely one for the Top10 of all time problems. However, i have yet to see an answer that properly addresses it. I have a production system, that is running away with no problems. However every so often the command line 'mysql' seems to be unable to connect to the main server running. It complains it can't find the file. Now here is the rub; the file...
1
7951
by: Sridhar Reddy | last post by:
Hi, Where can i get the download mysql.sock file? I am unable to connect to local server because i dont have this file? thanx in advance Sridhar
3
2588
by: pc | last post by:
hi everyone, I am trying to connect to a new mysql installation. I have given root permission to connect to all databases from anywhere; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'passwd' WITH GRANT OPTION; I can log on locally by specifying the host name:
1
6493
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
23
4260
cyberking
by: cyberking | last post by:
Hi. I have just started learning PHP along with MySQL. I am trying to connect to the MySQL DB server but unable to. I have been tryin. Please help. Its urgent cos I shall soon have to work on PHP . My testing program is as follows : <?php $si = function_exists('mysqli_connect');
1
4129
by: iceboy | last post by:
Hello to all,I have a problem to connect PHP & MySQL together. I have created a form that gets the username & password from admin and connect him to database.the part of PHP script that connect to mysql is as follow: $db=mysql_pconnect("hostname",$username,$password); if(!$db){ echo"ERROR:connecting failed"; exit; } else echo"you have connected to database succsessfully"; I want to know what should i write instead of "hostname"...
1
3160
by: ynyus75 | last post by:
Hey! I am unable to connect some of the services that I host from my laptop at home, such as SMTP and MySQL on port numbers 25 and 3306 respectively. But I am able to some services such as Telnet, Remote Desk Connection, SSH. Here are my details ISP: Time Warner Connection Type: Cable Router: Lynksys Port Farwarding: enabled port farwarding to HTTP, Telnet, HTTPS, Remote Desktop Connection, SSH, MySQL etc to my laptop. Connection Type...
8
5297
by: malaysiauser | last post by:
Im new user of PHP and MySQL. I tried to use a script package for my web. I'd created a database. And my connection scripts are as follow; <?php $mysql_host="localhost"; $mysql_username="hidden";
5
1874
Markus
by: Markus | last post by:
I'll leave out the annoying 'i'm a newbie' speech and get to the point: i'm a newbie at perl ;) First thing i ever wrote in perl and it doesnt work. I'm using xampp as my localhost - with perl installed on that. When i run this (http://localhost/mysql.pl) it just prints out the contents of the file and not an array if the databases... Enlighten me, oh gods of perl #!"C:\xampp\perl\bin\perl.exe"
0
8612
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,...
0
9032
jinu1996
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...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
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...
0
7743
agi2029
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...
1
6532
isladogs
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...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.