Uploading not working with NGINX
  • Everything goes right with nginx and Airtime 2.1.3, except uploading.
    It returns "This file appears to be corrupted and will not be added to media library." but the file is still stored on /tmp and not moved to problem_files folder.

    Checking logs, I only got this on /var/log/airtime.error.log

    2012/08/01 01:19:50 [error] 18041#0: *12 FastCGI sent in stderr: "PHP Warning:  realpath(): open_basedir restriction in effect. File(/usr/share/airtime/application) is not within the allowed path(s): (none) in /usr/share/airtime/public/index.php on line 9
    PHP Warning:  file_exists(): open_basedir restriction in effect. File(/usr/share/php/libzend-framework-php) is not within the allowed path(s): (none) in /usr/share/airtime/public/index.php on line 30
    PHP Warning:  require_once(): open_basedir restriction in effect. File(Zend/Application.php) is not within the allowed path(s): (none) in /usr/share/airtime/public/index.php on line 35
    PHP Warning:  require_once(Zend/Application.php): failed to open stream: Operation not permitted in /usr/share/airtime/public/index.php on line 35
    PHP Fatal error:  require_once(): Failed opening required 'Zend/Application.php' (include_path='/controllers/plugins:/models:/common:.:/usr/share/php:/usr/share/pear:') in /usr/share/airtime/public/index.php on line 35" while reading response header from upstream, client: 75.127.**.**, server: marci***sto.***.com, request: "GET /api/version/api_key/YKPAH4BK1RYJVTGD9MCF HTTP/1.1", upstream: "fastcgi://unix:/var/run/airtime.php.sock:", host: "marci***sto.***.com:80"

    Changed open_basedir, the warning doesn't appear but stills without uploading.

    In zendphp.log I see that is trying to moving the file

    2012-08-01T07:17:25+04:00 INFO (6): copyFileToStor: moving file /tmp/plupload/p173g2vo1houd1jn111bp1ms81sk64.mp3 to /srv/airtime/stor/organize/02 transistors gone wild.mp3 - file:/usr/share/airtime/application/models/StoredFile.php:885

    On /var/log/airtime/media-monitor/media-monitor.log nothing relevant and py-interpreter.log is empty.

    Any ideas?

    Post edited by Henry López del Pino at 2012-07-31 23:47:47
  • 3 Comments sorted by
  • Have you tried other files? It is possible that you solved your "open_basedir" problem, but the file is actually corrupted.
    Airtime Pro Hosting: http://airtime.pro
  • Yes, I tried with another files and restarted many times nginx and php5-fpm services.
  • We use the PHP exec() function to run the file through Liquidsoap which tests the file's validity. Do your PHP settings have the exec() ability disabled?
    Airtime Pro Hosting: http://airtime.pro