Items filtered by date: December 2014

To have all my emails downloaded and stored locally i need to use pop3. I also want to have the benefits of IMAP and PUSH email so i instantly get my messages on my phone. The following settings are the best.

  • setup email in outlook with pop3, with the setting leave on server for 14 days
  • setup all the required emails on the phone via IMAP using K-9 Mail (or GMAIL for the inbuilt Google account)
  • when setting up the IMAP accounts on the Android phone with K-9 use the PUSH email option
  • setup all shared pop3 accounts up as IMAP in outlook aswell. This is so sent items can be copied into outlooks sent folder if required

These settings give the best of both worlds and cover me if Googles servers go down, and i can use my own email accounts with PUSH email.

Published in Email

The following code should work on all php setups.

The following code needs to be entered on the file/thread you want the variables to be altered for. This code will on temporarily alter the enviromental variables and they will revert to what they were after the file has finished running. There is also some additional code to display the php info so you can see the variables have been altered, this section can be deleted.

<? 
$phptemp = "/var/www/vhosts/example.com/httpdocs/php.ini";
putenv("PHPRC=$phptemp");

/* the one below works */
apache_setenv("PHPRC", $phptemp);
$yo = getenv('PHPRC');
echo $yo;
phpinfo();
?>
Published in PHP
Sunday, 06 May 2012 00:00

Setting the timezone with PHP

because webservers can be located anywhere in the world yet be used predominately in one region you need to be able to cahnge the timezone on the webserver, however the time stamp never changes.


You can set a default time zone for your server from the configuration file (php.ini) at the line:

Timezones are available here http://www.php.net/manual/en/timezones.europe.php

http://php.net/date.timezone

[Date]
; Defines the default timezone used by the date functions
date.timezone = America/New_York

Published in PHP
Sunday, 06 May 2012 00:00

Disable Magic Quotes in a PHP script

Magic quotes are the bain opf any programmers life. If you commit something to a my sql database that has unescaped characters, php by default will escape them with a backslash '/' and this can mess all your code up.

The following shows you how you can detect if magic quotes are running and how to disable them.


Detect if magic quotes are running

Run this php code on your web server

<?php
if(get_magic_quotes_gpc())
	echo "Magic quotes are enabled";
else
	echo "Magic quotes are disabled";
?>

Disable magic quotes

If you alter the following code in your php.ini will disable magic quotes. You might als be able to use a php variable declaration but this will be less permanent.

; Magic quotes

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off

 

Published in PHP
Sunday, 06 May 2012 00:00

HTC Universal wont boot after flash

for all those stuck in the boot screen

step by step

get the tools attached (mtty 1.42.zip), as mamaich told, you have to use it in bootloader mode, (power + light bulb + reset)

  1. stop activesync USB connection
  2. Uni : Reboot bootloader then connect USB
  3. PC : Run mtty1.42.exe
  4. choose USB in "port" (reconnect if can't find.recognise USB and try remove sim and SD card)
  5. type : task 28 55aa
  6. press enter
  7. cause DOC reformatted, so there's no rom in DOC, try reflash any rom that you like

Done.

Published in Windows Mobile
  • try other programs to see if they have tray select issue aswell
  • unprotect document if needed
  • setting is in file/page setup

Select top option in this list. This is a dynamic option supplied by the printer (selected in the printer properties, will not change everytime)

  • select print options
  • set default tray to 'use printer settings'
  • protect document again if needed
Published in Microsoft Office
Saturday, 05 May 2012 21:12

Windows Update error 80072F8F

set the clock to correct time
Published in Windows Family
  • goto the command prompt properties via its bar
  • select quick edit
  • now go back and highlight the text you want
  • hit enter
  • you have now copied the text
Published in Windows Family
Saturday, 05 May 2012 20:51

Open and read dbf database files

office 2007 and below are capable of reading these files natively and then the data can be exported or saved in another format.
Published in Data Recovery
Saturday, 05 May 2012 17:07

how to get smtp to work on xampp

in php.ini

disable these lines (please check on default ini file. only sendmail library should be active)

;SMTP = localhost
;smtp_port = 25

enable this line
;sendmail_path = "D:\Documents\websites\design\sendmail\sendmail.exe -t"

in sendmail.ini


(check default ini and update instructions)

the following were set and it works

smtp_server=mail.lancastrian-it.co.uk
 smtp_port=25
default_domain=lancastrian-it.co.uk

error_logfile=error.log
 debug_logfile=debug.log


The following are links to various tutorials on how to setup sending email from xampp which i used for research

 

Published in xampp
Page 68 of 95