Thursday, January 08, 2015

PHP pear could not extract the package.xml file


could not extract the package.xml file
try

sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev
or mapping gzopen to gzopen64:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1310552

Wednesday, November 05, 2014

Ipv6 localhost Apache setup

#Just a sample ipv6 config:
# ::1 is like 127.0.0.1<
# when you restart apache, see if apache is listening on ipv6
#  sudo netstat -ntlpu
# If not, you may need to make sure eth0 is listening on an ipv6 address
#  sudo ifconfig eth0 add 1::2
# 

<VirtualHost [::1]:80>
    ServerName ipv6
    ServerAlias ipv6.mydomain.com
    DocumentRoot "/var/www/ipv6.mydomain.com"
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory />
        Options -Indexes +FollowSymLinks -Multiviews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

</VirtualHost>

<VirtualHost [::1]:443>
    ServerName ipv6
    ServerAlias ipv6.mydomain.com

    DocumentRoot "/var/www/ipv6.mydomain.com"
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory />
        Options -Indexes FollowSymLinks -MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    Include standard_ssl.inc

    SSLCertificateFile ssl/local.mydomain.com.pem
    SSLCertificateChainFile ssl/DigiCertHighAssuranceCA-3.crt

</VirtualHost>


#sources:
# https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/633981
# http://serverfault.com/questions/81508/listening-for-both-ipv6-and-ipv4-in-apache-2-2
# http://unix.stackexchange.com/questions/106502/apache2-does-not-run-on-ipv4-tcp-port
# http://www.fix6.net/archives/2011/02/04/how-to-enable-ipv6-on-apache2/

Thursday, April 11, 2013

awk substr

http://unix-simple.blogspot.com/2006/10/awk-substr-function.html

Tuesday, April 09, 2013

Linux give user permisison to see apache logs

Grant a user permissions to see apache logs

groupadd admin
usermod -g admin billyj
chgrp admin /var/log/httpd
chmod g+s /var/log/httpd
src:http://serverfault.com/questions/405496/assign-user-and-group-to-site-log-files

Wednesday, March 20, 2013

Create a CSR - and self signed cert

Create a CSR with openssl
openssl req -new -newkey rsa:2048 -nodes -out server.csr -keyout server.key -subj "/C=US/ST=Utah/L=Lindon/O=Super Widgets XYZ/CN=local.example.com"

Use that CSR to create a self signed cert
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

ECC CSR (not typical)
openssl ecparam -genkey -text -name prime256v1 -out example-ecc.key
openssl req -new -key example-ecc.key -sha256 -out example-ecc.csr -subj "/C=US/ST=WA/L=Seattle/O=SomeOrg/CN=local.example.com"

Wednesday, May 23, 2012

Friday, December 30, 2011

PHP on windows


PHP 5.3
http://www.apachelounge.com/download/
http://windows.php.net/download/ (PHP 5.3.x VC9 x86 Thread Safe)

PHP 5.2
http://httpd.apache.org/
http://windows.php.net/download/ (PHP 5.2.x VC6 x86 Thread Safe)