 | Member with 51 posts. | | Join Date: Sep 2004 Experience: much to learn | | apache can't talk to mysql...help please Hi there, more problems for me, but huge thanks to those that helped last time.
This time, when I try to load my webpage (recently had one built using php) I'm getting this message: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/global.php on line 47 (feel free to look 'www.mushka.com' -please be nice, my security may not be all it should right now but friendly advice welcomed).
obviously the global.php is specific to my site but the problem is that apache can't say hello to mysql. The reason for this it seems is that I don't have the relevant php-mysql mod installed (tried rpm -qa | grep php and no mention of php-mysql).
Only problem is that everytime I try to install one I get the same "not a valid rpm file" message displayed.
I'm on Fc1, apache 2.0.50, mysql 4.1.7
have I made some fundamental blunder or is it a reinstallation of a more complete rpm of apache?
or neither?
throw me a bone.
chz ben
ps if you can point me to an rpm that you know is working that would be a great help
Last edited by mushka : 09-Nov-2004 02:36 PM.
| | Senior Member with 1,246 posts. | | Join Date: Sep 2003 Experience: Linux~su | | do you have mod_php installed? If not you need that installed so that apache can talk to php.
That should fix at least part of the problem. | | Member with 51 posts. | | Join Date: Sep 2004 Experience: much to learn | | got that now, next prob=
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /var/www/html/global.php on line 47
Invalid Query: SELECT * FROM items WHERE item_page=1 AND item_publish=1 ORDER BY item_date desc,item_id desc
thoughts?
chz
could there be anything changed in the syntax of the php file to allow the query?
here's the **edited** version of the global.php file
<?php
$global=array(
'dir'=>array(
'tpl'=>'/***/***/***s*',
'resource'=>'/***/***/***/***',
'banners'=>'/***/***/***/***/***',
),
'url'=>array(
'resource'=>'/***',
'banners'=>'/****/***',
),
'types'=>array(
'pdf'=>'pdf',
'doc'=>'doc',
'jpg'=>'img',
'JPG'=>'img',
'gif'=>'img',
'jpe'=>'img',
'jpeg'=>'img',
'png'=>'img',
'mov'=>'mov',
'mp3'=>'mp3',
'wma'=>'wma'
),
'admin'=>array(
'username'=>'***',
'password'=>'***',
'email'=>'***@***.com'
),
'meta'=>array(
'keywords'=>'***, ***, ***, ***, ***,***,***, ***, ***',
'description'=>'**********'
),
'default_page_id'=>array(
'index'=>1,
'contact'=>2
)
);
$db_connect=0;
#error_reporting(E_ERROR);
function _db_connect() {
global $db_connect;
if (!$db_connect) {
mysql_connect('l**','**','**');
mysql_select_db('**');
$db_connect=1;
}
return;
}
function db_query($sql){
_db_connect();
$rows=array();
$result=mysql_query($sql) or die('Invalid Query: '.$sql);
return $result;
}
function db_insert($sql){
_db_connect();
$rows=array();
$result=mysql_query($sql) or die('Invalid Query: '.$sql);
return mysql_insert_id();
}
function db_select_array($sql){
_db_connect();
$rows=array();
$result=mysql_query($sql) or die('Invalid Query: '.$sql);
while ($row=mysql_fetch_array($result)){
array_push($rows,$row);
Last edited by mushka : 09-Nov-2004 05:14 PM.
| | Member with 51 posts. | | Join Date: Sep 2004 Experience: much to learn | | | | | Senior Member with 1,246 posts. | | Join Date: Sep 2003 Experience: Linux~su | | gomen for not getting back to yo uon this one. Glad you found the answer (school & works been kicking my butt and i've been zonking out way too early) and posted it in here. |  THIS THREAD HAS EXPIRED.
Are you having the same problem?
We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.
|
Smart Search
| Find your solution! | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |  WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 04:38 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|