Fluid

Mac OS X Server – Web Server & MySQL Fixes

PHP.ini Additions

upload_max_filesize = 20M

upload_post_filesize = 20M

allow_url_include = On

magic_quotes_gpc = On

PHP Errors – Date/Timezone Setting

Server-wide: Change the following in etc/php.ini

[Date]

; Defines the default timezone used by the date functions

; http://php.net/date.timezone

date.timezone = America/Denver

Site by Site: Add the following to .htaccess

php_value date.timezone America/Denver

PHP Errors – eregi() is deprecated

Fix here: http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-php-53/

Basically replacing with preg_match or preg_replace and using extra delimiters.

Install mcrypt / Remove mcrypt warning from phpMyAdmin

Follow these instructions to install:

http://michaelgracie.com/2009/09/23/plugging-mcrypt-into-php-on-mac-os-x-snow-leopard-10.6.1/

To remove the warning add the following line to configure.inc.php in the phpMyAdmin folder:

$cfg[‘McryptDisableWarning’] = ‘true’;

Ioncube Loaders

  1. The loader scripts for Ioncube will show a blank page so easier to add a line to php.ini.
  2. Download the appropriate loader files from http://www.ioncube.com/loaders.php
  3. Place the ioncube folder somewhere in or above the sites folders it is used for.
  4. Edit /etc/php.ini and under |Dynamic Extensions| place this line zend_extension=[filepath]/ioncube_loader_dar_5.3.so
  5. Restart Web services.
  6. Verify by copy and pasting the two PHP files from the ioncube folder into the appropriate site folder and view.

These are specific for Snow Leopard Server and the specific Apache setup PHP version and Processor Bit version will affect which loader file to use. More information available here: http://www.ioncube.com/loader_installation.php

MySQL Troubleshooting

mysql_install_db –user=mysql

ln -s /var/mysql/mysql.sock /tmp/mysql.sock

WordPress

/** MySQL hostname */

define(‘DB_HOST’ ‘localhost:/var/mysql/mysql.sock’);

Make Drupal PHP 5.3 Compatible

Date Errors

  1. Open Settings.php
  2. Add this: ini_set(‘date.timezone’ ‘America/Los_Angeles’);
    1. Change time zone as appropriate

Activity Stream Errors

  1. Open activitystream.module
  2. Change: function theme_activitystream_header(&$action) { to: function theme_activitystream_header($action) {
    1. Remove the & from the line

Parameter 1 to profile_load_profile() … Errors in Admin

  1. Open profile.module
  2. Change line 228: function profile_load_profile(&$user) { to: function profile_load_profile($user) {
Remove the & from the line

WordPress – Correct URLs when moving domains

To update WordPress options with the new blog location use the following SQL command:

UPDATE wp_options SET option_value = replace (

option_value

http://www.old-domain.com’

http://www.new-domain.com’)

WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

UPDATE wp_posts SET post_content = REPLACE (

post_content

‘[old-domain]’

‘[new-domain]’);

UPDATE wp_posts SET guid = REPLACE (

guid

‘[old-domain]’

‘[new-domain]’);

UPDATE wp_postmeta SET meta_value = REPLACE (

meta_value

‘[old-domain]’

‘[new-domain]’);

UPDATE wp_woo_custom_nav_records SET custom_link = REPLACE (

custom_link

‘[old-domain]’

‘[new-domain]’);

WordPress – Get Woothemes to stop adding Varela to the HEAD forcing Google Font downloads

Switch all Custom Typography in Theme Options to Verdana even if off

Comment out lines 185-189 in /wp-content/themes/wootique/includes/theme-actions.php

Make Joomla 1.x Content PHP 5.3 Compatible

content disappears everywhere!

Open /includes/Cache/Lite/Function.php and replace at line 74:

Code:

$arguments = func_get_args();

with:

Code:

$arguments = func_get_args();

$numargs = func_num_args();

for($i=1; $i < $numargs; $i++){

$arguments[$i] = &$arguments[$i];

}

Joomla Contact Page Gone

This removes vCard functionality but who cares:

components/com_contact/contact.class.php

contact.class.php

Comment out Line 19

Delete Lines 85 – 158

Exit mobile version