2
I normally installed PHP and APACHE2 but it does not interpret PHP code, follow test code:
<?php echo "teste";
It returns me an "html" page with this written, and comes from a "print" written test
Files without find in the /var/www/html folder with 755 permissions I didn’t change anything in the settings of apache2 just gave start
I read about change in httpd.conf file but I can’t find it inside my system
And you put the PHP code inside a file
.html
? Have you configured Apache to interpret HTML files with PHP? If not, why not a file.php
? In fact, avoid using low-level terms around here; no one cares how stressed you are with your code. Be brief and clear, always.– Woss
Already tested by changing the file extension to . php?
– lpFranz
@Andersoncarloswoss I apologize now that I saw. Yes I tried to put with an extension . php, but it still returns me as if it were an "HTML", I’m putting in var/www/html, is the problem in the folder...
– Rafael Balmant
It shouldn’t, if Apache (or another server) is running correctly. You can ask the original code of the file?
– Woss
@Andersoncarloswoss Changed, as I said above I read about some changes in httpd.conf file, however, I am not finding
– Rafael Balmant
Is the entire file just this PHP line? Is there nothing else in it? Because the image you posted earlier displayed the word "test" on the screen.
– Woss
So the image I had posted was an HTML code with a PHP part... Now to simplify and be more direct I put the file in an extension . php and put to return me a test message... But I haven’t been successful yet because I think APACHE2 is not being able to interpret.
– Rafael Balmant