2
Apache has been installed in a centos 7
and the service is active and php has also been installed, but whenever game in nagevador php does not run, just shows the php code.
when checking the version with the command php -v
show me
PHP 7.2.7 (cli) (built: Jun 20 2018 08:21:26) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
And the http server is active.
I’m wearing Centos 7
When you run a local project some error appears ?
– Mike Otharan
No error appears. Neither the
info.php
works. Shows the code in the browser– SM_S
I think that answer might help you: https://answall.com/a/178453/84579
– Mike Otharan
If you don’t run a test and check that your php is running, create an index.php file inside your htdocs file where is apache and then put <?php echo="Testing PHP"? > if you return the message is because everything is ok
– Mike Otharan
is it possible that it is because the php code is not in the correct directory? it is in this path:
var/www/html/
– SM_S
Yes great chances of being that same.
– Mike Otharan
and what is the right way? I have to edit in httpd.conf?
– SM_S
No, on which site you followed the apache installation tutorial on centos ?
– Mike Otharan
No. I didn’t install, only php, I can say that has an http service running that is apache
– SM_S