Cpanel - JWalshe86/nags-with-notions4 GitHub Wiki
To zip NWN4 & not include anything ending with .git
zip -r nags-with-notions4.zip nags-with-notions4 -x '*.git*'
- Click on public_html
- Select & delete all content
- Upload zip file
- Open NWN4 folder
- Select all & move to public_html
Go to NWN
This is the response re getting a terminal

Response re getting git version control

Following this Need to get a SSL cert first. Going to use this Web Host Tutorials vid Using zerossl.com Using this medium article to verify through HTTP file upload.
🎉

🎉


password =
Sunshine7!!
Database passed over to phpmyadmin

Changes to cpanel conn_db.php
<?php
$sname = "localhost";
$uname = "root";
$password = "Sunshine7!!";
$db_name = "ol5wws00_image_db";
$conn = mysqli_connect($sname, $uname, $password, $db_name);
if (!$conn) {
echo "Connection failed!";
exit();
}
password for root changed to = Sunshine7!

Error no longer present for users.php

view.php showing

🎉
Images upload on cpanel

CRUD Working on authorisation
🎉

🐛 Cpanel rendering upload.php on main page instead of index.html

Looks like I'll have to do something like this: Moving site from root
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?$domain.tld$
RewriteCond %{REQUEST_URI} !^/$newfolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /$newfolder/$1
RewriteCond %{HTTP_HOST} ^(www.)?$domain.tld$
RewriteRule ^(/)?$ $newfolder/index.php [L]
</IfModule>
🎉

Using this I could access the xampp version of mysql
cd /opt/lampp
./mysql -u root -p
password is Sunshine7!!
cpanel works again with this - when change password have to re-assign user to db again
<?php
class crud{
public static function conect()
{
try {
$con=new PDO('mysql:localhost=host; dbname=ol5wws00_crudsystem2','ol5wws00_root','Sunshine7!!');
return $con;
} catch (PDOException $error1) {
echo 'Something went wrong, with you conection!'.$error1->getMessage();
}catch (Exception $error2){
echo 'Generic error!'.$error2->getMessage();
}
}
public static function Selectdata()
{
$data=array();
$p=crud::conect()->prepare('SELECT * FROM crudtable');
$p->execute();
$data=$p->fetchAll(PDO::FETCH_ASSOC);
return $data;
}
public static function delete($id)
{
$p=crud::conect()->prepare('DELETE FROM crudtable WHERE id=:id');
$p->bindValue(':id',$id);
$p->execute();
}
public static function userDataPerId($id)
{
$data=array();
$p=crud::conect()->prepare('SELECT * FROM crudtable WHERE id=:id');
$p->bindValue(':id',$id);
$p->execute();
$data=$p->fetch(PDO::FETCH_ASSOC);
return $data;
}
}
Moved images table to crudsystem2 db
