receiving error on admin page "session start()"

A

Anonymous

Guest
good day to all,

http://philgreek.atwebpages.com/admin/

On the localhost the index.php works fine but when I upload this to my web hosting I received the below error.

When I try to login using my user and password It says "Invalid username and password@

error: srv/disk7/3956428/www/philgreek.atwebpages.com/admin/index.php on line 3

index.php
<!DOCTYPE html>
<?php
session_start(); // ------- Line 3
if(ISSET($_SESSION['admin_id'])){
header('location: home.php');
}
?>

I attached the home.php , account.php and validator.php as zip file
BTW my hosting is only free hosting and the codes are not mine...

thanks
 

Attachments

  • account.zip
    1.5 KB · Views: 136
This line
Code:
session_start(); // ------- Line 3

should be at the top of the page :

Code:
<?php
session_start(); // ------- Line 3
?>
<!DOCTYPE html>
 
Based on the error message you provided and the code snippet you shared, there seems to be a problem with the file paths in your web hosting environment. This error indicates that the index.php file at the specified path cannot be found or accessed. When moving a website from localhost to a web hosting environment, you need to ensure that the file paths are configured correctly to match the file structure on the server. If the problem continues consider changing your hosting provider. I think you are using shared or VPS hosting. If you are using these two type of hosting you should change it to Managed Hosting which works best because all the technical work is done by the provider.
 
Back
Top