Announcement

Collapse
No announcement yet.

What does this error means?

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

  • What does this error means?

    PHP Code:
    failed to open streamHTTP wrapper does not support writeable connections 
    And how do I fix it?
    Happening when i'm trying to write to a file.

  • #2
    The file isn't CHModed properly. You have to CHMod a file to at least 666 before PHP can write to it.

    Comment


    • #3
      how to chmod it with PHP.

      This is an example of how to CHMOD a file with PHP:
      PHP Code:
      // the file
      $file 'file_to_be_chmodded.txt';
      // copy the old umask and set it to 0
      $old_umask umask(0);
      // chmod the file
      chmod($file0666);
      // reset the umask
      umask($old_umask); 

      Comment


      • #4
        I know how to CHMOD and the file was CHMODED just fine with 777 permissions. The problem was I should've used full directory path and not the URL of the file, I don't know exactly why, it should work both ways, but it solved it.

        Thanks anyway guys

        Comment


        • #5
          using the URL of the file will force it to make a connection via HTTP which is slower than reading it from the file system.
          Scott MacVicar

          My Blog | Twitter

          Comment


          • #6
            Thanks Scott

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X