Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8700159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:07:20+00:00 2026-06-13T02:07:20+00:00

looking at the code of Joomla I see that in the first line of

  • 0

looking at the code of Joomla I see that in the first line of the index, it defines the base path of installation with the

dirname(__FILE__)

is this a font of possible risk for the site, I mean if a non controlled error message show the internal path of the Joomla directory, because of, for example a failed include, can it be used to perform some kind of attack to the site ? If yes, is it convenient to use this function ? Any idea is welcome.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:07:20+00:00Added an answer on June 13, 2026 at 2:07 am

    The use of that construction is fine and not a security risk by itself. The security risk you highlighted is showing error messages to end users on production sites. You shouldn’t do that! Turn off error reporting. You can change the appropriate setting in the php.ini, or if you don’t have access to php.ini, you can do it at the beginning of your code like this:

    error_reporting(0);
    @ini_set('display_errors', 0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to make this subqueries to good-looking code? And I looking guides about SQL
I am looking to code me a banner management system that has users make
Sometime when looking through code, I see many methods specify an annotation: @SuppressWarnings(unchecked) What
I was looking at code that implemented the ICloneable interface for one of the
I think this is easily explained by looking at code, so I'm posting a
another challenge - this is more for cleaner looking code than a how do
I have some old school looking code that is as follows: IList<KeyValuePair<string, ValuePair>> ServicePairs
I'm looking at code that does uses an _ for typename in a namedtuple
I am stuck with this simple looking code for over an hour now... I
I'm interested in speed, not good looking code, that is why I'm using array

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.