Setting Up Website

Status
Not open for further replies.

Hans Montero

New Member
Messages
4
Reaction score
0
Points
1
Hi everyone,

I have uploaded all the files for the website I coded to the public_html folder and I have created a .htaccess file with the following line in it: DirectoryIndex index.php

However, when I go to my website, it just shows a blank page.

What do I do?
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
You are probably getting an error in regards to your PHP script.
Try temporarily enabling 'display errors' or turning on error logging via the 'select PHP version' section of cPanel (the version that is not basic).
 

Hans Montero

New Member
Messages
4
Reaction score
0
Points
1
Ah I see the error..
It seems I have incorrectly configured PDO in my php code. What exactly should I enter for username and password?

Additionally, I'm having trouble displaying images. What should the image's src be in html if the image I want to reference to is in my public_html folder?
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
It seems I have incorrectly configured PDO in my php code. What exactly should I enter for username and password?
The host has to be 'localhost'. You need to create a MySQL user in cPanel, set up the privileges and hook them up with the database you intend to use.
Additionally, I'm having trouble displaying images. What should the image's src be in html if the image I want to reference to is in my public_html folder?
You can refer to your images by doing something like '/images/this/is/an/example.png' (the more direct way) or by doing 'images/this/is/an/example.png' (if the 'images' directory is in the same directory as the page you are requesting).
 
Last edited:
Status
Not open for further replies.
Top