NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Call to undefined function mysql_connect()


Joined: 17 May 2008
Posts: 7
Reply with quote
My problem is a little bit different from most. My executables works fine in browsers like Internet Explorer but does not work in NuSphere PhpED's browser; I get the following errors like the following: Fatal error: Call to undefined function mysql_connect(). I want to use the debugger but I can’t because of the errors.
Please help!
View user's profileFind all posts by XXLAKRESXXSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
This usually means that the MySQL PHP extension isn't loaded. Create a php file with phpinfo(); in it, its output should included references to mysql. If not, check your php.ini file (the phpinfo output will tell you where to find it) and make sure that there is a line extension=php_mysql.dll (or .so if you're on linux) in the file. If you made any changes to it you'll have to restart the webserver.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
I checked the items you told me to chec.


Joined: 17 May 2008
Posts: 7
Reply with quote
I checked the items you told me to check and they seem fine. I did see a reference to mysql and mysqli amd the php.ini file has the extension for mysql. Below is what I found.


extension=php_msql.dll
extension=php_mysql.dll
extension=php_mysqli.dll




mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 4.1.7

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

mysqli
MysqlI Support enabled
Client API library version 4.1.7
Client API header version 4.1.7
MYSQLI_SOCKET /tmp/mysql.sock

Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off
View user's profileFind all posts by XXLAKRESXXSend private message
PS


Joined: 17 May 2008
Posts: 7
Reply with quote
I am using Windows XP.
View user's profileFind all posts by XXLAKRESXXSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
The fact that you are using XP has nothing to do with it Smile
Small question: is there a difference between where you tested the script with phpinfo() and your actual script? FYI PHP will use a different INI file when running scripts from the command line and/or webserver. I'm just asking because I can't think of any other reason the "undefined error" pops up when the extensions are loaded.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 17 May 2008
Posts: 7
Reply with quote
1. php.ini is in C:\php\php.ini
2. phpinfo() is in C:\Program Files\Apache Group\Apache2\htdocs
3. The way I run the php exe. is in my Internet Explorer I type: http://localhost/phpinfo.php
View user's profileFind all posts by XXLAKRESXXSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
1. php.ini is in C:\php\php.ini
2. phpinfo() is in C:\Program Files\Apache Group\Apache2\htdocs
3. The way I run the php exe. is in my Internet Explorer I type: http://localhost/phpinfo.php

Looks like you did not configure PhpED to use this php. By default it comes with its own php which is 4.4.8/5.2.6 at the moment.
It sholdn't be that hard to type phpinfo() in the IDE and run it.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] Call to undefined function mysql_connect()
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic