dansk Posted December 21, 2006 Share Posted December 21, 2006 Hey everyone, after some googling, I landed on this website, I am hoping that you guys will not let me down.I am fairly new to php, i installed phptriad, started apached, created a test file called test.php, put it in my c:\apache\htdocs\then tried to run it in //localhost/test.php, and nothing comes upfor example, i put this in the file<?php$name = "sun";$age = "14";echo "Hi i am $name and i am $age years old";?>and this is what i get<?php$name = "sun";$age = "14";echo "Hi i am $name and i am $age years old";?>The only thing that i did is that i installed some FF updates, that's allthanks Link to comment https://forums.phpfreaks.com/topic/31433-cant-get-php-to-start/ Share on other sites More sharing options...
hawkeye0203 Posted December 21, 2006 Share Posted December 21, 2006 apache isn't recognizing .php as a valid page and doesn't know what to do with it.stop and restart apacheif that doesn't work, in your Apache config file, scroll to the very bottom and there should be a line in there that was placed by the php installation. If that isn't there, reinstall php. Link to comment https://forums.phpfreaks.com/topic/31433-cant-get-php-to-start/#findComment-146007 Share on other sites More sharing options...
dansk Posted December 21, 2006 Author Share Posted December 21, 2006 Thank you,it's working nowI installed PHP coder, i wrote some code to get some info from mysql DB called Library, and table is called Books<?php// making the connnection$query = "SELECT * Books";$result = mysql_query($query) or die(mysql_error());$row = mysql_fetch_array($result) or die(mysql_error());echo $row['Book Name']. " - ". $row['Date'];?>I just wanna print the name of the book and the date (just for testing purposes).But for some reason, I am unable to connect my php coder to my local server, what is my webserver doc diectory and what's my web server root url? Link to comment https://forums.phpfreaks.com/topic/31433-cant-get-php-to-start/#findComment-146125 Share on other sites More sharing options...
hackerkts Posted December 25, 2006 Share Posted December 25, 2006 http://localhost/ or http://127.0.0.1/ Link to comment https://forums.phpfreaks.com/topic/31433-cant-get-php-to-start/#findComment-147460 Share on other sites More sharing options...
dansk Posted December 26, 2006 Author Share Posted December 26, 2006 Thank you very mucho :) Link to comment https://forums.phpfreaks.com/topic/31433-cant-get-php-to-start/#findComment-148025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.