I have been programming for a very long time. It is time that I share more of this programming knowledge to the next generation. In this Advanced programming series we are going to be programming real life scenarios. These little pieces of code you will be able to use on your project hopefully for years to come. Additionally, I am going to show you guys how to program with Artificial Intelligence.

#AdvancedProgramming #phpLessons #linux #coding

Programming With AI

There are a lot of people out there that are stubborn and refuse to use AI. However, I think you should take a step back and think about your decision. When electric tools started coming on the scene those that refused to use them were left behind in the graveyard of manual tools. Now, I am with you, I love those old tools but now they are relics on my wall.

The Future of Programming

The future of programming is with AI and that future is now. This is a polarity that is changing everything. So in these advanced programming tutorials I am going to show you how to use AI to help your speed and efficiency. There are however a few things that you need to set up first.

Set Up A Local Server

The first thing that you will need on your computer is a local server. For you Windows and Mac users you can see this post here on testing your XAMPP server. Then come back to this post for the next program to install. For you Linux users the process may be a little more tricky but I am going to guide you though it.

Setting up XAMPP on Linux

Head on over to apache friends and download the version of XAMPP for you Linux Computer. Save the file to your downloads folder. This may take a few minutes so be patient. 

In Terminal

Now open a terminal window and navigate to your downloads folder. remember that everything in Linux is case sensitive. Press  Ctrl + Alt + T to fire up your terminal.

Now enter this to open the Downloads folder in your terminal. 

cd ~/Downloads

We want to make the installer executable so enter this into the terminal. 

chmod +x xampp-linux-x64-*.run

Now lets run the installer.

sudo ./xampp-linux-x64-*.run

You will go through the process of clicking the continue button. Just keep clicking it until it is done. This may take a while depending on the speed of your computer. See the video to see how I did it.

Start XAMPP

Now you want to start XAMPP. You do that by entering this into your terminal. Make sure you save this command you are going to be using it later everytime you want to shart the XAMPP server on your local computer. 

sudo /opt/lampp/lampp start

If you want to access the XAMPP control panel enter this. 

sudo /opt/lampp/manager-linux-x64.run

Verify Installation

Now to verify the installation enter this into the address bar of your favorite browser, I use Chrome. 

http://localhost

Restart XAMPP

If you ever need to restart XAMPP use this.

sudo /opt/lampp/lampp restart

If you ever go Live

If you ever decide to go live from you local machine for some reason, please make sure you set these folder to root permissions.

sudo chown -R root:root /opt/lampp/htdocs
sudo chmod -R 755 /opt/lampp/htdocs

Optional: Create A Shortcut for Future Easy Access

So you may not want to start the terminal up everytime to start XAMPP. Here is what you do.

Create a .desktop file for XAMPP.

sudo nano /usr/share/applications/xampp.desktop

Add this content to that file. 

[Desktop Entry]
Name=XAMPP Control Panel
Comment=Manage XAMPP services
Exec=sudo /opt/lampp/manager-linux-x64.run
Icon=/opt/lampp/htdocs/favicon.ico
Terminal=false
Type=Application
Categories=Development;

Save and close by hitting the ctrl-o keys on your keyboard.

Now, you can search for "XAMPP" in the application menu and launch the control panel directly.

Installing VS Code

OK the full name is Virtual Studio Code and you can download that here at visual studio this is available for all platforms. Mac, Windows and Linux. I know that in the past I told you guys to use Notepad Plus Plus and other editors but in order to get you ready for the real world then you need to use what they use. Of course if you really want to use another editor feel free. 

Testing Your Server

So lets test your server a little further. Make sure when you go to http://localhost that you are seeing the XAMPP start page. You should see a phpMyAdmin button at the top. Click on it to make sure that there are no issues with you creating databases. I ran into some issues when installing it on my Linux Mint and I am going to show you what I did to resolve that.

If you have an issue it is probably a permissions issue within Linux. Since this is not going to a live server where people can access it we will give these folders universal permissions 777. Remember that you NEVER want to do this in a production environment. 

sudo chmod 777 /opt/lampp/temp/

The next issue I encountered is that I could not make any new folders in the htdocs directory. Here is how I took care of that. 

sudo chmod -R 777 /opt/lampp/htdocs

If you still have issues check your error log like this. Enter the error in ChatGPT, Grok or Gemini and they will instruct you how to handle that. 

sudo tail -f /opt/lampp/logs/php_error_log
sudo tail -f /opt/lampp/logs/error_log

Creating your First Test Website

So to make sure that everything is working lets go into our htdocs and create a directory called test. Inside that lets create a file and call it index.php. In that file lets echo the typical "Hello World" in PHP to make sure it is working. 

<?php echo 'Hello World'; ?>

Now if you loaded up your browser to http://localhost/test/ and you see Hello World then you are ready for these lessons. 

Our Next Lesson

Our next lesson is going to be the signup, log in and log out script. We are going to reference this Ajax and PHP lesson during this set up. So if you want to jump ahead and get going on it, feel free. 

Remember to comment below and all Paid Subscribers get all the codes here free. Others who are not subscribed can purchase the scripts. 

Video



Ugly

Shared publicly - 2024-11-23 04:45:35

I am following along, just making sure that you are always going to have these codes here to copy?

Maximus McCullough

Shared publicly - 2024-11-23 05:01:11

Yes, the codes will always be here to copy. I use them myself when I am working on projects.

Sign Up To Comment