top.php is not processed by apache

Asked 2 years ago, Updated 2 years ago, 52 views

apache 2.4
php5.3.29
centos7

Thank you for your continuous support.
Questions are as follows

  • top.php not recognized

/var/www/html/xxx/index.php
/var/www/html/xxx/lists.php, etc.
The is processed as a php file.

/var/www/html/xxx/top.php
Only the is not treated as a php file.
You must choose to open or save the file.

Top.php Contents

<?php
phpinfo();
require_once 'common.php';
require_once'config.inc.php';
require_once 'userAuth.php';
display('systemtop.tpl.php');
?>

There are no syntax errors in apachectl-t.

So I tried the following:

  • Change top.php to top1.php

Visit localhost/XXX/top.php again
I was forced to open/save the top.php above.
What does top.php mean when it should not exist?

  • Tried to change the contents of top.php

Top.php Contents

<?php
phpinfo();
?>


when changing to and accessing localhost/XXX/top.php I was forced to reopen/save it, and when I opened it, I found out

<?php
phpinfo();
require_once 'common.php';
require_once'config.inc.php';
require_once 'userAuth.php';
display('systemtop.tpl.php');
?>

has been downloaded.

Is there a cache or something left?

Please give me advice/pointing/calling/anything.

php centos apache

2022-09-30 11:01

2 Answers

As for the questioner,
The reason was that there was a cache left in the browser.
Clearing the cache resolved.
Thank you.


2022-09-30 11:01

Do you mean that only top.php among php files placed in the same directory is treated as static files?
Why don't you try ls-l*.php to see if there are any problems with the permissions (apache executives probably have the right to execute in apache)?
Also, check the apache access log...sorry for all the advice.


2022-09-30 11:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.