alexnofue Posted August 21, 2015 Share Posted August 21, 2015 Hello, I am trying to update a program from apache 2.2 to apache 2.4 and php 5.2 to php 5.6.The server seems to be working properly but something is changing the html in a php file i have: <?php//some code?><script type="text/javascript" src="/route/to/some.js" ></script><table width="100%" border="0" >... in the browser is changed to: <!--?php<script type="text/javascript" src="/route/to/some.js"--><table width="100%" border="0" >... I don't know if apache is doing that or what else. Thanks Link to comment Share on other sites More sharing options...
Don E Posted August 21, 2015 Share Posted August 21, 2015 (edited) Is the page saved with .php extension? Is/was php and apache updated with no problems/errors? If all is fine with those, then do you have anything running on the server like a security program working with apache that might cause that? Checking logs/error logs could maybe help you see what's going on as well. Edited August 21, 2015 by Don E Link to comment Share on other sites More sharing options...
Ingolme Posted August 21, 2015 Share Posted August 21, 2015 I'd start with a simple <?php echo 'Hello, World!'; ?> just to ensure PHP is being executed, it sounds like it isn't. Link to comment Share on other sites More sharing options...
alexnofue Posted August 24, 2015 Author Share Posted August 24, 2015 Hello, thank you for your answers. Php is running, it gests some information from a database, etc. but, for example, in the php code: echo "<script> window.location='" . $_SERVER['PHP_SELF'] . "';</script>";exit; then, the output in the browser is: <!--?php<?php<script--><html><head></head><body>window.location='/index.php';</body></html> I don't know if an Apache module can (and it is) doing that. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 24, 2015 Share Posted August 24, 2015 I don't know either, but it's obviously not correct. Are you checking the Apache logs? Where is that HTML comment coming from? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now