Monthly Archives: June 2009

php-fpm

0
Filed under WEB-DEV-LOG
Tagged as

look into replacing fastCGI with php-fpm

php-fpm.anight.org/

FreeBSD port

php-fpm.anight.org/downloads/freebsd-port/

BSD php

0
Filed under WEB-DEV-LOG
Tagged as

copied /usr/local/etc/php.ini-recommended to php.ini

No php.ini file exsisted. Where was PHP getting its config from?

PHP upload limit

0
Filed under WEB-DEV-LOG
Tagged as

Debian /etc/php5/apache2/php.ini
upload_max_filesize = 100M
post_max_size = 100M

PhpMyAdmin

0
Filed under BSD
Tagged as

from here

IMPORTANT

The effect of installing phpmyadmin is to discard mysql host based authentication, as connections via phpmyadmin will appear to come from localhost. For this reason, phpmyadmin should be protected by .htaccess as described below.

Install

* ApacheWebServer

* ApacheNexusAuthentication

*

cd /usr/ports/databases/phpmyadmin

make

make install

ln -s /usr/local/www/phpMyAdmin /usr/local/www/data/phpMyAdmin

cd /usr/local/www/data/phpMyAdmin

cp config.inc.php.sample config.inc.php

vi config.inc.php

And change:

$cfg['PmaAbsoluteUri'] = ”;

$cfg['blowfish_secret'] = ”

$cfg['Servers'][$i]['auth_type'] = ‘config’; // Authentication method (config, http or cookie based)?

$cfg['ShowChgPassword'] = FALSE; // simple users or not

to:

$cfg['PmaAbsoluteUri'] = ‘https://yourhost.yourdomain/phpMyAdmin/’;

$cfg['blowfish_secret'] = ‘YourSecRet’

$cfg['Servers'][$i]['auth_type'] = ‘cookie’; // Authentication method (config, http or cookie based)?

$cfg['ShowChgPassword'] = TRUE; // simple users or not

* Add to /usr/local/etc/apache/httpd.conf:

<Directory /usr/local/www/data/phpMyAdmin>

Allow from all

AllowOverride All

</Directory>

* Create /usr/local/www/data/phpMyAdmin/.htaccess as shown in ApacheWebServer in the mod_auth_radius section, except instead of:

require valid-user

use

require user list-of-users

where list-of-users is a space separated list of trusted users

The reason for the .htaccess on the phpMyAdmin directory is to protect the mysql databases from unauthorized access. Often, mysql is configured to permit access from specific hosts, typically localhost, and weak passwords may be employed. phpMyAdmin will connect to the local database and appear to come from localhost, rendering useless mysql host based permissions.

24.3 Portsnap: A Ports Collection Update Tool

0
Filed under BSD, WEB-DEV-LOG
Tagged as
  • Its too bad she won’t live. But then again who does?
  • My mother, I’ll tell you about my mother.  BANG.

The process is now complete, and applications may be installed or upgraded using the updated Ports Collection.

To run both processes consecutively, issue the following command:

# portsnap fetch update

nginx

0
Filed under BSD
Tagged as

nginx -c /usr/local/etc/nginx/nginx.conf -t
/usr/local/etc/rc.d/nginx restart

phpMyAdmin installed

0
Filed under BSD
Tagged as

phpMyAdmin-3.2.0 has been installed into:

/usr/local/www/phpMyAdmin

Please edit config.inc.php to suit your needs.

To make phpMyAdmin available through your web site, I suggest
that you add something like the following to httpd.conf:

Alias /phpmyadmin/ “/usr/local/www/phpMyAdmin/”

<Directory “/usr/local/www/phpMyAdmin/”>
Options none
AllowOverride Limit

Order Deny,Allow
Deny from all
Allow from 127.0.0.1 .example.com
</Directory>

===

add to /usr/local/etc/nginx/nginx.conf

location /phpmyadmin {

alias /usr/local/www/phpMyAdmin/;

}

Create dummy file on freebsd

0
Filed under BSD
Tagged as

dd if=/dev/random of=test bs=1m count=2

This will create 2.0M file called “test”.

This also works on linux, but he doesn’t understand “m” as unit.

I’m affraid /dev/random will be very slow for creating large files or benchmarking.

/dev/urandom is the choice to go with.

FreeBSD group/ user

0
Filed under BSD
Tagged as

Command Summary
adduser(8) The recommended command-line application for adding new users.
rmuser(8) The recommended command-line application for removing users.
chpass(1) A flexible tool to change user database information.
passwd(1) The simple command-line tool to change user passwords.
pw(8) A powerful and flexible tool to modify all aspects of user accounts.

Example 13-7. Adding a Group Using pw(8)

# pw groupadd teamtwo
# pw groupshow teamtwo
teamtwo:*:1100:

Example 13-8. Setting the List of Members of a Group Using pw(8)

# pw groupmod teamtwo -M jru
# pw groupshow teamtwo
teamtwo:*:1100:jru
Example 13-9. Adding a New Member to a Group Using pw(8)

# pw groupmod teamtwo -m db
# pw groupshow teamtwo
teamtwo:*:1100:jru,db

wordpress myTreasures MOD

0
Filed under WEB-DEV-LOG
Tagged as

to change comma ratings to Canadian decimals

mytreasuresRating.php

Line 68: <?php echo number_format($i,1,”,”,”"); ?>

<?php echo number_format($i,1,”.”,”"); ?>

Remove “my comment” tag

mytreasures.php Line 679

replace with overview

Remove Choose view options

mytreasures.php Line 469 -> 510