Cron job problem on last ISPConfig update

Discussion in 'General' started by misuv, Aug 14, 2014.

  1. misuv

    misuv Member

    Hi everyone

    I have a problem, maybe somebody can help me.

    I did a reinstal on the server following this tutorial: http://www.howtoforge.com/perfect-server-debian-wheezy-apache2-bind-dovecot-ispconfig-3

    on the last version of ISPConfig 3.0.5.4p1 (I think) I had no problem with the cron job (thanks to your help):)

    but on the new verison 3.0.5.4p2, the same files for cron, the same configuration I have a problem

    The job is not ececuted & I receive the following message:

    the file is executed correct if I call it from browser.

    Can someone help me please?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The php that you use to run the cron script is missing the mysqli extension, thats most likely a problem of the srver installation and not a ispconfig problem. whcih php do you use in the cron command?
     
  3. misuv

    misuv Member

    I use in ispconfig gui cron job

    Code:
    usr/bin/php /web/pathtofile
    same as before (same tutorial and files). It worked before.

    Job is chroted.

    Site is defined with php-fpm, cgi, suexec.

    I think as you, but why it worked before and what can I do?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact cronjob line that you use.
     
  5. misuv

    misuv Member

    cron job and php info

    I use the following cron job:

    I also used phpinfo in cron test file and got the following info:

    Code:
    <pre>phpinfo()
    PHP Version => 5.4.4-14+deb7u12
    
    System => Linux server1.smirotour.ro 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u3 i686
    Build Date => Jun 30 2014 18:39:13
    Server API => Command Line Interface
    Virtual Directory Support => disabled
    Configuration File (php.ini) Path => /etc/php5/cli
    Loaded Configuration File => (none)
    Scan this dir for additional .ini files => /etc/php5/cli/conf.d
    Additional .ini files parsed => (none)
    PHP API => 20100412
    PHP Extension => 20100525
    Zend Extension => 220100525
    Zend Extension Build => API220100525,NTS
    PHP Extension Build => API20100525,NTS
    Debug Build => no
    Thread Safety => disabled
    Zend Signal Handling => disabled
    Zend Memory Manager => enabled
    Zend Multibyte Support => provided by mbstring
    IPv6 Support => enabled
    DTrace Support => disabled
    
    Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
    Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls
    Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
    
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    
    
     _______________________________________________________________________
    
    
    Configuration
    
    bcmath
    
    BCMath support => enabled
    
    Directive => Local Value => Master Value
    bcmath.scale => 0 => 0
    
    bz2
    
    BZip2 Support => Enabled
    Stream Wrapper support => compress.bzip2://
    Stream Filter support => bzip2.decompress, bzip2.compress
    BZip2 Version => 1.0.6, 6-Sept-2010
    
    calendar
    
    Calendar support => enabled
    
    Core
    
    PHP Version => 5.4.4-14+deb7u12
    
    Directive => Local Value => Master Value
    allow_url_fopen => On => On
    allow_url_include => Off => Off
    always_populate_raw_post_data => Off => Off
    arg_separator.input => & => &
    arg_separator.output => & => &
    asp_tags => Off => Off
    auto_append_file => no value => no value
    auto_globals_jit => On => On
    auto_prepend_file => no value => no value
    browscap => no value => no value
    default_charset => no value => no value
    default_mimetype => text/html => text/html
    disable_classes => no value => no value
    disable_functions => no value => no value
    display_errors => STDOUT => STDOUT
    display_startup_errors => Off => Off
    doc_root => no value => no value
    docref_ext => no value => no value
    docref_root => no value => no value
    enable_dl => On => On
    enable_post_data_reading => On => On
    error_append_string => no value => no value
    error_log => no value => no value
    error_prepend_string => no value => no value
    error_reporting => no value => no value
    exit_on_timeout => Off => Off
    expose_php => On => On
    extension_dir => /usr/lib/php5/20100525+lfs => /usr/lib/php5/20100525+lfs
    file_uploads => On => On
    highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
    highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
    highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
    highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
    highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
    html_errors => Off => Off
    ignore_repeated_errors => Off => Off
    ignore_repeated_source => Off => Off
    ignore_user_abort => Off => Off
    implicit_flush => On => On
    include_path => .:/usr/share/php:/usr/share/pear => .:/usr/share/php:/usr/share/pear
    log_errors => Off => Off
    log_errors_max_len => 1024 => 1024
    mail.add_x_header => Off => Off
    mail.force_extra_parameters => no value => no value
    mail.log => no value => no value
    max_execution_time => 0 => 0
    max_file_uploads => 20 => 20
    max_input_nesting_level => 64 => 64
    max_input_time => -1 => -1
    max_input_vars => 1000 => 1000
    memory_limit => 128M => 128M
    open_basedir => no value => no value
    output_buffering => 0 => 0
    output_handler => no value => no value
    post_max_size => 8M => 8M
    precision => 14 => 14
    realpath_cache_size => 16K => 16K
    realpath_cache_ttl => 120 => 120
    register_argc_argv => On => On
    report_memleaks => On => On
    report_zend_debug => Off => Off
    request_order => no value => no value
    sendmail_from => no value => no value
    sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i 
    serialize_precision => 17 => 17
    short_open_tag => On => On
    SMTP => localhost => localhost
    smtp_port => 25 => 25
    sql.safe_mode => Off => Off
    track_errors => Off => Off
    unserialize_callback_func => no value => no value
    upload_max_filesize => 2M => 2M
    upload_tmp_dir => no value => no value
    user_dir => no value => no value
    user_ini.cache_ttl => 300 => 300
    user_ini.filename => .user.ini => .user.ini
    variables_order => EGPCS => EGPCS
    xmlrpc_error_number => 0 => 0
    xmlrpc_errors => Off => Off
    zend.detect_unicode => On => On
    zend.enable_gc => On => On
    zend.multibyte => Off => Off
    zend.script_encoding => no value => no value
    
    ctype
    
    ctype functions => enabled
    
    date
    
    date/time support => enabled
    "Olson" Timezone Database Version => 0.system
    Timezone Database => internal
    Default timezone => UTC
    
    Directive => Local Value => Master Value
    date.default_latitude => 31.7667 => 31.7667
    date.default_longitude => 35.2333 => 35.2333
    date.sunrise_zenith => 90.583333 => 90.583333
    date.sunset_zenith => 90.583333 => 90.583333
    date.timezone => no value => no value
    
    dba
    
    DBA support => enabled
    Supported handlers => cdb cdb_make db4 inifile flatfile qdbm 
    
    Directive => Local Value => Master Value
    dba.default_handler => flatfile => flatfile
    
    dom
    
    DOM/XML => enabled
    DOM/XML API Version => 20031129
    libxml Version => 2.8.0
    HTML Support => enabled
    XPath Support => enabled
    XPointer Support => enabled
    Schema Support => enabled
    RelaxNG Support => enabled
    
    ereg
    
    Regex Library => Bundled library enabled
    
    exif
    
    EXIF Support => enabled
    EXIF Version => 1.4 $Id$
    Supported EXIF Version => 0220
    Supported filetypes => JPEG,TIFF
    
    Directive => Local Value => Master Value
    exif.decode_jis_intel => JIS => JIS
    exif.decode_jis_motorola => JIS => JIS
    exif.decode_unicode_intel => UCS-2LE => UCS-2LE
    exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
    exif.encode_jis => no value => no value
    exif.encode_unicode => ISO-8859-15 => ISO-8859-15
    
    fileinfo
    
    fileinfo support => enabled
    version => 1.0.5
    
    filter
    
    Input Validation and Filtering => enabled
    Revision => $Id: e523cdc8829892d1b4f9cb7c3c57b2ba1c36b9ea $
    
    Directive => Local Value => Master Value
    filter.default => unsafe_raw => unsafe_raw
    filter.default_flags => no value => no value
    
    ftp
    
    FTP support => enabled
    
    gettext
    
    GetText Support => enabled
    
    hash
    
    hash support => enabled
    Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b fnv132 fnv164 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 
    
    iconv
    
    iconv support => enabled
    iconv implementation => glibc
    iconv library version => 2.13
    
    Directive => Local Value => Master Value
    iconv.input_encoding => ISO-8859-1 => ISO-8859-1
    iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
    iconv.output_encoding => ISO-8859-1 => ISO-8859-1
    
    json
    
    json support => enabled
    json version => 1.2.1
    
    libxml
    
    libXML support => active
    libXML Compiled Version => 2.8.0
    libXML Loaded Version => 20800
    libXML streams => enabled
    
    mbstring
    
    Multibyte Support => enabled
    Multibyte string engine => libmbfl
    HTTP input encoding translation => disabled
    libmbfl version => 1.3.2
    
    mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
    
    Multibyte (japanese) regex support => enabled
    Multibyte regex (oniguruma) version => 5.9.1
    
    Directive => Local Value => Master Value
    mbstring.detect_order => no value => no value
    mbstring.encoding_translation => Off => Off
    mbstring.func_overload => 0 => 0
    mbstring.http_input => pass => pass
    mbstring.http_output => pass => pass
    mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
    mbstring.internal_encoding => no value => no value
    mbstring.language => neutral => neutral
    mbstring.strict_detection => Off => Off
    mbstring.substitute_character => no value => no value
    
    mhash
    
    MHASH support => Enabled
    MHASH API Version => Emulated Support
    
    openssl
    
    OpenSSL support => enabled
    OpenSSL Library Version => OpenSSL 1.0.1e 11 Feb 2013
    OpenSSL Header Version => OpenSSL 1.0.1e 11 Feb 2013
    
    pcntl
    
    pcntl support => enabled
    
    pcre
    
    PCRE (Perl Compatible Regular Expressions) Support => enabled
    PCRE Library Version => 8.30 2012-02-04
    
    Directive => Local Value => Master Value
    pcre.backtrack_limit => 1000000 => 1000000
    pcre.recursion_limit => 100000 => 100000
    
    Phar
    
    Phar: PHP Archive support => enabled
    Phar EXT version => 2.0.1
    Phar API version => 1.1.1
    SVN revision => $Id: 2a47d3d0354109d8077e34d59f1228ccfd021d59 $
    Phar-based phar archives => enabled
    Tar-based phar archives => enabled
    ZIP-based phar archives => enabled
    gzip compression => enabled
    bzip2 compression => enabled
    OpenSSL support => enabled
    
    
    Phar based on pear/PHP_Archive, original concept by Davey Shafik.
    Phar fully realized by Gregory Beaver and Marcus Boerger.
    Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
    Directive => Local Value => Master Value
    phar.cache_list => no value => no value
    phar.readonly => On => On
    phar.require_hash => On => On
    
    posix
    
    Revision => $Id: 967584c6fadb3467f31abe8e13caa8764df85867 $
    
    Reflection
    
    Reflection => enabled
    Version => $Id: 1cf65cee164ed57874ce2d29e5c46b82f6139524 $
    
    session
    
    Session Support => enabled
    Registered save handlers => files user 
    Registered serializer handlers => php php_binary wddx 
    
    Directive => Local Value => Master Value
    session.auto_start => Off => Off
    session.cache_expire => 180 => 180
    session.cache_limiter => nocache => nocache
    session.cookie_domain => no value => no value
    session.cookie_httponly => Off => Off
    session.cookie_lifetime => 0 => 0
    session.cookie_path => / => /
    session.cookie_secure => Off => Off
    session.entropy_file => /dev/urandom => /dev/urandom
    session.entropy_length => 32 => 32
    session.gc_divisor => 100 => 100
    session.gc_maxlifetime => 1440 => 1440
    session.gc_probability => 1 => 1
    session.hash_bits_per_character => 4 => 4
    session.hash_function => 0 => 0
    session.name => PHPSESSID => PHPSESSID
    session.referer_check => no value => no value
    session.save_handler => files => files
    session.save_path => /var/lib/php5 => /var/lib/php5
    session.serialize_handler => php => php
    session.upload_progress.cleanup => On => On
    session.upload_progress.enabled => On => On
    session.upload_progress.freq => 1% => 1%
    session.upload_progress.min_freq => 1 => 1
    session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
    session.upload_progress.prefix => upload_progress_ => upload_progress_
    session.use_cookies => On => On
    session.use_only_cookies => On => On
    session.use_trans_sid => 0 => 0
    
    shmop
    
    shmop support => enabled
    
    SimpleXML
    
    Simplexml support => enabled
    Revision => $Id: 455280fc74f9f002b7314def7a456f6c3080eb92 $
    Schema support => enabled
    
    soap
    
    Soap Client => enabled
    Soap Server => enabled
    
    Directive => Local Value => Master Value
    soap.wsdl_cache => 1 => 1
    soap.wsdl_cache_dir => /tmp => /tmp
    soap.wsdl_cache_enabled => 1 => 1
    soap.wsdl_cache_limit => 5 => 5
    soap.wsdl_cache_ttl => 86400 => 86400
    
    sockets
    
    Sockets Support => enabled
    
    SPL
    
    SPL support => enabled
    Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
    Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
    
    standard
    
    Dynamic Library Support => enabled
    Path to sendmail => /usr/sbin/sendmail -t -i 
    
    Directive => Local Value => Master Value
    assert.active => 1 => 1
    assert.bail => 0 => 0
    assert.callback => no value => no value
    assert.quiet_eval => 0 => 0
    assert.warning => 1 => 1
    auto_detect_line_endings => 0 => 0
    default_socket_timeout => 60 => 60
    from => no value => no value
    url_rewriter.tags => a=href,area=href,frame=src,form=,fieldset= => a=href,area=href,frame=src,form=,fieldset=
    user_agent => no value => no value
    
    sysvmsg
    
    sysvmsg support => enabled
    Revision => $Id: 6360183f0075ec66a3dfa01633b2ed808dd482af $
    
    tokenizer
    
    Tokenizer Support => enabled
    
    wddx
    
    WDDX Support => enabled
    WDDX Session Serializer => enabled
    
    xml
    
    XML Support => active
    XML Namespace Support => active
    libxml2 Version => 2.8.0
    
    xmlreader
    
    XMLReader => enabled
    
    xmlwriter
    
    XMLWriter => enabled
    
    zip
    
    Zip => enabled
    Extension Version => $Id$
    Zip version => 1.9.1
    Libzip version => 0.9.0
    
    zlib
    
    ZLib Support => enabled
    Stream Wrapper => compress.zlib://
    Stream Filter => zlib.inflate, zlib.deflate
    Compiled Version => 1.2.1.1
    Linked Version => 1.2.7
    
    Directive => Local Value => Master Value
    zlib.output_compression => Off => Off
    zlib.output_compression_level => -1 => -1
    zlib.output_handler => no value => no value
    
    Additional Modules
    
    Module Name
    sysvsem
    sysvshm
    
    Environment
    
    Variable => Value
    SHELL => /bin/bash
    USER => web1
    USERNAME => web1
    PATH => /usr/bin:/bin
    PWD => /home/misuvweb1
    SHLVL => 1
    HOME => /home/misuvweb1
    _ => /usr/bin/php
    
    PHP Variables
    
    Variable => Value
    _SERVER["SHELL"] => /bin/bash
    _SERVER["USER"] => web1
    _SERVER["USERNAME"] => web1
    _SERVER["PATH"] => /usr/bin:/bin
    _SERVER["PWD"] => /home/misuvweb1
    _SERVER["SHLVL"] => 1
    _SERVER["HOME"] => /home/misuvweb1
    _SERVER["_"] => /usr/bin/php
    _SERVER["PHP_SELF"] => /web/crono/test.php
    _SERVER["SCRIPT_NAME"] => /web/crono/test.php
    _SERVER["SCRIPT_FILENAME"] => /web/crono/test.php
    _SERVER["PATH_TRANSLATED"] => /web/crono/test.php
    _SERVER["DOCUMENT_ROOT"] => 
    _SERVER["REQUEST_TIME_FLOAT"] => 1408438262.0021
    _SERVER["REQUEST_TIME"] => 1408438262
    _SERVER["argv"] => Array
    (
        [0] => /web/crono/test.php
    )
    
    _SERVER["argc"] => 1
    _ENV["SHELL"] => /bin/bash
    _ENV["USER"] => web1
    _ENV["USERNAME"] => web1
    _ENV["PATH"] => /usr/bin:/bin
    _ENV["PWD"] => /home/misuvweb1
    _ENV["SHLVL"] => 1
    _ENV["HOME"] => /home/misuvweb1
    _ENV["_"] => /usr/bin/php
    
    PHP License
    This program is free software; you can redistribute it and/or modify
    it under the terms of the PHP License as published by the PHP Group
    and included in the distribution in the file:  LICENSE
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    If you did not receive a copy of the PHP license, or have any
    questions about PHP licensing, please contact [email protected].
    
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    the mysql / mysqli extension seems to be missing in the php version that is installed in your website jail and for that reason, the cronjob can not use mysqli.

    Why dont you just use a url cronjob, so that the website php is used? Just enter:

    http://yourdomain.tld/crono/test.php

    in the command field of the cronjob. ispconfig then takes care that this url is called at the given times.
     
  7. misuv

    misuv Member

    not working

    I can't use wget, I'm behind a router and I'm redirected to router login page insted of website.

    I can edit the php.ini file if would know how and path to file. or use command line to install the mysql / mysqli extension but of course dont'n know how. :D

    In previously install didn't had this problem. is this a bug of ISPConfig, tutorial or Debian?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Neither nor, php in jails is not part of the ispconfig standard setup nor of the tutorial. I guess you must have enabled or configured that on yout´r own and the mysqli extension was just not copied as part of that configuration. basically you have to copy the mysql / mysqli php extension into the jail.
     
  9. misuv

    misuv Member

    any hint?

    any hint how to do this?
     
  10. misuv

    misuv Member

    more info on the problem

    I dig on the problem and seems to be a bug (of debian I think).

    The php.ini and aditional php.ini files from conf.d are not loaded in cli when used a cron job.

    what is strange is that the files are loaded from command line

    I haven't found a solution yet, if anyone can help... :)

    Mihai
     
    Last edited: Aug 20, 2014
  11. misuv

    misuv Member

    Almost solved (I hope)

    I hope I almost solved the problem. :)

    I'm almost sure that the problem is the way jailkit is configured in ISPConfig server settings.

    The question is how I enable mysqli to run from cli in jailkit cron?

    can somebody help me please?
     
  12. misuv

    misuv Member

    partial solved

    Ok problem is partialy solved.

    is working now if I don't use php date() function.

    if I use it I receive the following error and the script is no longer executed.

    I tried to add to Server Config > Jailkit > Cron :
    Code:
     /etc/localtime/ /usr/share/zoneinfo
    I also defined
    Code:
    date.timezone = "Europe/Bucharest"
    
    in php.ini (the right one)

    Or
    Code:
    date_default_timezone_set("Europe/Bucharest");
    in test.php file

    NO SUCCESS

    ----------------

    I also receive the following error message, but script is executed, still is not pretty. So maybe can help me out.

    I tried to add to Server Config > Jailkit > Cron :
    Code:
    /usr/share/snmp
    but no success
     
  13. misuv

    misuv Member

    Solved PHP Fatal error: date(): Timezone database is corrupt - this should *never* ha

    Solved PHP Fatal error: date(): Timezone database is corrupt - this should *never* happen! in...

    here is the solution:

    1. from command line:

    Code:
    apt-get install php-pear php5-dev
    pecl install timezonedb
    echo 'extension=timezonedb.so'> /etc/php5/mods-available/timezonedb.ini
    ln -sf /etc/php5/mods-available/timezonedb.ini /etc/php5/conf.d/30-timezonedb.ini
    service php5-fpm restart
    
    2. In ISPConfig > System > Server Config > Jailkit

    Source for solution:
    http://ivanbayan.com/index.php/2013/06/26/how-to-fix-timezone-database-is-corrupt-this-should-never-happen/

    http://forum.nginx.org/read.php?3,226978

    I Hope this help others
     
  14. trondhuso

    trondhuso Member

    my solution to solving the corrupted timezone-database was to run the following command:
    jk_cp -v -j /{your jail}/ /usr/share/zoneinfo/
     
  15. trondhuso

    trondhuso Member

    I also had issues with a lot of Cannot adopt OID in UCD-SNMP-MIB in the cli and this was solved with:
    jk_cp -v -j /{your jail}/ /etc/snmp/*
    I had prior to this one done
    jk_cp -v -j /{your jail}/ /usr/share/snmp/*
    And as root also installed php5-snmp (apt-get install php5-snmp)
    So a combination of all those commands might have done the trick
     
    Rudolf Byker likes this.
  16. Rudolf Byker

    Rudolf Byker New Member

    That solved it for me!

    Instead of using jk_cp to copy directories manually for each user, you can use jk_init to update existing jails, too:
    Code:
    # jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/client2/web16/ php
    Config is at /etc/jailkit/jk_init.ini . I added the following to make php work (which I needed for drush):
    Code:
    [php]
    comment = the PHP interpreter and libraries
    executables = /usr/bin/php5, /usr/bin/php
    directories = /usr/lib/php5, /usr/share/php, /usr/share/php5, /etc/php5, /usr/share/php-geshi, /usr/share/zoneinfo, /$
    includesections = env
    
    [env]
    comment = environment variables
    executables = /usr/bin/env
    
     
  17. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Be careful adding entire /etc/php* directories to a jail, as there can be sensitive info in there. Iirc, the custom php directives of every website are stored there, so you end up copying those to every client's jails. There may be other data/things which should not be shared too, just browse the files and see what is there.
     
  18. Rudolf Byker

    Rudolf Byker New Member

    Thanks for the warning. Any ideas on how to make it more specific?
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you really need snmp in php? Personally, I just do not install (or remove) the php snmp module to avoid these errors. I never had a app which needed it.
     
  20. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You probably have a different OS/version, but this is a jk_init.ini section for debian 9 with php installed from the sury.org repo:
    Code:
    [env]
    comment = /bin/env for environment variables
    paths = /bin/env
    
    # debian 9 default php version is 7.0
    [php]
    comment = default php version and libraries
    paths = /usr/bin/php
    includesections = php_common, php7_0
    
    [php_common]
    comment = common php directories and libraries
    # notice: potential information leak
    # do not add all of /etc/php/ or any of the fpm directories
    # or the php config (which includes custom php snippets) from *all*
    # site which use fpm will be copied to *every* jailkit
    paths = /usr/bin/php, /usr/lib/php/, /usr/share/php/, /usr/share/zoneinfo/
    includesections = env
    
    [php5_6]
    comment = php version 5.6
    paths = /usr/bin/php5.6, /usr/lib/php/5.6/, /usr/lib/php/20131226/, /usr/share/php/5.6/, /etc/php/5.6/cli/, /etc/php/5.6/mods-available/
    includesections = php_common
    
    [php7_0]
    comment = php version 7.0
    paths = /usr/bin/php7.0, /usr/lib/php/7.0/, /usr/lib/php/20151012/, /usr/share/php/7.0/, /etc/php/7.0/cli/, /etc/php/7.0/mods-available/
    includesections = php_common
    
    [php7_1]
    comment = php version 7.1
    paths = /usr/bin/php7.1, /usr/lib/php/7.1/, /usr/lib/php/20160303/, /usr/share/php/7.1/, /etc/php/7.1/cli/, /etc/php/7.1/mods-available/
    includesections = php_common
    
    [php7_2]
    comment = php version 7.2
    paths = /usr/bin/php7.2, /usr/lib/php/7.2/, /usr/lib/php/20170718/, /usr/share/php/7.2/, /etc/php/7.2/cli/, /etc/php/7.2/mods-available/
    includesections = php_common
    
    [php7_3]
    comment = php version 7.3
    paths = /usr/bin/php7.3, /usr/lib/php/7.3/, /usr/lib/php/20180731/, /usr/share/php/7.3/, /etc/php/7.3/cli/, /etc/php/7.3/mods-available/
    includesections = php_common
    
     
    skrb_x and till like this.

Share This Page