473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Configuring PHP and MySQL

13,262 8TB
I have configured my PHP (5) to work on vista business fine.
I've also successfully installed MySQL server 5.0 fine.
In my php.ini I have enabled the line

Expand|Select|Wrap|Line Numbers
  1. extension=php_mysql.dll
I have php_mysql.dll, libmysql.dll and libmysqli.dll in my PHP directory which I have added to my PATH variable.

Still when I try to connect to MySQL from my PHP scripts, I get

Expand|Select|Wrap|Line Numbers
  1. Call to undefined function mysql_connect()
What did I miss?
Jun 18 '07 #1
11 2054
Atli
5,058 Expert 4TB
What HTTP server are you using?

I had a similar problem on Vista Ultimate using IIS7. Usually ISS reflects changes right away, but I had to go as far as to reboot the computer to get this going.
If it is Apache, restarting the server is required for any change, but since it's Vista rebooting wouldn't be a bad idea.

If that doesn't fix it, it might be a security thing. Vista's user system is kind of weird. Might be a good idea to just turn the extra security off. I did :P

And you could try to copy the mysql DLL files to the windows directory. Setting the PATH should be enought, but you never know.
Jun 18 '07 #2
r035198x
13,262 8TB
What HTTP server are you using?

I had a similar problem on Vista Ultimate using IIS7. Usually ISS reflects changes right away, but I had to go as far as to reboot the computer to get this going.
If it is Apache, restarting the server is required for any change, but since it's Vista rebooting wouldn't be a bad idea.

If that doesn't fix it, it might be a security thing. Vista's user system is kind of weird. Might be a good idea to just turn the extra security off. I did :P

And you could try to copy the mysql DLL files to the windows directory. Setting the PATH should be enought, but you never know.
I'm using Apache 2.0.59. I've already restarted the server, and the machine several times. I've been having the problem for about three days now.
Jun 18 '07 #3
Atli
5,058 Expert 4TB
Ok, thats weird.

Did you install MySQL in Admin mode? If not there might be some user privaleges or services missing.
Aparently no user can be admin, so the first time I installed this it failed. It worked however after I ran the install from a cmd window running admin mode.

Also, are you absolutely sure you'r editing the correct php.ini?
I've made that mistake annoyingly often :P
Jun 18 '07 #4
r035198x
13,262 8TB
Ok, thats weird.

Did you install MySQL in Admin mode? If not there might be some user privaleges or services missing.
Aparently no user can be admin, so the first time I installed this it failed. It worked however after I ran the install from a cmd window running admin mode.

Also, are you absolutely sure you'r editing the correct php.ini?
I've made that mistake annoyingly often :P
I installed as Admin alright, same user I used to install apache, php and all my other programs. I can run MySQL fine from the command prompt and I connect to MySQL with Java using jdbc.
The .ini file is the correct one. The changes I make to it reflect in my PHP code like
Expand|Select|Wrap|Line Numbers
  1. asp_tags = On
e.t.c
Jun 18 '07 #5
Atli
5,058 Expert 4TB
Ok, then the php.ini works perfectly; the MySQL server works perfectly...
The only thing it can be is those DLL files. If PATH doesn't work then physicly putting them into the c:/windows/ dir must work.

If not then there is either something horribly wrong, or something extremely simple that we missed :P

You could always try to download the source and rebuild the whole thing :)
Jun 18 '07 #6
r035198x
13,262 8TB
Ok, then the php.ini works perfectly; the MySQL server works perfectly...
The only thing it can be is those DLL files. If PATH doesn't work then physicly putting them into the c:/windows/ dir must work.

If not then there is either something horribly wrong, or something extremely simple that we missed :P

You could always try to download the source and rebuild the whole thing :)
Just put the files in the windows directory, it didn't work.
Then I tried in the system32 folder and it didn't work either.
I have a feeling I'm missing something extremely simple ...
Jun 18 '07 #7
nathj
938 Expert 512MB
I had exactly the problem you are experiencing just the other day. It looks like some good may come of it. I mean exactly the same set up and error message

