You are here: Re: Fatal error: Call to undefined function mysql_connect() « PHP Language « IT news, forums, messages
Re: Fatal error: Call to undefined function mysql_connect()

Posted by Jim Michaels on 11/21/13 11:37

the call to mysql_connect should look like
$link=mysql_connect("server", "username", "password");

but I don't think that matters now. it sounds to me like PHP itself can't
find this function in the extension. So maybe the extension is not working
like it should. this is bizarre.

do you have two different versions of PHP around, or did you upgrade? I am
curious if an old DLL file is sticking around. sometimes installers won't
replace a file if it already exists - it depends on how they configured it.

<mclai@mail.com> wrote in message
news:1133412962.339061.273720@o13g2000cwo.googlegroups.com...
>I am new to PHP and I have trouble to make a db connection when the php
> script runs on a browser. It is fine when it runs at a shell/command
> prompt.
>
> I have tried a number of settings suggested by several users posted on
> the Web about how they resolved this problem but none works for me.
>
> It seems that MySQL is not supported when I run the script over a Web
> browser but it works well when it is at command prompt, because I
> cannot see "MySQL Support enabled" when phpinfo() reports over a
> browser. It is clear to see that "MySQL Support => enabled" when the
> script for phpinfo() is running at a command prompt.
>
> My system is Windows 2003 with IIS 6.
> PHP 5.1 and MySQL 5.0.13
>
> Inside the php.ini, the followings are set as instruction:
> extension_dir = "c:\php\ext"
> extension=php_mysql.dll
>
> The system environment PATH variable has included the PHP
> install-directory "c:\php".
>
> ISAPI is set for IIS 6 pointing to php5isapi.dll and the Web Service
> Extension at IIS 6 for accessing php5isapi.dll is created with "Allow"
> status. I have also checked that .cgi extension is included in the
> Mappings tab of each Application Configuration.
>
> I can run the php script over the browser to create directory, open and
> delete files but I cannot do anything with the database access. But
> the db actions are working fine when I do it at the command prompt.
>
> I have been working on this for almost a week and tried everything I
> can but I am still unable to make a connection to the database over
> HTTP. I wish that someone here who can give me some pointers or
> insight. I will deeply appreciate. Thanks.
>
> Punkin
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация