MySQL vs MySQLi vs PDO

For PHP5;

  • mysql: Deprecated

For PHP7:

  • mysql: N/A
  • mysqli: Deprecated
Advertisements

Remove Powered by PhpList

WORKS FOR PHPLIST VERSION 3.3.1

Go to config/config.php Credits section: Change values 0 to 1.

This will convert powered by image to text.

 

Go to admin/connect.php

Change $PoweredByText = ”;

Get User IP using PHP

 $client  = $_SERVER['HTTP_CLIENT_IP'];
 $forward = $_SERVER['HTTP_X_FORWARDED_FOR'];
 $remote  = $_SERVER['REMOTE_ADDR'];

What is the difference between HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR? – it is impossible to say. Different proxies may implement these, or may not. The implementations may vary from one proxy to the next, and they may not. A lack of a standard breeds question marks.
If more than one proxy was involved – the X-Forwarded-For: header might then contain a complete track of the forwarding chain, whereas the Client-IP: header would contain the actual client IP. This is pure speculation, however.

ezSQL Functions and Variables

ez_sql

ez_sql help

Functions:

  1. $db->get_results
  2. $db->get_row
  3. $db->get_col
  4. $db->get_var
  5. $db->query
  6. $db->debug
  7. $db->vardump
  8. $db->select
  9. $db->get_col_info
  10. $db->hide_errors
  11. $db->show_errors
  12. $db->escape (mysql_real_escape_string – mysqli_real_escape_string)
  13. $db = new db

Variables:

  • $db->num_rows
  • $db->insert_id
  • $db->rows_affected
  • $db->num_queries
  • $db->debug_all
  • $db->cache_dir
  • $db->cache_queries
  • $db->cache_inserts
  • $db->use_disk_cache
  • $db->cache_timeout

Squirrelmail Turkish Support Fix

functions/i18n.php
$languages[‘tr_TR’][‘NAME’] = ‘Turkish’;
$languages[‘tr_TR’][‘CHARSET’] = ‘utf-8’;
$languages[‘tr_TR’][‘LOCALE’] = array(‘tr_TR.utf-8′,’tr_TR.utf-8′,’tr_TR’);
$languages[‘tr’][‘ALIAS’] = ‘tr_TR’;

Download and upload tr_TR localization files to locale folder.

config/config.php
$squirrelmail_default_language = ‘en_US‘;
Change en_US to tr_TR
Change $default_charset = ‘iso-8859-1‘; to 8859-9