How to install and run phpAdsNew

 

 How to install and run phpAdsNew


Today, we are going to walk you through the process of installing and running phpAdsNew.php, a script that shows you how to create your own videos. This script is available on this website for download. This installation is intended for newbies who have never used php before, so be sure to follow along with this tutorial!


**A note from our editor: As always, I recommend having Apache installed and functioning on your computer before downloading any software.**



I'm going to start by logging into my hosting account and uploading a copy of the WordPress installation file onto my server in "etc". I'll do this from the File Manager, using FileZilla. Once the file is finished uploading, I'll click "Edit", and then "Upload".


Next, I'll go to my cpanel and navigate to the root directory of my hosting account. Once there, I'll create a folder called "phpadsnew".


Within this folder I'm going to create another folder called "uploads" so that we have a place to store phpAdsNew's javascript files.


I will then log into my FTP client (FileZilla) and upload all of the files associated with phpAdsNew into my newly created directory.


Now that all of the files are uploaded onto my server, I'll click "FileZilla" again, and then navigate to the "uploads" directory that I just created. From here, I will click on "phpAdsNew.php". This will bring up the installation page in my browser.


I'm going to click "Install", and then hit "Next". When asked if I want to create a new file within my root directory called "index.php", I'll say yes. This will create a file called index.php, which is where our phpAdsNew script will reside once we've finished installing it on our server.


I'm going to click "Next" again, and then "Install Plugin". I'll click to replace the entire file.


Now, I'll go back to my root directory of my hosting account (the one with all of the subfolders) and navigate to the folder named "uploads". There will be a file here called index.php. I'm going to click and drag this into my root directory as an overwrite. Once it is finished overwriting, you can close down FileZilla.


Now, we need to configure Apache so that it can respond to requests from phpAdsNew.php and show the correct videos on our website. Before we do this, however, I would like to go ahead and create a folder name "vids" somewhere in my root directory of my hosting account. This is where we will be storing our videos once they are created by phpAdsNew. This is why this folder's name is very important; it is the only part of the directory structure that you are allowed to call anything other than a "folder".


I'm going to go into my "vds" (virtual host) folder, then create a subfolder named "controller". Within this folder, I'll create another subfolder named "scripts". I'll create the file phpAdsNew.php within the scripts directory. This script will be the one that handles all of the videos that we will be uploading to our website.


Within my "vds" folder, I should now have a file called index-php.php. I'm going to rename this to "index.php" so that it makes sense for Apache to analyze it and serve the correct files on our website.


Now that we've configured Apache to handle our videos, we need to create some directories within our root directory of our hosting account so we can store videos there. I'll create a folder named "vids" within my root directory, then another called "upload".


Unfortunately, when installing phpAdsNew onto your server, you cannot choose where in the filesystem or what folders/files will be created for you; this is due to PHP's limitations with configuration files (see Install phpAdsNew in Debian/Ubuntu). This means that you may have some trouble if the necessary folders and files are not in the correct locations. As long as you have followed the steps above, however, all of the folders and files will be in the right place for you; they will just be at different levels than what is intended.


Now, I'm going to use FileZilla again to upload a sample video file into our "uploads" folder. I'll do this by clicking on "phpAdsNew.php", then going into my "vids" directory that I created. From there, I'll click on "Video 1_sample".


Now that the video is uploaded, I'll go back to my root directory and navigate to the one with all of the subfolders. I'll then navigate into the "upload" directory that we created, and finally into the "video_1_sample".


Now, this is where you are going to need to be very careful and follow every single step in order to make sure that phpAdsNew is working correctly. If you are not careful, it will not work; follow this guide step by step!


In your "phpAdsNew.php" script, you are going to need to change the line that says "File("video_1_sample.mp4")" to say " Folder("video_1_sample")". You will also need to make sure that your "$smallestVideoSizeLimit" variable is set to be the same value as what I set for my "vids" directory. Once you have your "vids" directory setup exactly as I set it up here, you'll be ready to move on!


Now, go back into your root directory and all the way into folder named "vids". Here, we will create a new file called index.php. This file will handle all of the relevant data that phpAdsNew needs to know in order to function correctly.


I'm going to save my new index.php file as "index-php.php". This will allow me to edit the file in a text editor and make any changes that I need without needing to know where it is located on my server. I'll then go into FileZilla and upload the file so that it changes its name from index-php.php back to index.

Conclusion

If you followed all of these steps correctly, your phpAdsNew installation should now be ready to download videos from popular video hosting websites and automatically place them into your designated "vids" directory on your server. If this is the case, congratulations! Now that all of the hard parts are done, you can take advantage of all the functionality that this script provides.


You probably noticed two things while going through all of these steps: 1) It was a lot to do; and 2) You have no idea where any of those folders and files are on your server even though I told you to remember their locations.

Post a Comment

Previous Post Next Post