Jump to content

Cant execute PHP to browser


sinan92

Recommended Posts

I can't execute the PHP file to the browserI tried it with both IE and FirefoxThis is the code:

<html><body><?phpecho "Hello World";?></body></html>

Later on I downloaded PHP and installed it which caused this problem when I open the php file as Firefox on IEPHPproblem.png

Link to comment
Share on other sites

try using http://localhost/php/hello.php you are using absolute path like C://xampp....which will not execute it it will just open it.
Then I just get nothingAll I get is an empty pagePhpProblem2.pngTried both Localhost and 127.0.0.1 they didn't workI started Xampp but it didnt work with that eitherI did notice that Xampp somehow cant start Apache thoughI dont know if it has to do with PHPfile:///C:/xampp/htdocs/index.xhtmlThat does work but only with xhtml or html When I try it with php it gives the first errorAlso when I try to open the xhtml file this way:http://127.0.0.1/index.xhtmlIt gives me this error
XML-parsefout: geen element gevondenLocatie: http://127.0.0.1/index.xhtmlRegelnummer 1, kolom 1:^

Means that no elements were found on that location at row 1 col 1: ^

Link to comment
Share on other sites

Apache needs to be running. PHP runs on a web server. You should figure out why Apache is not starting and then try opening the file in your browser, pointed to localhost.

Link to comment
Share on other sites

Apache needs to be running. PHP runs on a web server. You should figure out why Apache is not starting and then try opening the file in your browser, pointed to localhost.
Alright I will try to find outThis is what XAMPP says btwXAMPP.pngCould it be that the port should be forwarded for it?
Link to comment
Share on other sites

It looks like apache is not being started. you may like to check the error log for apache to figure out what problem is ocuring

Link to comment
Share on other sites

It looks like apache is not being started. you may like to check the error log for apache to figure out what problem is ocuring
Ah but ofcourse! It was Skype which blocks port 80 :)Thanks a lot guys :)Now I can finally start learning PHP lol
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...