Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
B

belk123

@belk123
Non seguire Segui
Informazioni
Post
7
Discussioni
7
Condivisioni
0
Gruppi
0
Da chi è seguito
0
Chi segue
0

Post

Recenti Migliore Controverso

  • importare database mysql dentro un contenitore (docker)
    B belk123
    Coding
    $ cat docker-compose.yml
    version: '2'
    services:
      app:
        build:
          context: .
        image: test-image
        ports:
          - 8080:80
        volumes:
          - .:/srv/app
        links:
          - mysql
          - redis
        environment:
          DB_HOST: mysql
          DB_DATABASE: laravel_docker
          DB_USERNAME: app
          DB_PASSWORD: password
          REDIS_HOST: redis
          SESSION_DRIVER: redis
          CACHE_DRIVER: redis
      mysql:
        image: mysql:5.7
        ports:
          - 13306:3306
        environment:
          MYSQL_DATABASE: test
          MYSQL_USER: root
          MYSQL_PASSWORD: root1
          MYSQL_ROOT_PASSWORD: root2
      redis:
        image: redis:4.0-alpine
        ports:
          - 16379:6379
    
    $ cat Dockerfile
    FROM php:7.2.2-cli
    
    COPY . /usr/local/bin
    WORKDIR /usr/local/bin
    RUN docker-php-ext-install mbstring pdo pdo_mysql
    
    CMD mysql -u $MYSQL_USER -p $MYSQL_PASSWORD $MYSQL_DATABASE < test.sql
    
    $ cat test.php
    <?php
    
    $pdo = new pdo(
        "mysql:host=localhost;dbname=test",
        'root','root1'
    );
    
    $query = $pdo->query("SELECT * FROM people");
    var_dump($pdo->errorInfo());
    
    foreach($query as $row ){  
        var_dump($row);  
    }  
    
    $ cat test.sh
    #!/usr/bin/env bash
    set -e
    cd $(dirname "$0")
    
    docker-compose up --build -d
    docker run test-image php /usr/local/bin/test.php
    
    $ ./test.sh
    Building app
    Step 1/5 : FROM php:7.2.2-cli
     ---> 21c3582549e6
    Step 2/5 : COPY . /usr/local/bin
     ---> Using cache
     ---> e0a9005e2907
    Step 3/5 : WORKDIR /usr/local/bin
     ---> Using cache
     ---> 3efd6cdfab46
    Step 4/5 : RUN docker-php-ext-install mbstring pdo pdo_mysql
     ---> Using cache
     ---> 282ab8fb5896
    Step 5/5 : CMD mysql -u $MYSQL_USER -p $MYSQL_PASSWORD $MYSQL_DATABASE < test.sql
     ---> Using cache
     ---> 7ba640bd690d
    Successfully built 7ba640bd690d
    dockermysql_redis_1 is up-to-date
    dockermysql_mysql_1 is up-to-date
    Starting dockermysql_app_1
    
    Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory in /usr/local/bin/test.php:5
    

    Perchè non funziona?


  • ini_set() non funziona
    B belk123
    Coding
    <?php // test.php
    var_dump(ini_set('mail.log','/tmp/new-value-55557.log'));
    var_dump(ini_get('mail.log'));
    ?>
    

    Proviamo...

    $ php test.php
    bool(false)
    string(20) "/tmp/mail-755776.log"

    Come vedete ini_set() restituisce false e il nuovo valore non viene impostato.
    Perchè?


  • usare il nas Synology come git server
    B belk123
    Coding

    Sul mio nas ho creato un git repository seguendo più o meno l'apposita guida.

    Quindi ho creato anche l'apposito file composer.json (sul nas), sono ritornato sul mio computer normale con linux/ubuntu, ed ho iniziato a fare qualche prova:

    + cd /test
    + cat composer.json
    {
        "require": {
            "test/test": "*"
        },
        "repositories": {
            "test/test": {
                "type": "vcs",
                "url": "nas:/volume1/git/test"
            }
        }
    }
    + composer update
    You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
    Loading composer repositories with package information
    Updating dependencies (including require-dev)         
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - The requested package test/test could not be found in any version, there may be a typo in the package name.
    
    Potential causes:
     - A typo in the package name
     - The package is not available in a stable-enough version according to your minimum-stability setting
       see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
    
    Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
    

    Come mai non funziona?

    L'unica soluzione che ho trovato è clonare direttamente il repository

    $ git clone ssh://nas/volume1/git/test
    

    funziona, ma non è proprio quello che voglio...


  • composer: forzare l'uso del comando require-dev
    B belk123
    Coding

    Ho creato una libreria contenente essenzialmente strumenti di debug.
    Per questo motivo, il comando corretto per importare tale libreria nei vari progetti, sarebbe

    composer require-dev mio/debug

    e non

    composer require mio/debug

    Si può quindi impedire l'uso del comando 'require' (magari intervenendo sull'apposito composer.json)?

    Ho creato una libreria contenente essenzialmente strumenti di debug.
    Per questo motivo, il comando corretto per importare tale libreria nei vari progetti, sarebbe

    composer require-dev mio/debug

    e non

    composer require mio/debug

    Si può quindi impedire l'uso del comando 'require' (magari intervenendo sull'apposito composer.json)?

    Ho creato una libreria contenente essenzialmente strumenti di debug.
    Per questo motivo, il comando corretto per importare tale libreria nei vari progetti, sarebbe

    composer require-dev mio/debug

    e non

    composer require mio/debug

    Si può quindi impedire l'uso del comando 'require' (magari intervenendo sull'apposito composer.json)?


  • test funzionali con phpunit
    B belk123
    Coding

    Si possono fare o è un tool solo per test unitari?


  • eseguire test-case Selenium da riga di comando...
    B belk123
    Coding

    ...invece di usare l'apposita estensione di firefox.
    Si può?

    Cioè (io uso linux/ubuntu) apro il terminale è digito

    java -jar selenium-server-standalone-3.4.0.jar -htmlSuite "*firefox" "10.8.100.106" "/mytestsuite/mytestsuite.html" "/mytestsuite/results.html"

    ma mi esce questo errore

    Unable to find the HTML runner. This is normally because you have not downloaded
    or made available the 'selenium-leg-rc' jar on the CLASSPATH. Your test will
    not be run.
    Download the Selenium HTML Runner and
    use that in place of the selenium-server-standalone.jar for the simplest way of
    running your HTML suite.

    Perchè?


  • eseguire test-case Selenium da riga di comando...
    B belk123
    Coding

    ...invece di usare l'apposita estensione di firefox.
    Si può?

    Cioè (io uso linux/ubuntu) apro il terminale è digito

    java -jar selenium-server-standalone-3.4.0.jar -htmlSuite "*firefox" "10.8.100.106" "/mytestsuite/mytestsuite.html" "/mytestsuite/results.html"

    ma mi esce questo errore

    Unable to find the HTML runner. This is normally because you have not downloaded
    or made available the 'selenium-leg-rc' jar on the CLASSPATH. Your test will
    not be run.
    Download the Selenium HTML Runner and
    use that in place of the selenium-server-standalone.jar for the simplest way of
    running your HTML suite.

    Perchè?

  • Accedi

  • Non hai un account? Registrati

  • Accedi o registrati per effettuare la ricerca.
  • Primo post
    Ultimo post
Home Accedi Registrati
Menu
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.