Jump to content
php.lv forumi

Sasa

Reģistrētie lietotāji
  • Posts

    848
  • Joined

  • Last visited

Posts posted by Sasa

  1. Palaižot to skriptu šādu rezultātu izvada. Kā lai saprot kas ir kas?
     

    >>  MySQLTuner 1.4.0 - Major Hayden <[email protected]>
     >>  Bug reports, feature requests, and downloads at http://mysqltuner.com/
     >>  Run with '--help' for additional options and output filtering
    [OK] Logged in using credentials from debian maintenance account.
    [OK] Currently running supported MySQL version 5.5.35-0+wheezy1-log
    [OK] Operating on 64-bit architecture
    
    -------- Storage Engine Statistics -------------------------------------------
    [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
    [--] Data in MyISAM tables: 238M (Tables: 260)
    [--] Data in InnoDB tables: 1G (Tables: 307)
    [--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
    [--] Data in MEMORY tables: 0B (Tables: 4)
    [!!] Total fragmented tables: 328
    
    -------- Security Recommendations  -------------------------------------------
    [OK] All database users have passwords assigned
    
    -------- Performance Metrics -------------------------------------------------
    [--] Up for: 1d 16h 59m 25s (1M q [13.183 qps], 61K conn, TX: 7B, RX: 285M)
    [--] Reads / Writes: 82% / 18%
    [--] Total buffers: 192.0M global + 2.7M per thread (151 max threads)
    [OK] Maximum possible memory usage: 597.8M (29% of installed RAM)
    [OK] Slow queries: 4% (94K/1M)
    [OK] Highest usage of available connections: 19% (29/151)
    [OK] Key buffer size / total MyISAM indexes: 16.0M/99.7M
    [OK] Key buffer hit rate: 99.3% (65M cached / 441K reads)
    [OK] Query cache efficiency: 66.3% (1M cached / 1M selects)
    [!!] Query cache prunes per day: 153619
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 242K sorts)
    [OK] Temporary tables created on disk: 23% (43K on disk / 184K total)
    [OK] Thread cache hit rate: 99% (77 created / 61K connections)
    [!!] Table cache hit rate: 0% (400 open / 619K opened)
    [OK] Open file limit used: 44% (453/1K)
    [OK] Table locks acquired immediately: 99% (958K immediate / 958K locks)
    [!!] InnoDB  buffer pool / data size: 128.0M/1.4G
    [OK] InnoDB log waits: 0
    -------- Recommendations -----------------------------------------------------
    General recommendations:
        Run OPTIMIZE TABLE to defragment tables for better performance
        Increase table_open_cache gradually to avoid file descriptor limits
        Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C
    Variables to adjust:
        query_cache_size (> 16M)
        table_open_cache (> 400)
        innodb_buffer_pool_size (>= 1G)
    
    
  2. 1. ar regexp'u ^[a-zA-Z0-9]+$

    2.

    foldera izveide: http://php.net/manual/en/function.mkdir.phpkā nosaukumu ņem to ko useris ievada username laukā

    lai fails nonāktu pēc uploada usera folderī izmanto http://php.net/manual/en/function.move-uploaded-file.php

    faila pārsaukšana: http://stackoverflow.com/a/18705701/2936503

    ja gribi lai ir 2.jpg ja jau ir 1.jpg tad ar http://php.net/manual/en/function.file-exists.phppārbaudi vai fails eksistē 

    tad šo jauno faila nosaukumu inserto posts tabulā piemērs http://stackoverflow.com/a/18655812/2936503

×
×
  • Create New...