How can I customise this article for use with a VPS?

Hello,
I am interested in learning how to make basic scripts, and customise my Podcast generator and WordPress CMS which I installed on my Ubuntu VPS. Since it is a server distro, there are no windows or displays. Everything is done via the terminal. Also, my domain is hosted by the VPS.net registrar, but in order for e-mmail to work, I’d need to install a mail transfer agent and some other things to work with the records.
This article which I read on building PHP scripts assumes that users are using a shared hosting domain with FTP access. Since I am using a VPS, I have full SCP access using Win SCP with any user I create.
Will any of these steps work with Ubuntu 16.04 and PHP 7?
Are there any tutorials on configuring something like Postfix and S-nail? I installed both, but I need help troubleshooting error messages I’ve been getting.
Anyhow, the link to the article I read on SitePoint is: https://www.sitepoint.com/php-mysql-tutorial/
My current web site is http colon slash slash www dot sensation-experience dot com If you add blog or podcasts to the end of the slash, you will be taken to two content management systems that I have installed using the LAMP stack I installed with Ubuntu and Debian Package Manager.
Also, there was a brief line of code to display today’s date using PHP according to the web server. I saved it as today.php. When I went to http://www.sensation-experience.com/today.php, Internet Explorer said http 500 Internal Server Error, whereas Firefox just displayed the address of the site. This makes no sense since WordPress and Podcast Generator is working perfectly. What could be the problem?
If anyone can help me in any way, I would greatly appreciate it.
Thanks!
-Ulysses

Hi sensationexperienceo welcome to the forum

The link to “today” is of little help towards troubleshooting
W3C Validator results

Sorry! This document cannot be checked.
Error
I got the following unexpected response when trying to retrieve <http://www.sensation-experience.com/today.php>:
500 Internal Server Error

Seeing the code that’s in the file might help, but you also have other problems
https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.sensation-experience.com%2F

Error: Bad value sidebar image for attribute id on element img: An ID must not contain whitespace.
From line 29, column 1; to line 29, column 160
ebar</h1><img id="sidebar image" src="images/photo.jpg" width="406" height="179" alt="A photo with the Sensation Experience Logo" title="The SensationExperience Logo" /></div

Maybe that img id should be a class?

Hello,
I have easy access to these HTML documents, and have updated them accordingly. Can you send me the link you used for the HTML 5 validator along with the CSS3 Validator?
Here’s the code for the following two PHP files. They do not work for some reason.

<?php
require "token_gen.php"
echo "a 10 character token: ".generate_token(10).", and a 25 character token, each 5 characters seperated by dashes. ".generate_token(5)."-".generate_token(5)."-".generate_token(5)."-".generate_token(5)."-".generate_token(5).". ";
?>
Token_gen.php
<?php
function generate_token($length)
{
$token = "";
$token_sims = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$token_sims = "abcdefghijklmnopqrstuvwxyz";
$token_sims = "0123456789";
$max = strlen($token_sims)-1;
for ($i=0; $i < $length; $i++)
{
$token = $token_sims[rand(0, $max)];
}
return $token;
}
?>

So it’s not only the today’s date that is not working. It’s also these two scripts. Yet why WordPress and Podcast Generator is working is not yet clear to me.
-Ulysses

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.