/    Sign up×
Community /Pin to ProfileBookmark

File permission / Access to view the script Question

Hi all,

I have a php page that includes another php pages containing my database login information, and I noticed that it won’t work if the permission was 700 (Read, write, and exe only to the user). It only works when the other gets read permission, like below:

[CODE]-rwx—r–[/CODE]

So, my question is: Since it is accessible to all the people on the internet, is it readable such as anyone could open up and read the php code? I know that when we right click on a browser to see the html source code, we won’t see the php code. But I am not sure if there are ways to get the php source code..

Regards,
Dhimoet

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@designer4lifeDec 12.2011 — Hi Dhimoet,

If you're on a LAMP stack, your code is interpreted by php then passed to apache to the user as texthtml. However, If your apache confs are configured incorrectly, then the php source code can be revealed for all to see.
Copy linkTweet thisAlerts:
@dhimoetauthorDec 13.2011 — Thank you for your answer, designer4life.

Could you tell me specifically the corresponding configuration for the thing you mentioned?

Dhimoet
×

Success!

Help @dhimoet spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...