Jump to content

Meccep45

Forum Members
  • Posts

    138
  • Joined

  • Last visited

Posts posted by Meccep45

  1. [07-Jul-2021 14:10:30 Europe/Moscow] PHP Warning:  mime_content_type(): Failed to load magic database in /opt/share/nginx/html/fileinfo.php on line 2
    [07-Jul-2021 14:10:30 Europe/Moscow] PHP Warning:  mime_content_type(): Failed identify data 0:bad magic in `(null)' in /opt/share/nginx/html/fileinfo.php on line 2
    [07-Jul-2021 14:10:30 Europe/Moscow] PHP Fatal error:  Uncaught ValueError: Path cannot be empty in /opt/share/nginx/html/fileinfo.php:2
    Stack trace:
    #0 /opt/share/nginx/html/fileinfo.php(2): mime_content_type('apple-touch-ico...')
    #1 {main}
      thrown in /opt/share/nginx/html/fileinfo.php on line 2

    похоже нет базы в самом phpX-mod-fileinfo или плохая. то есть встроенное в php работать не будет. я думал поставил модуль и вот оно счастье.

    ~ # php-cli ./fileinfo.php
    ~ #
    ~ # cat ./fileinfo.php
    <?php
    echo(mime_content_type('apple-touch-icon.png')); // returns image/png
    ?> ~ #

     

  2. что-то не завелось. и 7 не 8.  как протестировать  встроенный в php? кто шалит приложение, модуль или мои ручонки.  склонен к третьему.

    Скрытый текст
    2021/07/04 08:28:31 [error] 25715#0: *65 FastCGI sent in stderr: "PHP message: PHP Fatal error: 
    Uncaught ValueError: Path cannot be empty in /opt/share/nginx/html/Sources/Subs.php:5617
    Stack trace:
    #0 /opt/share/nginx/html/Sources/Subs.php(5617): mime_content_type('/opt/share/ngin...')
    #1 /opt/share/nginx/html/Sources/Subs.php(5667): get_mime_type('/opt/share/ngin...', true)
    #2 /opt/share/nginx/html/Sources/Profile-Modify.php(3530): check_mime_type('/opt/share/ngin...', 'image/', true)
    #3 /opt/share/nginx/html/Sources/Profile-Modify.php(822): profileSaveAvatarData('upload')
    #4 /opt/share/nginx/html/Sources/Profile.php(725): saveProfileFields()
    #5 /opt/share/nginx/html/index.php(187): ModifyProfile()
    #6 {main}
      thrown in /opt/share/nginx/html/Sources/Subs.php on line 5617" while reading response header from upstream,
      client: 00.00.00.00, server: 00.00.00.00,
      request: "POST /index.php?action=profile;area=forumprofile;u=1 HTTP/2.0",
      upstream: "fastcgi://unix:/opt/var/run/php8-fpm/php8-fpm.sock:", host: "00.00.00.00",
      referrer: "https://00.00.00.00/index.php?action=profile;area=forumprofile;u=1"
    
    2021/07/04 11:04:28 [error] 25715#0: *301 FastCGI sent in stderr: "PHP message: PHP Fatal error: 
    Uncaught ValueError: Path cannot be empty in /opt/share/nginx/html/Sources/Subs.php:5617
    Stack trace:
    #0 /opt/share/nginx/html/Sources/Subs.php(5617): mime_content_type('/opt/tmp/phphjX...')
    #1 /opt/share/nginx/html/Sources/Attachments.php(329): get_mime_type('/opt/tmp/phphjX...', true)
    #2 /opt/share/nginx/html/Sources/Attachments.php(201): Attachments->processAttachments()
    #3 /opt/share/nginx/html/Sources/Attachments.php(139): Attachments->add()
    #4 /opt/share/nginx/html/index.php(187): Attachments->call()
    #5 {main}
      thrown in /opt/share/nginx/html/Sources/Subs.php on line 5617" while reading response header from upstream,
      client: 00.00.00.00, server: 00.00.00.00,
      request: "POST /index.php?action=uploadAttach;sa=add;d490270f=de07bc1d1822120817ef6a193a8ea7b1;board=1 HTTP/2.0",
      upstream: "fastcgi://unix:/opt/var/run/php8-fpm/php8-fpm.sock:", host: "00.00.00.00",
      referrer: "https://00.00.00.00/index.php?action=post;topic=1.0;last_msg=1"

     

     

  3. K24nclc положить сюда /opt/etc/init.d нужен screen. авто-запуска нет.

    #!/bin/sh
    
    PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    
    case $1 in
    	start)
    	screen -dmS ncdc ncdc && echo 'screen started ncdc.'
    	;;
    	stop)
    	screen -S ncdc -X quit && echo 'screen stopped ncdc.'
    	;;
    	restart)
    	screen -S ncdc -X quit && screen -dmS ncdc ncdc && echo 'screen restarted ncdc.'
    	;;
    	*)
    	echo "Usage: $0 {start|stop|restart}"
    	;;
    esac
    

     

    • Thanks 1
  4. Скрытый текст
    
    # Example for a system wide configuration file
    
    # A system wide configuration file is optional.
    # If it exists, it usually defines a default account.
    # This allows msmtp to be used like /usr/sbin/sendmail.
    account default
    
    # The SMTP smarthost
    host smtp.gmail.com
    
    # Use TLS on port 465
    port 587
    tls on
    tls_starttls on
    
    # Construct envelope-from addresses of the form "user@oursite.example"
    auth login
    user meccep45@888.88
    passwordeval gpg2 --no-tty -q -d ~/.msmtp-password.gpg
    from meccep45@888.88
    
    # Syslog logging with facility LOG_MAIL instead of the default LOG_USER
    syslog LOG_MAIL 

     

    passwordeval gpg2 --no-tty -q -d ~/.msmtp-password.gpg отдельно эта срока открывает в терминале окно ввода секретного ключа.понять понимаю, реализовать не могу. эх

  5. ну что застрял. как решить?

    ~ # echo -e "Subject: Проверка почты\r\n\r\nЭто тестовое письмо" |msmtp --debug --from=default -t meccep45@888.88
    loaded system configuration file /opt/etc/msmtprc
    loaded user configuration file /opt/root/.msmtprc
    falling back to default account
    gpg: decryption failed: No secret key
    msmtp: cannot read output of 'gpg2 --no-tty -q -d ~/.msmtp-password.gpg'

    читал про переменную GPG_TTY куда её применить не знаю.

  6. установил пакет gnupg22.2.23-2utils запустил gpg2 --full-generate-key а в конце

    gpg: failed to start agent '/opt/bin/gpg-agent': No such file or directory
    gpg: can't connect to the agent: No such file or directory
    gpg: agent_genkey failed: No agent running
    Key generation failed: No agent running

    где брать этот gpg-agent. хотел пароль зашифровать для msmtp.буду рад подсказке.

    вот список пакетов entware.

    Скрытый текст
    
    bash - 5.1-2
    busybox - 1.33.0-2
    bzip2 - 1.0.8-1
    ca-bundle - 20210119-1
    ca-certificates - 20210119-1
    coreutils - 8.32-6
    coreutils-mktemp - 8.32-6
    cron - 4.1-4
    curl - 7.75.0-1
    diffutils - 3.7-3
    dropbear - 2020.81-2
    entware-release - 1.0-2
    findutils - 4.7.0-3
    gawk - 5.1.0-1
    glib2 - 2.66.4-1
    gnupg2 - 2.2.23-2
    grep - 3.6-1a
    gzip - 1.10-3
    jsonfilter - 2018-02-04-c7e938d6-1
    ldconfig - 2.27-11
    libacl - 2.2.53-1
    libaio - 0.3.112-2
    libassuan - 2.5.4-1
    libatomic - 8.4.0-11
    libattr - 2.4.48-2
    libblkid - 2.36.1-2
    libbz2 - 1.0.8-1
    libc - 2.27-11
    libcurl - 7.75.0-1
    libedit - 20210216-3.1-1
    libffi - 3.3-2
    libfreetype - 2.10.4-1
    libgcc - 8.4.0-11
    libgcrypt - 1.8.7-2
    libgd-full - 2.3.1-1
    libgmp - 6.2.1-1a
    libgnutls - 3.7.0-2
    libgpg-error - 1.39-2
    libiconv-full - 1.16-1
    libintl-full - 0.21-1
    libjpeg-turbo - 2.0.6-1
    libjson-c - 0.15-1
    libksba - 1.5.0-1
    liblua - 5.1.5-8
    liblua5.3 - 5.3.5-4
    liblzma - 5.2.5-3
    libmbedtls - 2.16.9-1
    libmount - 2.36.1-2
    libncurses - 6.2-1
    libncursesw - 6.2-1
    libndm - 1.1.15-1
    libnettle - 3.6-1
    libnpth - 1.6-1
    libopenssl - 1.1.1k-1
    libopenssl-conf - 1.1.1k-1
    libpcre - 8.44-4
    libpcre2 - 10.36-1
    libpng - 1.6.37-10
    libpopt - 1.16-2
    libpthread - 2.27-11
    libreadline - 8.1-1
    librt - 2.27-11
    libslang2 - 2.3.2-4
    libsqlite3 - 3330000-1
    libssh2 - 1.9.0-2
    libssp - 8.4.0-11
    libstdcpp - 8.4.0-11
    libtiff - 4.2.0-1
    libubox - 2020-12-12-35787769-1
    libuuid - 2.36.1-2
    libwebp - 1.2.0-1
    libxml2 - 2.9.10-3
    libzip-gnutls - 1.7.3-1
    locales - 2.27-9
    logrotate - 3.17.0-1
    mariadb-client - 10.4.17-1
    mariadb-client-base - 10.4.17-1
    mariadb-client-extra - 10.4.17-1
    mariadb-common - 1.0-2
    mariadb-server - 10.4.17-1
    mariadb-server-base - 10.4.17-1
    mariadb-server-extra - 10.4.17-1
    mariadb-server-plugin-locales - 10.4.17-1
    mc - 4.8.26-1b
    msmtp - 1.8.14-1
    ncdc - 1.22.1-1
    ndmq - 1.0.2-7
    nginx-ssl - 1.19.6-1a
    oniguruma - 6.9.6-1
    openssl-util - 1.1.1k-1
    opkg - 2020-12-24-9bbc7eae-1
    opt-ndmsv2 - 1.0-13
    php7 - 7.4.15-1
    php7-cli - 7.4.15-1
    php7-fpm - 7.4.15-1
    php7-mod-bcmath - 7.4.15-1
    php7-mod-calendar - 7.4.15-1
    php7-mod-ctype - 7.4.15-1
    php7-mod-curl - 7.4.15-1
    php7-mod-filter - 7.4.15-1
    php7-mod-ftp - 7.4.15-1
    php7-mod-gd - 7.4.15-1
    php7-mod-iconv - 7.4.15-1
    php7-mod-json - 7.4.15-1
    php7-mod-mbstring - 7.4.15-1
    php7-mod-mysqli - 7.4.15-1
    php7-mod-mysqlnd - 7.4.15-1
    php7-mod-openssl - 7.4.15-1
    php7-mod-pdo - 7.4.15-1
    php7-mod-pdo-mysql - 7.4.15-1
    php7-mod-session - 7.4.15-1
    php7-mod-sockets - 7.4.15-1
    php7-mod-sqlite3 - 7.4.15-1
    php7-mod-tokenizer - 7.4.15-1
    php7-mod-xml - 7.4.15-1
    php7-mod-zip - 7.4.15-1
    poorbox - 1.33.0-2
    ptokax - 0.5.2.2-2
    resolveip - 2
    tar - 1.32-3
    terminfo - 6.2-1
    xz - 5.2.5-3
    xz-utils - 5.2.5-3
    zlib - 1.2.11-3
    zoneinfo-asia - 2021a-1
    zoneinfo-europe - 2021a-1

     

     

  7. 2 часа назад, zyxmon сказал:

    система opkg примитивна, скорее всего не обновились некоторые пакеты. Определите требуемые и обновите вручную.

    сверил версии пакетов с репой. всё обновлено. попробую начисто переустановить.

  8. При запуске php7-fpm. Сегодня обновил Entware. Проверил все фалы наместе.

    [23-Mar-2021 22:18:56 Europe/Moscow] PHP Warning:  PHP Startup: Unable to load dynamic library 'zip.so' (tried: /opt/lib/php/zip.so (libnettle.so.7: cannot open shared object file: No such file or directory), /opt/lib/php/zip.so.so (/opt/lib/php/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

  9. Скрытый текст
    
    
    
    ~ # cd /opt/sbin
    /opt/sbin # logrotate -s /opt/var/lib/logrotate.status -d /opt/etc/logrotate.conf
    WARNING: logrotate in debug mode does nothing except printing debug messages!  Consider using verbose mode (-v) instead if this is not what you want.
    
    reading config file /opt/etc/logrotate.conf
    including /opt/etc/logrotate.d
    reading config file logs.conf
    compress_prog is now /opt/bin/gzip
    compress_ext was changed to .gz
    uncompress_prog is now /opt/bin/gunzip
    compress_ext is now .gz
    olddir is now /opt/var/log/nginx/old
    Reading state from file: /opt/var/lib/logrotate.status
    Allocating hash table for state file, size 64 entries
    
    Handling 1 logs
    
    rotating pattern: /opt/var/log/nginx/*.log
     2048 bytes (4 rotations)
    olddir is /opt/var/log/nginx/old, empty log files are rotated, old logs are removed
    considering log /opt/var/log/nginx/access.log
    Creating new state
      Now: 2021-03-18 18:51
      Last rotated at 2021-03-18 18:00
      log needs rotating
    considering log /opt/var/log/nginx/error.log
    Creating new state
      Now: 2021-03-18 18:51
      Last rotated at 2021-03-18 18:00
      log needs rotating
    rotating log /opt/var/log/nginx/access.log, log->rotateCount is 4
    dateext suffix '-20210318'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    glob finding old rotated logs failed
    copying /opt/var/log/nginx/access.log to /opt/var/log/nginx/old/access.log-20210318
    truncating /opt/var/log/nginx/access.log
    compressing log with: /opt/bin/gzip
    rotating log /opt/var/log/nginx/error.log, log->rotateCount is 4
    dateext suffix '-20210318'
    glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
    glob finding old rotated logs failed
    copying /opt/var/log/nginx/error.log to /opt/var/log/nginx/old/error.log-20210318
    truncating /opt/var/log/nginx/error.log
    compressing log with: /opt/bin/gzip

     

    при отладке вроде без ошибок.

×
×
  • Create New...