This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Linux find command is a very useful and handy command to search for files from the command line. It can be used to search for files based on various criterias like permissions, user ownership, modification date/time, size etc. In this post we shall learn to use the find command along with various options that it supports. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- | |
Documented at | |
http://linux.die.net/man/5/fonts-conf | |
To check font mapping run the command at terminal | |
$ fc-match 'helvetica Neue' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a.php --- | |
$a = shell_exec('php-cgi /var/www/test.php'); | |
echo $a; | |
test.php --- | |
echo "Hello World"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This will generate the data mart for following report/tables | |
1. report1 - grouped by referring_domain , landing_domain , campaign , source , click_date | |
*/ | |
-- Create a temporary table to hold zip counts | |
create temporary table r_zip_cnt | |
( | |
click_id mediumint unsigned , | |
cnt smallint unsigned , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This will generate the data mart for following report/tables | |
1. report1 - grouped by referring_domain , landing_domain , campaign , source , click_date | |
*/ | |
-- Create a temporary table to hold zip counts | |
create temporary table r_zip_cnt | |
( | |
click_id mediumint unsigned , | |
cnt smallint unsigned , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
c.referring_domain , SUM(zs.cnt) as zip_searches , | |
Count(c.click_id) as visits , | |
SUM(ds.conv) as conversions , | |
SUM(ds.conv_value) as conv_value | |
from clicks c | |
left join | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(12:39:24 IST) silv3r_m00n: if error_reporting is set to 0 , will 'log_errors' directive log anything or not ? | |
(12:41:44 IST) renic: TAS | |
(12:42:03 IST) GoogleGuy: silv3r_m00n, Of course not. | |
(12:42:35 IST) silv3r_m00n: renic: yes did , saw that if error_reporting = 0 then no error logging | |
(12:43:05 IST) GoogleGuy: silv3r_m00n, The error_reporting directive tells PHP's error handler what level of errors to report. If you tell it to report no errors at all it won't. Thus there will be nothing to log since it's not reporting any errors. | |
(12:43:24 IST) silv3r_m00n: GoogleGuy: read at few places "turn off error reporting on production , but log them to a file" so got confused , how to log without reporting | |
(12:44:09 IST) GoogleGuy: silv3r_m00n, They might be talking about display_errors. display_errors isn't error_reporting it's just whether or not PHP's error handler sends the error messages to STDOUT. | |
(12:44:21 IST) GoogleGuy: That's a separate directive that you should turn off in production of course. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('log_errors' , true); | |
ini_set('error_log' , '/var/www/php_error.txt'); | |
ini_set('display_errors' , 0); | |
error_reporting(0); | |
mango(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ini_set('log_errors' , true); | |
ini_set('error_log' , '/var/www/php_error.txt'); | |
ini_set('display_errors' , '0'); | |
error_reporting( 0 ); //No php_error.txt created | |
error_reporting( E_ALL ); //php_error.txt created and works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
error_reporting(E_ALL); | |
$m = "<p>This is my tertiary message.</p>\n"; | |
?> | |
<?=$m?> | |
<?xml version="1.0" encoding="utf-8"?> |
NewerOlder