0

In my efforts within Hostinger, I'm working on getting a PHP website published. The testing phase with a basic "index.php" file featuring a simple "coming soon" page went smoothly. Strangely, though, once I uploaded the entire website, it stopped functioning as expected. The core "index.php" file of the site includes PHP code that links to a template page housing the HTML content, achieved through the line: require('public-templates/t_index.php');

Upon directing to myDomain.com, a blank white page greets me. Investigation using the browser's developer tools uncovers an absence of content. I don’t know actually if the problem is with the file requiring or not.

Despite making contact with Hostinger's customer service, their attempts to assist haven't resolved the issue. Might you be able to offer some guidance in addressing this situation? As a troubleshooting step, I've enabled error logs, but strangely, no error messages are appearing.

  • Do you actually have a directory called `public-templates` that contains a file called `t_index.php`? – Tim Roberts Aug 04 '23 at 05:05
  • Yes I have. I even tried to take it out of the folder and to change the path in the require line but nothing changed – abdallah abouelatta Aug 04 '23 at 05:16
  • "*a blank white page greets me*" - Please enable [error reporting](https://stackoverflow.com/questions/1053424/how-do-i-get-php-errors-to-display) and provide us with the correct error(s) – DarkBee Aug 04 '23 at 06:51

1 Answers1

-1
  1. So you're doing myDomain.com to visit your site, sometimes what
    happens is while uploading it uploads as foldername and inside files, so maybe try myDomain.com/foldername/index.php

  2. if your index.php file is directly inside Public_html then I would advice to check the permissions such as if it is in 775 or755.

  3. Also make sure you are giving correct database details in your config file with respect to the Hostinger database.

andy
  • 1
  • 1
  • Actually, I tried those there points and nothing changed. – abdallah abouelatta Aug 04 '23 at 05:19
  • Try to host in another hosting provider for testing, "infinityfree" is a free hosting provider for php, if your site loads successfully there, then it must be issue with Hositnger. (Note this is not a Promotion, i have no association with infinityfree, i only use it to test sites there) – andy Aug 04 '23 at 05:25