[Wolves] PHP/MySQL help please

Wayne Morris wayne at machx.co.uk
Mon Jul 25 16:31:24 BST 2005


Peter Cannon wrote:

>On Monday 25 July 2005 15:36, Simon Morris wrote:
>
>This might be a blind alley as I'm relating this from memory seeing as the 
>Suse box is at home.
>
>  
>
>>So really you shouldn't be able to call mysql_connect.inc in a web
>>browser.. you should get a 404 error rather than a blank page ;)
>>    
>>
>
>Um I was under the impression that this was the idea to give a Browser based 
>login??
>
>  
>
>>Sounds like you should move that file up a level and not have it in your
>>webroot. It's a security issue rather than a purely technical issue so
>>your code would work where ever the file is stored.
>>    
>>
>
>It may be that the 'connect' file is in the wrong place or coded wrong in the 
>book it was in a folder called /html I had to create this myself as it wasn't 
>there, now if I do localhost/html (I think thats what I did) it does the 
>same, looks like its trying to load something then I get at the bottom left 
>'Done' but no login screen thats why I tried the PHPmyAdmin file that gets 
>installed along with PHP5 I figured that that must work as it was part of the 
>rpm.
>
>My fault elimination process was;
>
>1. Check Apache is working | works fine and restarted several times.
>2. Check MySQL is working | I knew that was OK used it for weeks.
>3. Check PHP is working | hm how? Ah PHPmyAdmin, :(
>
>Number 3 is where I get the "Unable to load MySQL Module" so I figure if that 
>don't work then the mysql_connect.inc ain't gonna work either.
>
>I think some variable has not been set or something I'll know more if Dave's 
>(and others) suggestion works or fails.
>
>  
>
>>Nope, but maybe I should start writing one!! It would be a bloody short
>>one. "MySQL and PHP.. on the back of a matchbox by Simon Morris"
>>    
>>
>
>Wow you know that much!! 
>I'm that ignorant I'm just about entitled to write the names MySQL & PHP. ;-)
>
>  
>
>>Maybe you should alter your httpd.conf file so it accepts index.php as a
>>valid DefaultIndex name
>>    
>>
>
>Eeuuww I don't like the sound of that knowing me I'll break something and then 
>I cant sit back all smug like with the "I don't know what the problem is I'm 
>alright Jack"
>  
>
Did you see my reply?
It WON'T work unless you install Apache,Mysql and php TOGETHER in one 
operation, if you install them all separately they ignore each other.
Use apt-get install apache,mysql,php  (not correct syntax, but thats the 
principle.

I banged my head on this more than once and thats what you have to do!

Oh, good reading for you:
http://web.archive.org/web/20020202044049/http://www.mysql.com/articles/ddws/index.html
"Building a php/mysql database"

Its from mysql.com, but they deleted the second half of the article to 
get you to buy the book, but if you use the link above the
entire (very useful) tutorial is archived, runs to some 100 pages of A4 
if you print it out.













More information about the Wolves mailing list