Category Archives: PHP MYSQL LINUX DNS

Speed Up MYSQL UPDATE Statements

update statements can tremendously slow down your page load. like when updating view count on profiles of members to get rid of this table locking etc. do this: UPDATE LOW_PRIORITY tablename SET stuff=blabla LIMIT 1

Posted in everyday tips, PHP MYSQL LINUX DNS | Leave a comment

Mysql Query Execution Time Class With Console Logger Using PDO Database

btw, if you are using prepared statements change query to prepare where it says: $result = parent::query($statement); <? error_reporting(E_ALL); ini_set(‘display_errors’, ’1′); db_connect(); function db_connect() { global $pdodb; try { # MySQL with PDO_MYSQL $pdodb = new PDODebug("mysql:host=localhost;dbname=database", ‘username’, "password"); } … Continue reading

Posted in PHP MYSQL LINUX DNS | Leave a comment

Sessions Lost Between Pages And Subdomains On Php

first make a new page with the following content <? echo session_save_path(); ?> if it returns something, create a new page (call it session_starter.php for example) with this content: <? session_save_path(‘/var/www/html/somestuff/phptmp’); $somesessiion = session_name("somesessiion"); session_set_cookie_params(0, ‘/’, ‘.yourdomain.com’); session_start(); header(‘Content-type: text/html; … Continue reading

Posted in PHP MYSQL LINUX DNS | Tagged | Leave a comment

Plesk Upgrade Command Line Linux

launch this command from the command line to upgrade plesk /usr/local/psa/admin/bin/autoinstaller

Posted in linux tips & tricks, PHP MYSQL LINUX DNS | Tagged | Leave a comment

Setcookie Not Working

if you have a setcookie code like this one setcookie(“somecookie”, $somevar, time()+3600000,’/',’.yourdomain.com’); and you can’t figure out why its not saving the cookie the most likely reason is that you are outputting some whitespaces or some characters before the setcookie … Continue reading

Posted in PHP MYSQL LINUX DNS | Tagged , | Leave a comment

Deprecated: Function Eregi() Is Deprecated In /users/_public/phpMyAdmin/libraries/select_lang.lib.php

this is a phpmyadmin error and very simple to fix. just open the libraries/select_lang.lib.php with your favourite editor and delete line 140 to 153. the library is just trying to check for the browser language you are running. if you … Continue reading

Posted in PHP MYSQL LINUX DNS | 3 Comments

Sample SPF Record

v=spf1 a:yourdomain.com/20 ~all add this as an additional TXT record to your DNS zone and you are done. very easy.

Posted in PHP MYSQL LINUX DNS, Technology | Tagged | 1 Comment

Linux Command Get Largest Files

the best and shortest command to find the largest Gigabyte files on your linux system is ls -lhR | grep ‘G ‘ you can also use find / -size +103400k | xargs ls -laAh It might take a while to … Continue reading

Posted in PHP MYSQL LINUX DNS | Tagged , , , | Leave a comment

Webmasters: Get Emails Delivered

This is a bit technical for all non-techies out there. If you send emails through your webserver with PHP don’t use the mail function. It might get delivered into peoples spam folder. To avoid being put in the spam folder … Continue reading

Posted in PHP MYSQL LINUX DNS, Technology | Tagged , , , , , , , , , , , , , , , , | 2 Comments