segunda-feira, 11 de julho de 2016

Cygwin Setup command line arguments


 -D --download                     Download from internet
 -L --local-install                Install from local directory
 -s --site                         Download site
 -O --only-site                    Ignore all sites except for -s
 -R --root                         Root installation directory
 -x --remove-packages              Specify packages to uninstall
 -c --remove-categories            Specify categories to uninstall
 -P --packages                     Specify packages to install
 -C --categories                   Specify entire categories to install
 -p --proxy                        HTTP/FTP proxy (host:port)
 -a --arch                         architecture to install (x86_64 or x86)
 -q --quiet-mode                   Unattended setup mode
 -M --package-manager              Semi-attended chooser-only mode
 -B --no-admin                     Do not check for and enforce running as
                                   Administrator
 -h --help                         print help
 -l --local-package-dir            Local package directory
 -r --no-replaceonreboot           Disable replacing in-use files on next
                                   reboot.
 -X --no-verify                    Don't verify setup.ini signatures
 -n --no-shortcuts                 Disable creation of desktop and start menu
                                   shortcuts
 -N --no-startmenu                 Disable creation of start menu shortcut
 -d --no-desktop                   Disable creation of desktop shortcut
 -K --pubkey                       URL of extra public key file (gpg format)
 -S --sexpr-pubkey                 Extra public key in s-expr format
 -u --untrusted-keys               Use untrusted keys from last-extrakeys
 -U --keep-untrusted-keys          Use untrusted keys and retain all
 -g --upgrade-also                 also upgrade installed packages
 -o --delete-orphans               remove orphaned packages
 -A --disable-buggy-antivirus      Disable known or suspected buggy anti virus
                                   software packages during execution.

You can, for example, install packages from DOS command line:

setup-x86.exe -q -P packagename1,packagename2....

source:

SQL query to list Users in MySQL Database

>SELECT CONCAT(QUOTE(user),'@',QUOTE(host)) UserAccount FROM mysql.user ORDER BY user ASC;

sexta-feira, 1 de julho de 2016

Setting up Apache Virtual Hosts on XAMPP

C:\xampp\apache\conf\extra\httpd-vhosts.conf

# NameVirtualHost *:80 # deprecated
# NameVirtualHost *:443 # deprecated

<VirtualHost *:80>
        DocumentRoot "C:/XAMPP/htdocs"
        ServerName localhost
    </VirtualHost>
    <VirtualHost *:443>
        DocumentRoot "C:/XAMPP\htdocs"
        ServerName localhost
        SSLEngine on
        SSLCertificateFile "conf/ssl.crt/server.crt"
        SSLCertificateKeyFile "conf/ssl.key/server.key"
    </VirtualHost>

    <VirtualHost *:80>
        DocumentRoot "C:/xampp/htdocs/someSite"
        ServerName [dns]
        ServerAlias [fqdns]
        <Directory "C:/xampp/htdocs/someSite">
            Options Indexes FollowSymLinks Includes ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>
    <VirtualHost *:443>
        DocumentRoot "C:/xampp/htdocs/someSite"
        ServerName [dns]
        ServerAlias [fqdns]
        SSLEngine on
        SSLCertificateFile "conf/ssl.crt/server.crt"
        SSLCertificateKeyFile "conf/ssl.key/server.key"
        <Directory "C:/xampp/htdocs/someSite">
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
</VirtualHost>

domingo, 26 de junho de 2016

XAMPP set root password

$mysqladmin.exe -u root password secret

Source: https://www.apachefriends.org/faq_windows.html

PHP prefered modules

PHP 5.6

  • php_bz2.dll
  • php_curl.dll
  • php_mbstring.dll
  • php_exif.dll
  • php_gd2.dll
  • php_gettext.dll
  • php_mysql.dll
  • php_mysqli.dll
  • php_openssl.dll
  • php_pdo_mysql.dll
  • php_pdo_sqlite.dll
  • php_soap.dll
  • php_sockets.dll
  • php_sqlite3.dll
  • php_xmlrpc.dll
  • php_xsl.dll

PHP 7

  • php_bz2.dll
  • php_curl.dll
  • php_mbstring.dll
  • php_exif.dll
  • php_gd2.dll
  • php_gettext.dll
  • php_mysqli.dll
  • php_openssl.dll
  • php_pdo_mysql.dll
  • php_pdo_sqlite.dll
  • php_soap.dll
  • php_sockets.dll
  • php_sqlite3.dll
  • php_xmlrpc.dll
  • php_xsl.dll

terça-feira, 7 de junho de 2016

Activating XDebug on PHP

  • Download and adequate XDebug DLL from XDebug download site section
  • Place the DLL into your PHP ext folder, mine is C:\xampp\php\ext
  • Edit your php.ini files and add this lines:
  • zend_extension = [pathToYouDLLinsideExtFolder]
    ;mine was: zend_extension =  C:\xampp\php\ext\php_xdebug-2.4.0-5.6-vc11.dll
    
    [xdebug]
    xdebug.remote_enable=1
    xdebug.remote_host=localhost
    xdebug.remote_port=9000
    

If you are using a Web Server to execute your scripts, restart it.

If you got some problem, use XDebug Wizard