introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.
-->

esayphp windows 7



Posted by: mujer esponja
March 04, 2010 11:33AM
Hello everybody!
I am starting to work with php, and i am not an expert. but i had problems with phpmyadmin.
I was told that was a problem of compatibility with my operatve system (windows 7). i tried to use virtual PC, but my machine didn“t like it.
so i asked again, and i was told about sqlyog, a new interface to mysql wich works at win 7.
my new problem is how to connect my easyphp server!
i tried with things like this:

$link=@mysql_connect("localhost","","")or die(mysql_error());
@mysql_select_db("prueba",$link)or die(mysql_error());

but does not work. I don`t know if this is a new problem of compatibility or if i am doing something wrong.
is anybody working with windows 7 with no problem?? could you tell me how??

thank you so much from spain!!
Posted by: Amour
March 04, 2010 12:59PM
With Windows 7, you can use 127.0.0.1 and not localhost ;)
Posted by: mujer esponja
March 04, 2010 06:02PM
No, that's not the problem.
I have realised thet the correct code to connecting with the data base is:

function conectar(&$c){
$c=mysql_connect("localhost","root","");
mysql_select_db("prueba", $c);
}
function desconectar(&$c){
mysql_close($c);
}

with no @.
But you must use sqlyog at the end. Or at least that is my conclusion....
Thank you anyway!
Posted by: Thierry
March 04, 2010 07:36PM
You missed user argument (root) in your first code.
Posted by: flybil
March 05, 2010 06:43PM
thank you for this information it got me out an impasse! and now it's work perfectly! thanks again ;)
Posted by: Thierry
March 06, 2010 02:54PM
You can also check latest point of FAQ. Modifying "hosts" file may resolve general connection problems.