How to solve “Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required ‘/opt/lampp/htdocs/……/index.php’ (include_path=’.:/opt/lampp/lib/php’) in Unknown on line 0 ” problem?

This error is due to the file permission. To resolve this issue we should change permission with SuperUser(sudo). So syntax is

sudo chmod -R 0755 foldername

I have installed lampp in /opt/lampp/htdocs folder so command for this is

sudo chmod -R 0755 /opt/lampp/htdocs

Open your terminal and run this command, hope this helps. If you are helped with this please don’t forget to post comment.

About the Author

has written 32 stories on this site.

34 Comments on “How to solve “Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required ‘/opt/lampp/htdocs/……/index.php’ (include_path=’.:/opt/lampp/lib/php’) in Unknown on line 0 ” problem?”

  • gilles wrote on 2 July, 2011, 8:55

    thanks alot

  • sildenafil citrate wrote on 19 August, 2011, 9:46

    I like your site. And especially your design is very good. I would like to find something like this (I mean the template).

  • Dxtr wrote on 14 December, 2011, 16:59

    Thank you so much , it works ๐Ÿ™‚

  • Alexandre wrote on 8 January, 2012, 14:00

    Hi man, Thank you so much… I solved my problem

  • eljoud wrote on 8 January, 2012, 18:02

    thank you .. you saved my day.

  • admin wrote on 8 January, 2012, 18:11

    Welcome buddy ๐Ÿ™‚

  • Derian wrote on 19 February, 2012, 9:32

    Thank’s buddy, it’s really help me

  • gringo wrote on 28 March, 2012, 10:58

    If the permission change does not fix the issue, then make sure you are not missing an php extension. Unfortunatelly you do not see the error with the missing extension on this page, so go in the console and type;
    php -q yourfile.php
    replace yourfile.php with your actual php file which gives the error
    You should then see in the output, in the first lines, which extension is missing. So just install it and you;re good to go

  • Gjon wrote on 31 March, 2012, 12:08

    Thank You!!

  • Sagala wrote on 27 April, 2012, 6:19

    Great post, Thank Tou …

  • nassim rehali wrote on 23 June, 2012, 11:23

    Thank you , problem solved , thnx thnx

  • Ivan wrote on 5 July, 2012, 11:30

    THX a lot! dude1

  • Bluerain wrote on 5 July, 2012, 13:16

    Thank you sir. ๐Ÿ™‚

  • Ivan wrote on 27 July, 2012, 6:38

    I love you!

  • Peter wrote on 20 September, 2012, 0:25

    God bless you.

  • limafil wrote on 22 September, 2012, 19:26

    Thanx, it works.

  • David wrote on 7 October, 2012, 17:50

    Thank you very much i love you thanks thanks !!!!!

  • Reza wrote on 11 October, 2012, 12:15

    Is this setting writtable so I can just place any files into htdocs directory?

  • alejon wrote on 25 October, 2012, 8:45

    I am also having this trouble. How can I do that command?? I am just a newbie

  • Alejon wrote on 26 October, 2012, 6:43

    Hi Guys, how can i do that command?

  • Amir wrote on 13 November, 2012, 18:09

    I love you man!!! saved my day and brought my mood back!

  • Randy wrote on 14 November, 2012, 21:06

    thanks!, it works

  • rupesh yadav wrote on 5 January, 2013, 16:34

    but those files r not getting open with normal user..
    means
    only super user is allowed to open those files after uploading…
    why… so..

  • ahmed wrote on 11 February, 2013, 21:48

    thanks

  • Manoj wrote on 14 March, 2013, 20:40

    Much appreciated!

  • maycon wrote on 16 March, 2013, 19:35

    Thank you very much!

  • seo consultor wrote on 17 March, 2013, 15:24

    Yes, thank. you change the permisions por example 700 and go

  • guest_091263 wrote on 13 May, 2013, 18:24

    thanks a lot!, it works… easy way to solve this problem ๐Ÿ™‚ nice work!

  • highlandmind wrote on 6 June, 2013, 13:27

    Thanks for help.

  • abi wrote on 10 June, 2013, 23:37

    Thanks for your help appreciate it

  • Google wrote on 11 June, 2013, 10:25

    Thank you

  • yogesh kashyap wrote on 3 February, 2016, 11:03

    thanx a lot, It’s working…………:-)

  • Didarul Alam wrote on 29 March, 2016, 14:43

    can not see comnt

  • arun wrote on 20 September, 2016, 16:24

    Thank you..

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!

*

Copyright © 2017 Programmer to Programmer- A website for web programming and mobile application programming tutorials.
Wordpress themes