This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MAG=magento #system wide symlink | |
# or absolute: | |
#MAG=/usr/share/nginx/mymagentoprojectroot/bin/magento #absolute path | |
echo "Enabling all modules with clearing static content..." | |
$MAG module:enable --all --clear-static-content | |
echo "Running setup upgrade..." | |
$MAG setup:upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
If you don't want your PHP program to wait XXX seconds before giving up in a case when one of your corporate DC have failed, | |
and since ldap_connect() does not have a mechanism to timeout on a user specified time, | |
this is my workaround which shows excellent practical results. | |
*/ | |
function serviceping($host, $port=389, $timeout=1) | |
{ | |
$op = fsockopen($host, $port, $errno, $errstr, $timeout); | |
if (!$op) return 0; //DC is N/A |