Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Little error for expertise
Old 06-22-2006, 12:33 PM Little error for expertise
Junior Talker

Posts: 2
Trades: 0
hi all
im new with PHP and Mysql
so i have this stuipt errer each time
-----------------------------------------------------------------
Fatal error: Call to undefined function mysql_pconnect() in c:\Inetpub\wwwroot\lesson7\testconn.php on line 8
------------------
for this code
<?php
$username = "root";
$password = "123";
$link = mysql_pconnect("localhost", $username, $password)
or die ("Connection <font color='#FB0209'>Not</font> Complete<hr>".mysql_error());
echo "Connection <font color='#1A5816'>Complete</font>!!! ";

?>
plz help
saqqa is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-22-2006, 01:59 PM Re: Little error for expertise
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
The function "mysql_pconnect isnt a defined function - you have added a 'p' by accident, take it away and it should be fine. The function should read "mysql_connect".

Stoot
stoot98 is offline
Reply With Quote
View Public Profile
 
Old 06-22-2006, 04:30 PM Re: Little error for expertise
Extreme Talker

Posts: 160
Trades: 0
The mysql_pconnect function creates persistent connections to the database.
It sounds like your PHP configuration does not support MySQL - check the output of phpinfo(); to confirm this.

I guess you are using PHP 5. If so you may be missing the MySQL client library and appropriate php.ini configuration.
Are you using Linux or Windows?

Last edited by ElectricSheep; 06-22-2006 at 04:41 PM..
ElectricSheep is offline
Reply With Quote
View Public Profile
 
Old 06-23-2006, 02:33 AM Re: Little error for expertise
Junior Talker

Posts: 2
Trades: 0
reply to stoot 98
i correct the mistake but stil the same


reply to electricsheep
plz , can u tell me how to configure php.ini

im using

winxp with ISS
php-5.1.4-installer
mysql-4.0.26-win32
saqqa is offline
Reply With Quote
View Public Profile
 
Old 06-23-2006, 04:46 AM Re: Little error for expertise
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
you need php_mysql dont know what its called under windows but its obviously a lack of mysql support.

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 06-23-2006, 03:46 PM Re: Little error for expertise
Extreme Talker

Posts: 160
Trades: 0
Hi again,

I haven't used Windows for a while but I think the following will work :

Try these steps BEFORE running any php scripts :

don't worry if you cannot carry out a particular step, just complete the steps that you can

go to your php folder
look in the extensions subfolder ( possibly called 'ext' )
look for the files 'php_mysql.dll' and 'libmysql.dll'
copy what you find in to your 'WINDOWS/system32' folder

find your php.ini file, possibly in the Windows folder
copy the file and save it to a safe place as a backup

open the original in Notepad

look for the line that starts extension=libmysql.dll
remove the ; at the beginning of this line

look for the line that starts extension=php_mysql.dll
remove the ; at the beginning of this line

save the file

run a script that uses a mysql function to see if things are working
it may be best to reboot your machine to double check that it is now working

let us know how you get on - good luck!
ElectricSheep is offline
Reply With Quote
View Public Profile
 
Old 06-23-2006, 06:32 PM Re: Little error for expertise
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
Ah ok, wasnt aware of that other function, just presumed it was a typo... hope you get it working....
stoot98 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Little error for expertise
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25405 seconds with 12 queries