# Undefined index basepath error

**URL:** <https://community.open-emr.org/t/undefined-index-basepath-error/10553>\
**Category:** Day-to-Day Users\
**Created:** [August 2, 2018, 3:38am UTC](https://community.open-emr.org/t/undefined-index-basepath-error/10553 "2018-08-02T03:38:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![at2341](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@at2341](https://community.open-emr.org/u/at2341)\
**Post date:** [August 2, 2018, 3:38am UTC](https://community.open-emr.org/t/undefined-index-basepath-error/10553/1 "2018-08-02T03:38:54Z")

</div>

Notice  
: Undefined index: basePath in  
C:\xampp\htdocs\openemr\openemr-5.0.1\library\core\src\Header.php  
on line  
158

getting the above error on new install of openemr on windows 10. I am new to openemr and happy for any help on resolving this error. It sits on top of the browser page.

---

<div class="post-metadata">

**Author:** ![at2341](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/b9bd4f/32.png) [@at2341](https://community.open-emr.org/u/at2341)\
**Post date:** [August 2, 2018, 3:44am UTC](https://community.open-emr.org/t/undefined-index-basepath-error/10553/2 "2018-08-02T03:44:45Z")

</div>

was able to fix it by using the following settings;  
What are the correct PHP settings (can be found in the php.ini file)?

```
We recommend the following PHP setting, which can be set in the php.ini file (If you do modify this file, remember to restart your web server (usually Apache) to apply the new settings):

    short_open_tag = Off 
    max_execution_time = 60 
    max_input_time = -1 
    max_input_vars = 3000 
    memory_limit = 512M 
    display_errors = Off 
    log_errors = On 
    post_max_size = 30M 
    file_uploads = On 
    upload_max_filesize = 30M 
    error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
```

---

<div class="post-metadata">

**Author:** ![ntquangtest](https://community.open-emr.org/user_avatar/community.open-emr.org/ntquangtest/32/14673_2.png) [@ntquangtest](https://community.open-emr.org/u/ntquangtest)\
**Post date:** [June 24, 2020, 8:39am UTC](https://community.open-emr.org/t/undefined-index-basepath-error/10553/3 "2020-06-24T08:39:01Z")

</div>

> [@at2341](#):
>
> display\_errors = Off

Hiding errors by setting “display\_errors = Off” is not a correct answer. It’s a potential danger.  
Using this code at where error occurs (“library\core\src\Header.php - :158”):  
" $path = (isset($opts[‘basePath’])) ? $opts[‘basePath’] : ‘’;  
$basePath = self::parsePlaceholders($path);  
"