What I did in the end, under guidance from other members of this forum was to unistall PHP, IIS, Apache (plus other web servers I was trying in my panicked state) and then turn the machine off and on again.

Then I installed IIS7 and insured that was working with the old //localhost. Then I installed the latest PHP onto the laptop and updated the ini file accordingly, leaving it where it was - I did not and do not have a copy in my windows directory. I tested this with the classic phpInfo() and all was well. I should point out that I did leave MySQL as it was at the start.

The final result is that everything works, I hope this will be the same for you, I know the frustration.

Cheers
Nathan
Jun 18 '07 #8
r035198x
13,262 8TB
I had exactly the problem you are experiencing just the other day. It looks like some good may come of it. I mean exactly the same set up and error message

What I did in the end, under guidance from other members of this forum was to unistall PHP, IIS, Apache (plus other web servers I was trying in my panicked state) and then turn the machine off and on again.

Then I installed IIS7 and insured that was working with the old //localhost. Then I installed the latest PHP onto the laptop and updated the ini file accordingly, leaving it where it was - I did not and do not have a copy in my windows directory. I tested this with the classic phpInfo() and all was well. I should point out that I did leave MySQL as it was at the start.

The final result is that everything works, I hope this will be the same for you, I know the frustration.

Cheers
Nathan
Thanks for the advice. I don't like the idea of uninstalling everything but it seems I may have to do that ....
Jun 18 '07 #9
nomad
664 Expert 512MB
Thanks for the advice. I don't like the idea of uninstalling everything but it seems I may have to do that ....
that's what I would do, make sure you get those files in placed in your system as well. Make sure when you reload the files and you update the info in your httpd.conf that you first shut down the services.

I'm using XAMPP which will load Apache, Mysql and PHP for you then all you have to do is update the info you want.

nomad
Jun 18 '07 #10
Atli
5,058 Expert 4TB
Hey, r035198x.

Did you set the 'extension_dir' in the php.ini?
Jun 19 '07 #11
r035198x
13,262 8TB
Hey, r035198x.

Did you set the 'extension_dir' in the php.ini?
Yep. I set it alright .
Jun 19 '07 #12

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

Similar topics

0
by: Grant Cooper | last post by:
I was hoping someone could tell me a way to increase the productivity of a database server. It has nothing else installed other than the newest production version of mysql and the default packages...
6
by: John Salerno | last post by:
Hi everyone. I hope someone can help me with this problem. I have installed MySQL CE 5.0, but during the configuration wizard I get an error. It has frozen up during the final step (MySQL Server...
4
by: dlitty | last post by:
I'm new to MySql and have just installed it on my local machine. I've installed it on the "I" drive and everything went ok. Then I downloaded the MySql connector 3.51.12. It's setup file is on...
3
by: madhulahiri | last post by:
how to install xampp. my php is running bt cannot connect to mysql. mysql is deactivated in status
0
by: hInCh | last post by:
hi, i am having problem,configuring netbeans (tomcat 5.5) with mysql j/connector. i ve used datasources,and getting the error message like. Error Code=0 SQL State=null Cannot load JDBC...
3
tolkienarda
by: tolkienarda | last post by:
hi all, i have been having problems with mamp and i have decided that it probably isn't worth the trouble. problem being that i was relying on that to run a small stupid php mysql program on a mac...
2
by: Eric West | last post by:
Hello all- When I attempt to configure php with the recode library I get the following error: configure: error: recode extension can not be configured together with: mysql Here's my...
1
by: chanshaw | last post by:
Alright so I got php running and installed i have mysql running and installed the thing im having a hard time with is having the php to call information from the mysql database. Im on Windows Vista...
2
by: lawrencesiow | last post by:
hi all, i got some problems with mysql when i test my phpinfo page i didn't see any mysql information at there and also when i try to test my other php pages, i received an error, Fatal error:...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
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...
0
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,...
0
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...

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.