logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: PHP source code displayes for SOME websites
Author
Jivanmukta



Joined: 18 Apr 2023
Posts: 1
Location: Poland, Warsaw

PostPosted: Fri 28 Apr '23 19:57    Post subject: PHP source code displayes for SOME websites Reply with quote

What could be a reason of such a problem: some PHP websites from ~/public_html are working correctly, for some other websites source code PHP is displayed?
Back to top
Otomatic



Joined: 01 Sep 2011
Posts: 149
Location: Paris, France, EU

PostPosted: Sat 29 Apr '23 9:53    Post subject: Reply with quote

Hi,

Maybe because some sites use the PHP "Short Open Tag": <? and this is not allowed in the settings (php.ini):
Code:
; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It is
; generally recommended that <?php and ?> should be used and that this feature
; should be disabled, as enabling it may result in issues when generating XML
; documents, however this remains supported for backward compatibility reasons.
; Note that this directive does not control the <?= shorthand tag, which can be
; used regardless of this directive.
; Default Value: On
; Development Value: Off
; Production Value: Off
; https://php.net/short-open-tag
short_open_tag = Off
Back to top


Reply to topic   Topic: PHP source code displayes for SOME websites View previous topic :: View next topic
Post new topic   Forum Index -> Apache