Comprehending Being Sued for Online Postings (e.g., Frivolous Libel Lawsuits)

Worried about being sued for something you posted online?  You may need to educate yourself about the risks.

American citizens may want to understand the context of online defamation by buying Be Careful Who You SLAPP by Delfino and Day.  To learn about strategic lawsuits designed to silence people in the USA, there is no better book than SLAPPs: Being Sued for Speaking Out by Rock Pring.  

How Do You Write a Backend PHP Script to Query Postgres and Create a Database Name “foobar”?

Problem scenario
You are running Ubuntu Linux, and you want to create a .php script to be ran at the command prompt like this:

php good.php

You want this to open a PosgreSQL connection and issue a DDL command to create a database.  This is not a PHP web page.

Solution
This solution is only slightly more complicated than using PHP to run a basic SQL query in a Postgres database.

​How Can PHP Accept Data from a Form and Assign It to Variables for Future Retrieval?

Problem scenario
You want a web page to request user input.  After the user clicks “Submit” you want the values to be assigned to variables for future usage (e.g., an algorithm could retrieve the values to manipulate them).  How do you use PHP to assign input from a web page to be variables on the back end?

Solution
You need two files.  

How Do You Troubleshoot the PHP Error “role is not permitted to log in” So Your Script Can Log into a Postgres Database?

Problem scenario
You are trying to use a .php script on the back end to connect to your PostgreSQL database.  However, you get an error like this when you try to run it:

‘PHP Warning:  pg_connect(): Unable to connect to PostgreSQL server: FATAL:  role  “funuser” is not permitted to log in in /tmp/d.php on line 7’

How can your .php script log into the Postgres database?

How Do You Troubleshoot a PHP Error “call to undefined function pg_connect()” So Your Script Can Log into a Postgres Database?

Problem scenario
You are trying to use a .php script on the back end to connect to your PostgreSQL database.  However, you get an error like this when you try to run it:  ‘PHP Fatal error:  Call to undefined function pg_connect() in ‘

Solution
Install php5-pgsql.  For Ubuntu you would run a command like this:  sudo apt-get install php5-pgsql

How Do You Install LAPP Using Ubuntu Linux?

Update October 2020: These were tested to work with Ubuntu 20.x.

Problem scenario
You want to install the four core components that compose the LAPP stack. That is you want to install Apache, Postgres and PHP on Ubuntu Linux (which comes with Perl pre-installed).  How do you do this?

Solution
1.  Install Ubuntu.  If you need directions, see this link.

How Do You Install Apache Web Server on Your Ubuntu Server when You Receive an Error about “no installation candidate”?

Problem scenario
You tried this command: sudo apt-get install httpd
But you got this error message as a result:

“…E: Package ‘httpd’ has no installation candidate”

You tried this command as root:  

apt-get install apache2-bin 2.4.7-1ubuntu4.13

But you get this error message as a result:

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package 2.4.7-1ubuntu4.13
E: Couldn’t find any package by regex ‘2.4.7-1ubuntu4.13’

How do you install Apache web server on your Ubuntu server?

How Can Web Browsing Be Sped up (or Quickened) When Using Windows 7?

Problem scenario: The Internet seems sluggish and unreliable when using Firefox on Windows 7.  You Internet speed is medium slow, and your laptop has decent hardware specifications by 2017 standards.  What can you do?

Solution:  Use Chrome.  You can download it here.

Our research and investigation has confirmed that Chrome will be faster.  There are other reasons besides speed for choosing different web browsers.