View previous topic :: View next topic |
Author |
Message |
breakerfall Guru
Joined: 02 Aug 2003 Posts: 509 Location: Manchester, UK
|
Posted: Thu Dec 25, 2003 1:35 pm Post subject: Apache Mysql Php: mysql with php doesn't work |
|
|
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 |
|
|
hook Veteran
Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Thu Dec 25, 2003 9:16 pm Post subject: |
|
|
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 |
|
|
breakerfall Guru
Joined: 02 Aug 2003 Posts: 509 Location: Manchester, UK
|
Posted: Fri Dec 26, 2003 12:08 am Post subject: |
|
|
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 |
|
|
hook Veteran
Joined: 23 Oct 2002 Posts: 1398 Location: Ljubljana, Slovenia
|
Posted: Fri Dec 26, 2003 9:06 am Post subject: |
|
|
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 |
|
|
|