Spyderserve Web Development

Archives: Knowledge Articles

SAS buildOptions Function

_module->buildOptions($array, $value_field, $name_field, $add_zero, $data_fields) Description Takes an array of data and produces an option array to be used in select, dropdown, searchSuggest inputs. Variables Name Required Added Description Type Values Default $array Yes The multi-dimensional array that the data is being extracted from array $value_field Yes The name of the field in each line […]

How to show the top 10 IP addresses in an Apache Log

Sometimes I just want to see what IP address is generating the most traffic to my site.¬† Here is the awk command to do it: awk ‘{a[$1]++} END {for (i in a) print a[i],i}’ [file] | sort -rnk1 | head -n 15 The command above will show the top 15 visitors, by IP address (replace […]

Convert p7b Certificate File to pem

Converting Your Existing Certificate To PEM Format If your certificate is not in PEM format, you can convert it to the PEM format using the following OpenSSL commands: Convert DER to PEM openssl x509 -inform der -in certificate.cer -out certificate.pem Convert P7B to PEM openssl pkcs7 -print_certs -in certificate.p7b -out certificate.pem Convert PFX to PEM […]

Install Composer into Project on Centos [Quick Reference]

Navigate to project directory curl -sS https://getcomposer.org/installer | php Create a file in same directory named¬†composer.json Then add the required packages to the json file: (example) { “require”: { “psr/log”: “1.0.0”, “phpunit/php-timer”: “1.0.7”, “symfony/event-dispatcher”: “3.0.0” } } Once the json file has been edited and saved, execute the following: php composer.phar install This will download […]

Removing SSLv3 Support From Apache

To disable SSLv3 support for Apache you need to look for the ssl configuration file (in Centos it is at /etc/httpd/conf.d/ssl.conf) and modify the SSLProtocol line: SSLProtocol all -SSLv2 -SSLv3 You can also add the line after SSLEngine On in a Virtual Host file. Just be aware that old versions of Internet Explorer (<=6) do […]

Spyderserve  PO Box 5831 Valdosta, Georgia 31603 United States