mikensu Posted August 13, 2007 Share Posted August 13, 2007 When I click on the .php files no webpage is coming up. When I include php code in an html page the php code does not show up. But if I save a html code in a .php file the html code does show up. The system does reconize the .php extention as php files. How do I troubleshoot this. Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/ Share on other sites More sharing options...
micah1701 Posted August 13, 2007 Share Posted August 13, 2007 well it could be something complex like not having PHP installed or it could be that you just have an error somewhere in your PHP code which keeps the whole page from being sent to the brower. try this: make a new page, named something like "text.php" the put this code in it. Here is some <b>HTML</b> <br> <br> <?php echo "and Here is some PHP"; ?> if that loads, the I suspect the problem is in your original source code. Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/#findComment-322775 Share on other sites More sharing options...
mikensu Posted August 13, 2007 Author Share Posted August 13, 2007 Ok loaded that code and saved as txt.php and no page shows up. How can I troubleshoot?? <?php echo "and Here is some PHP"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/#findComment-322781 Share on other sites More sharing options...
$username Posted August 13, 2007 Share Posted August 13, 2007 If you are trying to open a *.php file by clicking on it you will get nothing. You have to have a web server with PHP installed to then open them through a web browser "URL/file.php" PHP requires a PHP engine to display or process PHP code. There are many great free package that work great. Google WAMP or LAMP. Brett Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/#findComment-322794 Share on other sites More sharing options...
mikensu Posted August 13, 2007 Author Share Posted August 13, 2007 I did download php and I have a server. I have apache and internet explore. Anything else I can try??? Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/#findComment-322801 Share on other sites More sharing options...
lemmin Posted August 13, 2007 Share Posted August 13, 2007 Are you opening the file by clicking on it? If so, you can't do that. Put the file in your root directory for your apache server and type "http://localhost/file.php" into IE. Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/#findComment-322811 Share on other sites More sharing options...
mikensu Posted August 13, 2007 Author Share Posted August 13, 2007 ok I got the error "You dont have permission to access the file" after i typed http://localhost/"filename" in the root directory url for apache Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/#findComment-322850 Share on other sites More sharing options...
$username Posted August 13, 2007 Share Posted August 13, 2007 Ok it looks like you have to open the permissions on Apache. Maybe something like this. Listen *:80 and some of this. If you read through the httpd.conf you will find lots of stuff in there. Quote Link to comment https://forums.phpfreaks.com/topic/64728-php-help/#findComment-322854 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.