Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache Mysql Php: mysql with php doesn't work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Thu Dec 25, 2003 1:35 pm    Post subject: Apache Mysql Php: mysql with php doesn't work Reply with quote

Hola

I compiled and installed the latest version of apache, mysql and php just the other day. I have just gotten around to testing to make sure that all 3 work with each other and I did this by creating:
Code:
<html>
<head>
<title></title>
</head>

<body>
<?php
 $connection = mysql_connect("localhost","root","")
 or die("sorry - unable to connect to MySQL");
 echo("Congrats - it's working");
?>
</body>
</html>

Now if all was working fine I should have seen the "Congrats" message when viewing the file saved as php on apache. I know that the apache is working and that php is working... however when trying to view that partuicular file I get an error message:
Quote:
Warning: Unknown(/usr/local/apache2/htdocs/index.php): failed to open stream: Permission denied in Unknown on line 0

Warning: (null)(): Failed opening '/usr/local/apache2/htdocs/index.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

Now unfortunately, I'm a php / mysql "know nothing" at the moment (soon to change hopefully) but I'm not sure where to go from this error. I checked the php info file and something strange I noticed is the MySQL section:
Quote:
Client API version 3.23.49

Now I know 100% that I compiled in the latest mysql which happens to be 4.0.17: so could this be my problem?

Any help really appreciated and merry christmas too :)
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Thu Dec 25, 2003 9:16 pm    Post subject: Reply with quote

i'm also a php/mysql/apache "now very little" ...but i've read on the TikiWiki page that in order to emerge tikiwiki (a php/*sql-based wiki) you have to emerge it with USE="apache php mysql" ...so what happnes if you emerge php/mysql/apache again with USE="apache2 php mysql"

note: i haven't tested my apache2/php/mysql/tikiwiki gentoo install at work yet, so, don't do this (unless you want to watch everything recompile for porabably no effect) if anyone has a better idea then me ...i'm pretty sure someone has :)

btw: did you configure apache to use php (and mysql)?
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Fri Dec 26, 2003 12:08 am    Post subject: Reply with quote

Firstly, I stayed away from emerge for this task. I manually compiled Apache2, PHP and MySQL all from source. Apache and PHP work just fine. It's the first time I decided to use MySQL, wanted something to learn that would be real valuable. I did compile PHP to work with MySQL. It was one of the switched I added when doing ./configure

Any more ideas? Thanks :)
Back to top
View user's profile Send private message
hook
Veteran
Veteran


Joined: 23 Oct 2002
Posts: 1398
Location: Ljubljana, Slovenia

PostPosted: Fri Dec 26, 2003 9:06 am    Post subject: Reply with quote

no idea ...but i'd meddle a bit with the config files if i were you :?

maybe the guys on the irc channel could help you sooner in this case ...sorry
_________________
tea+free software+law=hook

(deep inside i'm still a tux's little helper)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum