Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem ram recovery router safe mode screen slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
apache can't use php to talk to mysql...help please

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
mushka's Avatar
Member with 51 posts.
 
Join Date: Sep 2004
Experience: much to learn
09-Nov-2004, 02:20 PM #1
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.
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
09-Nov-2004, 04:07 PM #2
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.
mushka's Avatar
Member with 51 posts.
 
Join Date: Sep 2004
Experience: much to learn
09-Nov-2004, 05:05 PM #3
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.
mushka's Avatar
Member with 51 posts.
 
Join Date: Sep 2004
Experience: much to learn
10-Nov-2004, 08:23 AM #4
FYI all those who have a similar problem here was the fix:http://dev.mysql.com/doc/mysql/en/Password_hashing.html

chz
tsunam's Avatar
Senior Member with 1,246 posts.
 
Join Date: Sep 2003
Experience: Linux~su
10-Nov-2004, 06:13 PM #5
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.
Closed Thread Bookmark and Share

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.

Thread Tools


You Are Using:
Server ID
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.
Powered by Cermak Technologies, Inc.