vince_v

Registered
May 9, 2013
2
0
1
cPanel Access Level
Website Owner
The question is, how can i make PHP work?.

For some reason, php is not working at all. Not even a simple echo works.

By example, if i put a html or php file. With this

<!DOCTYPE html>
<html>
<body>

<?php
echo "My first PHP script!";
?>

</body>
</html>
When i enter the page from browser, i only got a blank page. I tried using another PHP functions, but nothing.

PHP is not working, just like that. How can be that possible?
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
cPanel Access Level
Root Administrator
Try making it even simpler. Make a file with a .php extension that contains only this:

Code:
<?php
    echo "Hello world!";
?>
In your example, you are trying to embed PHP in HTML, which is valid, but my example is straight PHP, no HTML, which should work by default. If it does not work, you need to ask your hosting provider for assistance. Your hosting provider will be able to check the Apache error_log, which you do not have access to as a site owner, and find the problem.
 

vince_v

Registered
May 9, 2013
2
0
1
cPanel Access Level
Website Owner
I have already tried, was the same.

The only thing i can think that should be, is there is a problem with the server. I guess i can't do anything on that side. So sholud be checking with the provider.