• PHP Help PHP Coding
  • [RESOLVED] Warning: opendir(/home/sitename/public_html/) [function.opendir]: failed to open dir:

hello every one
i got these errors below and i am a newbee

Warning: opendir(/home/sitename/public_html/) [function.opendir]: failed to open dir: No such file or directory in /home/eliebal1/public_html/jewelsbargain/admin/includes/warnings.php on line 19

on the above error i have done some code cleaning but no luck

Warning: readdir(): supplied argument is not a valid Directory resource in /home/eliebal1/public_html/sitename/admin/includes/warnings.php on line 20
on the above error i have done some code cleaning but no luck samething

Warning: The Encryption key file is missing. (on this im not sure which file is missing so please explain)

Warning: The /tmp is not writable: /home/sitename/public_html/tmp/. The page caching will not work until this directory is writable.
on the above error i have changed the tmp file permission to writable but im still getting this error

please note i am a very new programmer and if you have the answers please give me details on which file the error is and how to fix

thanks every one and god bless you

    Look at the path you tried to use for opendir():

    /home/sitename/public_html/

    and then look at the beginning of the path where your script is actually located:

    /home/eliebal1/public_html/

    Notice something wrong? 😉

      please check that whether file is existing in a folder... it only shows error if the file is missed..

      if the location is correct means, then both opendir() and readdir() function will work, no doubt in this..

      for encryption error, i have no idea, please give more details...

      /tmp is not writable means please check the folder permission, it should be 0777 to write...

        bradgrafelman;10985594 wrote:

        Look at the path you tried to use for opendir():
        and then look at the beginning of the path where your script is actually located:
        Notice something wrong? 😉

        i know something is wrong in here /home/eliebal1/public_html/ i have searched for /eliebal1/ but i could not find it where do you think on which page can i find it

          eballeh;10985596 wrote:

          i know something is wrong in here /home/eliebal1/public_html/

          Why would you say that? That's where the script is currently located, how could there be anything wrong with that path?

          eballeh;10985596 wrote:

          i have searched for /eliebal1/ but i could not find it where do you think on which page can i find it

          That's because "/eliebal1/" doesn't appear in your script (which is the problem). Read my post again and read the first error message again; it tells you what and where the problem is.

            /tmp is not writable means please check the folder permission, it should be 0777 to write...[/QUOTE]

            on the above error i have changed the permission, to 0777 but im still seeing the error

              eballeh;10985598 wrote:

              on the above error i have changed the permission, to 0777 but im still seeing the error

              That's because the script isn't attempting to use "/tmp", it's instead attempting to use a "tmp" folder inside your home directory (which has been incorrectly specified - see above).

                well the path is somewhat correct but there is an issue here

                /home/eliebal1/public_html/

                /home/sitename/public_html/

                i have change this folder eliebal1 to become the sitename so i should not have to see eliebal1 as a folder on the server
                now how to fix this issue and which page is it on

                  Write a Reply...