Skip to content

Phils Blog and Stuff

TELECOMS. VIRTUALIZATION. IT. CODING. and more…

Menu
  • Home
  • Resources
    • Subnet Mask Cheat Sheet
    • Easy Dmarc+Email
    • MX Tool Box
    • LOAD BALANCING & SRE
  • SHOP
  • SOLUTIONS
  • SERVICES
  • Contact Me
Menu

PHP… Simple Error Checking…

Posted on 07/12/201208/03/2023 by Phil

The below code is an example of providing some debug information by both email and logging the information to a file in “/var/logs/”. define(“CURRENT_FILE”, “thisfile.php”); define(“LOG_FILE_LOCATION”, “/var/log/”); function log_file($error1, $error2, $file) { $ok = true; // $file = “logile.txt”; if ($fh = fopen($file, ‘a’)) { $ok = true; $conf = “$error1 – $error2\n”; } else…

Read more

PHP… Do Not Run if running…

Posted on 07/12/201208/03/2023 by Phil

If you are creating an application that will be run in the terminal on a Linux machine and you don’t want it to run if its already running you can use the same code below to achieve this. class pid { protected $filename; public $already_running = false; function __construct($directory) { $this->filename = $directory . ‘/’ . basename($_SERVER[‘PHP_SELF’]) . ‘.pid’;…

Read more

Asterisk auto-dial out…

Posted on 05/12/201208/03/2023 by Phil

Asterisk call files are structured files which, when moved to the appropriate directory, are able to automatically place calls using Asterisk. Call files are a great way place calls automatically without using more complex Asterisk features like the AGI, AMI, and dialplan, and require very little technical knowledge to use. The Asterisk dial plan extensions.conf responds to someone…

Read more

Reverse SSH Proxy…

Posted on 05/12/201208/03/2023 by Phil

In this guide i have going to talk about how to set up a SSH Reverse proxy. What is a Reverse SSH Proxy. An SSH Reverse Proxy, is where you have a server behind a firewall that you want to access with out the need for port forwarding on routers and firewall. you simply tell…

Read more

MySQL: How do you set up master-slave replication in MySQL? (CentOS, RHEL, Fedora)…

Posted on 16/11/201208/03/2023 by Phil

Before we go into how to set up master-slave replication in MySQL, let us talk about some of the reasons I have set up master-slave replication using MySQL. 1) Offload some of the queries from one server to another and spread the load: One of the biggest advantages to have master-slave set up in MySQL…

Read more

Domain Redirection using Apache mod_rewrite and .htaccess

Posted on 15/11/201208/03/2023 by Phil

I recently acquired some domains and finally got around to adding them to my server. Instead of them being their own sites (well, point to my primary site, but the URL in the browser address bar is taken over by the new domain name), I wanted them to redirect to my primary domain (phillipcooper.co.uk). If…

Read more

m0n0wall 1.34 released

Posted on 14/11/201208/03/2023 by Phil

There are ready-made binary images for embedded computers from Soekris Engineering and PC Engines, a CF/IDE HD image for most standard PCs (other embedded ones may work, too) with either keyboard/monitor or serial console, a CD-ROM (ISO) image for standard PCs, a VMware image, as well as a tarball of the root filesystem. Refer to…

Read more

Some Simple PHP code..

Posted on 14/11/201208/03/2023 by Phil

Below i am going to list some simple PHP code that makes up most of a PHP coded page. If..Elseif…Else… statments $something = “Cat”; if ($something==”Cat”) { print “Cat\n”; } elseif ($something==”Dog”) { print “Dog\n”; } else { print “Dont know\n”; Explode…foreach $ex = “cat:dog:mouse:goose”; $explode = explode(“:”, $ex); foreach ($explode as $exploded) { print…

Read more

Manually Configuring a Multicast Paging Ring Group to work with Yealink T20, T22, T26, T28, T32, T38

Posted on 27/10/201208/03/2023 by Phil

Be aware that different firmware versions may have different web interface formats and functionality. For further support, please visit Yealink here From 3CX Phone System Ring groups can be used to facilitate multicast paging. Note that 3CX Phone System facilitates multicast paging along the address range: 224.0.0.0 – 224.0.0.255 and port range which is not already…

Read more

Cat Linux Command

Posted on 23/10/201208/03/2023 by Phil

The cat Linux command is used to display file contents, for example if I quickly wanted to see the contents of a text file I would use the cat command to dump the output to the console or pipe it to another command. Situations when the cat Linux command would used How To dump the…

Read more

Posts pagination

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 18
  • Next

POSTS

  • Home Assistant. Add water meter with PHP+MQTT+YML.
  • Automating your home with Home Assistant. Initial install and config (Hyper-V).
  • The importance of setting up email security correctly.
  • Automate Debian installations with Seed, DHCP and Nginx.
  • A simple link shortener.. Fun little project…

WORD CLOUD

3CX 3CX Phone System Apache Asterisk Cacti CentOS CRM DHCP DNS Email Fail over Failover File System Firewall FreeBSD FreeNAS FXO IAX install IP IP PBX Linux M0n0wall Nottingham Open Source PBX PFSense PHP Router Server SIP snom SSH TrixBox ubuntu VLAN Voice VoIP VPN vyatta WAN Website WiFi yealink ZFS

© 2025 Phils Blog and Stuff | Powered by Superbs Personal Blog theme