Home » Forum
  • If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Logging problem, Failed to open stream permission denied

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logging problem, Failed to open stream permission denied

    I'm recieving an error & I've tried everything. From the support online even down to searching and reading other post any the forum. Help would be greatly appreciated.

    www.theexousia.com
    Warning: fopen(./logs/searchwords.log): failed to open stream: Permission denied in /home/exousia/public_html/Search/search.php on line 1727
    Unable to write to log file (./logs/searchwords.log). Check that you have specified the correct log filename in your Indexer settings and that you have the required file permissions set.

    I've changed the folder permissions & everything

  • #2
    All the common problems and solution for logging are covered here,
    http://www.wrensoft.com/zoom/support/logging.html

    As pointed out in the error message, the 1st step is to check that you have specified the correct log filename in your Indexer settings and that you have the required file permissions set. In your case you'll need a sub-directory called logs under the search directory on your server, and the script will need file create and file write permissions on this drectory.

    I can see that you are running Apacahe (probably on Linux) so you need to set either 755 or 777 permissions on the logs directory. (as detailed on the page above)

    -----
    David

    Comment


    • #3
      Totally Not Working!

      Ok I have changed the permissions and I'm still recieving the same error. I have no idea what to do & I really need this to work. Please help.

      Comment


      • #4
        It is now corrected. I think there were 3 problems,

        1) You had 755 permissions set but needed 777 for the logs directory on your server. This was pointed out on our FAQ page.

        2) You were obviously getting confused with upper and lower case. You had both a, "/Search" and a "/search" directory. On a Windows machine this is not possible, but as you are using Linux hosting, these are treated as seperate directories. So probably half the time you were changing files and permissions in the wrong directory.

        3) You were manually creating a searchwords.log file from what looked like bits and pieces of a HTML file?? This is not required and could only make things worse. The php script creates a file if it doesn't already exist.

        The working search, is here,
        http://www.theexousia.com/Search/search.php
        (Note the upper case 'S' in search)

        and the log file here,
        http://www.theexousia.com/Search/logs/searchwords.log

        -----
        David

        Comment


        • #5
          I'm having a similar problem to above and I know that I've probably overlooked something trivial but even after going over it numerous times i can't work out what it is!

          Error message is:
          Warning: fopen(./logs/searchwords.log) [function.fopen]: failed to open stream: Permission denied in /home/winyard1/public_html/search.php on line 1727
          Unable to write to log file (./logs/searchwords.log). Check that you have specified the correct log filename in your Indexer settings and that you have the required file permissions set.

          ftp is set to upload files to folder on server: public_html

          Log filename is: ./logs/searchwords.log

          The 'searchwords.log' file has not been created. i currently have permissions set at 755 but have also tried 777.

          I've recently moved hosts and now have a reseller account. I managed to get all this working on the previous host but having trouble on the new host.

          It's Linux, Apache version: 1.3.37 (Unix)

          Please put me out of my misery and let me know the foolish point I've overlooked
          Cheers, Merry Christmas

          Comment


          • #6
            Does the logs directory exist under the directory the search.php script is in? You need to manually create this directory.

            Is it this directory that has the 777 permissions you are refering to or some other file / directory? It wasn't clear from your post.

            Is the upper & lower case correct (i.e. the directory is not call Logs, instead of logs)?

            If you have checked the above points, they try using a absolute path rather than a relative path. In your case this will be,
            /home/winyard1/public_html/logs/searchwords.log

            Comment


            • #7
              Originally posted by wrensoft View Post
              Does the logs directory exist under the directory the search.php script is in? You need to manually create this directory.
              Yep, both the "logs" directory and the file "search.php" file are in the public_html directory. "logs" is a top file directory within public_html and is not a sub folder of another directory, likewise for "search.php".

              Originally posted by wrensoft View Post
              Is it this directory that has the 777 permissions you are refering to or some other file / directory? It wasn't clear from your post.
              Yes, I have tried both 777 & 755 on the "logs" directory.

              Originally posted by wrensoft View Post
              Is the upper & lower case correct (i.e. the directory is not call Logs, instead of logs)?
              all the files and directories are in lower case.

              Originally posted by wrensoft View Post
              If you have checked the above points, they try using a absolute path rather than a relative path. In your case this will be,
              /home/winyard1/public_html/logs/searchwords.log
              I tried using the absolute path you suggested, but results are still the same. I just did a search and here's the error message:

              Warning: fopen( /home/winyard1/public_html/logs/searchwords.log) [function.fopen]: failed to open stream: No such file or directory in /home/winyard1/public_html/search.php on line 1727
              Unable to write to log file ( /home/winyard1/public_html/logs/searchwords.log). Check that you have specified the correct log filename in your Indexer settings and that you have the required file permissions set.
              The site is http://www.streetlifesounds.com
              After trying this search I looked in the "logs" directory and there has still not been a file created called "searchwords.log".
              I tried the search with permissions set at 755 (on "logs" directory) and then again at 777. Results were the same.

              Comment


              • #8
                I can't see anything obvously wrong.

                If you want, you can E-mail us your FTP details we can poke around and have a deeper look.

                You could also try using this PHP test script on your site.

                Code:
                 
                <?php
                 $fp = fopen ("./logs/testfile.log", "ab");
                 
                 if ($fp != false)
                 {
                    print "Open OK"; 
                    fclose ($fp);
                 }
                 else
                 {
                    print "Open Fail"; 
                 }
                ?>
                If this tiny test script prints "Open fail," then it might be a server side problem that you can discuss with your hosting company.

                Comment


                • #9
                  Update after E-mail correspondance with Eskie:

                  The testfile.log test script (above) reported "Open OK". Which proved that logging can work on this server. This means directory permissions are set correctly to allow a log file to be created.

                  However a closer look at the log file path being entered showed that the path entered by Eskie was,
                  " /home/winyard1/public_html/logs/searchwords.log"
                  (without the quote characters).

                  Which has a minor error in it. The correct path needs to be,
                  "/home/winyard1/public_html/logs/searchwords.log"
                  (without the quote characters).

                  The difference between the correct and incorrect path is an extra space character at the start of the path. Removing the extra space character fixes the problem.

                  Comment


                  • #10
                    Doh!
                    I knew I'd been overlooking something trivial and just couldn't spot it!
                    Thanks a lot David. Much appreciated.

                    Comment


                    • #11
                      It's all gone wrong!

                      I haven't looked at/used zoom for almost a year and today did a search on my website and realised that the files were well out of date and needed updating, but it's so long since I've used it I'd forgotten the process.
                      I'm still using the same server and the directories mentioned above haven't changed but for some reason nothing will upload from within zoom; I receive the following error message :

                      FTP upload path error:
                      Could not upload to path "/home/winyard1/public_html/logs/searchwords.log" on server. Check that this folder exists on the FTP server.

                      But now when I run a search from my site there are no results at all!
                      I manually uploaded the files using another ftp client.

                      I've spent most of the last 5 hours trying to work out what the problem is but it's stomped me. I've been reading through the help files and FAQ but it hasn't solved it.
                      i can't even remember how to run the above php test script on my site?
                      Hoping you can see what the problem is?
                      Thanks.

                      Comment


                      • #12
                        the first 5 hours nothing, then all of a sudden!! I remembered... it all seems to be ok now!

                        Comment

                        Working...
                        X