[Solved] Problem with adding media 2.0.2
  • Hello everyone!

    I have some problem with fresh Airtime 2.0.2 install, when trying to add media via graphic user interface it fails, showing message: Failed to open output stream. No file is in /srv/airtime/stor/. 

    I checked permissions for /tmp, proper path for media upload in php.ini in /etc/php5/apache2. Should I change permissions for storage folder? Can this be the problem with postgresql or rabbitmq-server? What log files should I include to make situation clear?
    Post edited by Krzysztof Kacprzak at 2012-04-23 16:58:07
  • 16 Comments sorted by
  • Does the directory /srv/airtime/stor/ exist? if so please go into that directory and do "ls -l" and post here.
    Airtime Pro Hosting: http://airtime.pro
  • Hi,

    What is the permission on /tmp/plupload?

  • Hi,

    Can you post your apache vhost file?

  • /tmp/plupload has permissions:

    drwxr-xr-x 2 www-data www-data 4096 2012-04-02 12:28 plupload

    and in /srv/airtime/stor/

    drwxrws--- 2 www-data www-data 4096 2012-03-30 09:21 organize

    so by the Airtime via GUI should be readable, writeable. Or am I wrong?

    Krzysiek
  • Where can I find it?
  • Hi,

    Under /etc/apache2/sites-enabled, anything with "airtime" in it.
  • It goes like this:


    <VirtualHost *:80>
       ServerAdmin foo@bar.org
       DocumentRoot /usr/share/airtime/public
       php_admin_value upload_tmp_dir /tmp

      <Directory /usr/share/airtime/public>
          DirectoryIndex index.php
          AllowOverride all
          Order allow,deny
          Allow from all
      </Directory>
    </VirtualHost>

    Hope this tells something,
    Krzysiek

  • Hm.. I can't see anything wrong with it. The error msg you are seeing happens when Airtime it not able to write a temp file to /tmp/plupload. Do you see any reason why Airtime would not be able to write temp file to that directory? eg disk out of space? :)
  • There's plenty of disk space, that's not the reason. Maybe the temp directory should be owned by www-data, like /srv/airtime/stor?
    Do I need to restart apache2 or something else after changing /etc/php5/apache2/php.ini file to make changes work?
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team

    There's plenty of disk space, that's not the reason. Maybe the temp directory should be owned by www-data, like /srv/airtime/stor?



    /tmp folder is writable for any user

    Do I need to restart apache2 or something else after changing /etc/php5/apache2/php.ini file to make changes work?



    yes, the apache should be restarted (not reloaded) to apply php.ini changes

  • I've restarted apache2 after any change, but it still doesn't work. Sad. Is there something else I could try?
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    Please check /var/log/apache/error.log or/and /var/log/syslog (depends on php.ini settings)
    You need to catch php error message.
  • After another attempt of adding file at 10:07 these lines appear in /var/log/apache/error.log:

    [Thu Apr 05 10:07:42 2012] [error] [client 89.200.144.217] PHP Warning:  fopen(): SAFE MODE Restriction in effect.  The script whose uid is 0 is not allowed to access /tmp/plupload owned by uid 33 in /usr/share/airtime/application/models/StoredFile.php on line 822, referer: http://62.75.235.157/Plupload

    [Thu Apr 05 10:07:42 2012] [error] [client 89.200.144.217] PHP Warning:  fopen(/tmp/plupload/p16q0ommc31g1uc21jqe2ij126o4.mp3): failed to open stream: No such file or directory in /usr/share/airtime/application/models/StoredFile.php on line 822, referer: http://62.75.235.157/Plupload

    No errors in /var/log/syslog.

  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    seems you have enabled php safe mode
    Enable it in php.ini (safe_mode = off), remove plupload folder and restart apache.

    Post edited by Andrey Podshivalov at 2012-04-05 04:16:55
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    sorry, I meant ENabled php safe mode
  • That was it! Thanks Andrey for help!
    Problem solved.

    Very thankful,
    Krzysiek
This discussion has been closed.
All Discussions