Fatal error: Call to undefined method call expectedDownload::insert() in F:\PHP\AppServ\w

Resolving a Fatal error: Call to undefined function mysql_connect() in RedHat
Resolving a Fatal error: Call to undefined function mysql_connect() in RedHat
In RedHat Linux, you have installed the PHP, MySQL, and Apache packages through the package manager.
After starting the MySQL and Apache services through the service manager, you write a simple test php page to access the MySQL database.
When the page is loaded in the web browser, you receive the error, Fatal error: Call to undefined function mysql_connect().
Sample Code
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_close($link);
The mysql.so extension library does not come with the PHP or MySQL distributions.
It must be installed separately by downloading the php-mysql RPM.
Verify that your installation of PHP has been compiled with mysql support.
Create a test web page containing &?php&phpinfo();&exit();&?& and load it in your browser.
Search the page for MySQL.
If you don't see it, you need to recompile PHP with MySQL support, or reinstall a PHP package that has it built-in, both of which are beyond the scope of this document.
Verify that the line to load the extension in php.ini has been uncommented.
In Linux, the line is extension=mysql.so and in Windows, the line is extension=php_mysql.dll.
Uncomment the line by removing the semi-colon. You might also need to configure the extension_dir variable.
Check if the php-mysql package is installed by opening a terminal window (bash), and typing, rpm&-qa&|&grep&php.
If you don't see it, make a note of the exact version of PHP that is installed.
Find the php-mysql RPM for the version of PHP that is installed on your system.
The easiest way to find it is to search by the version of RedHat you have.
or look on your RedHat CDs.
If you have RedHat 8.0, then navigate to the folder /linux/8.0/en/os/i386/RedHat/RPMS/ and search for php-mysql.
Download this file. (For a list of mirror sites, try
or search Google for redhat mirrors.)
To install the file, open a terminal window and cd to the directory where you saved the RPM.
Then type rpm&-hivv&php-mysql-4.2.2-17.i386.rpm and press enter.
This will install the RPM for RedHat 9.0.
You might also need MySQL-shared-compat RPM if you get a dependency of libmysqlclient.so.10 error while installing.
The last step is to restart Apache.
You can do this with one of the following commands, apachectl&restart or /etc/rc.d/init.d/httpd&restart.
Applies To
RedHat 7.x, 8.0, 9.0, Fedora, Apache, MySQL
& Created , Last Modified , & Shailesh N. HumbadDisclaimer: This content is provided as-is. The information may be incorrect.查看: 5677|回复: 10
dz7安装出现Fatal error: Call to undefined function set_magic_quotes_runtime()
PHP Version 6.0.0-dev
Fatal error: Call to undefined function set_magic_quotes_runtime() in C:\AppServ\www\upload\install\index.php on line 15
一进install就报错,希望解决
本地的吗?!
看下你的magic_quotes_runtime有勾吗?
如有不要勾看...
php6.0这什么版本啊?
你什么运行环境?
; magic_quotes_runtime = off
这样有问题 ??
..默认就是off。。。,但是安不上
没人知道??
给个phpinfo看看?
PHP6是一个非正式的版本,所以最好还是更换成php5.XXX
好像LZ用的是appserv一键安装式的2.6版吧~换2.59版吧!
2.59安后没问题?那我试试吧
Powered byphp调试出错,显示Fatal error: Call to undefined function mysql_connect() in_百度知道
php调试出错,显示Fatal error: Call to undefined function mysql_connect() in
link) or die ('res))
mysql_free_result($this-&111&#39: Call to undefined function mysql_connect() inE;
mysql_select_db(&#39.php on line 16错误代码:&echo 'Connected successfully'
&#47, $this-&gbk&#39?& 数据查询的结果集
var $res. mysql_error()); function getLink() {
$this-&res)
数据库查询错误;);
function getRowNum()
return mysql_num_rows($this-&localhost'&gbk'
/---------------------------------------这里----------------------------
function &query($sql)
mysql_query(&quot. mysql_error())求大神帮助错误码; ; 关闭连接
if($this-& ;
/ ;数据库查询错误;//link = mysql_connect('*数据查询函数*/;AppServ\
if($this-&set names 'res), 'C $conn存储数据库连接字符串
public $link!$this-&res);/ ;: &#39: &#39. mysql_error());res = mysql_query($sql) or die(&#39: 'kechengsheji&#92, ' Could not connect!empty($this-&link);res = mysql_query($sql) or die('
function close()
/com\
return $this-&/root';
return $this-&): 'set names ' 释放结果集
if(?phpclass DataAccess{ /job'插入删除修改操作
function &perform($sql)
mysql_query(&;www&#92. mysql_error()););&link) {
die(' / }
function connect() {
$this-&link)
mysql_close($this-&/&#47:&#92:Fatal error
提问者采纳
但是php5.2配置iis7的时候会出现找不到mysql数据库不能用,而采用php5,就好了,重启服务器,把确少的dll复制到system下.3已经不支持ispi了.ini复制到windows目录下.exe,把php,只支持cgi,单击php-cgi,是因为dll文件没有加载,ispi和cgiphp配置iis7的方式有两种
提问者评价
其他类似问题
为您推荐:
其他1条回答
mysql_connect()没有定义,检查php.ini文件中是不是没有放开对mysql的支持
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁解决Fatal&error:&Call&to&undefined&function&parcv()&in&E
今天下载了一个DedeCmsV5.6-UTF8,配置好之后,出现以下错误提示:
&Fatal error: Call to
undefined function parcv() in E:\www\xxdm\include\dedesql.class.php
on line 489
解决的办法是:
在 include/dedesql.class.php
if(isset($GLOBALS['arrs1'])){ $v1 = $v2 =
''; for($i=0;isset($arrs1[$i]);$i++) { $v1 .= ParCv($arrs1[$i]); }
for($i=0;isset($arrs2[$i]);$i++) { $v2 .= ParCv($arrs2[$i]); }
$GLOBALS[$v1] .= $v2;}
&if(isset($GLOBALS['arrs1'])){ $v1 = $v2
= ''; for($i=0;isset($arrs1[$i]);$i++) { $v1 .= chr($arrs1[$i]); }
for($i=0;isset($arrs2[$i]);$i++) { $v2 .= chr($arrs2[$i]); }
$GLOBALS[$v1] .= $v2;}
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 undefined method 的文章

 

随机推荐