Sinisterly
NEED HELP? PHP works on Localhost but not on Server/Cpanel - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: PHP (https://sinister.ly/Forum-PHP)
+--- Thread: NEED HELP? PHP works on Localhost but not on Server/Cpanel (/Thread-NEED-HELP-PHP-works-on-Localhost-but-not-on-Server-Cpanel)



NEED HELP? PHP works on Localhost but not on Server/Cpanel - syr1u6 - 03-31-2024

I have been battling with this the Code for days now and i am stuck. i host the PHP files on my localhost and it works very perfectly but once uploaded on a Server/Cpanel i just get errors, i have tried editing and editing the code and all but it never redirects to what i want.

Please someone help me.

It starts with a Login PAGE (INDEX.PHP) and should pass through another page (LOGAUTH.PHP) and automatically redirects you to (PG.php)

But once i put the username details on the INDEX.php and click Next … it shows me this error from LOGAUTH.php

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/html/hszgroup.com/www.hszgroup.com/upload/attachment//fedhs/logauth.php:6) in /home/httpd/html/hszgroup.com/www.hszgroup.com/upload/attachment/fedhs/logauth.php on line 8

LINE 8 IS BELOW:

:if(preg_match("/[a-z0-9.%±]+@[a-z0-9.-]+.[a-z]{2,}$/",strtolower($email)) || preg_match("/[0-9]{6,15}$/",$email) || preg_match("/[a-zA-Z][a-zA-Z0-9.-_]{5,31}/",$email)){$_SESSION[‘email’] = $email;header(‘location:pg’);}


RE: NEED HELP? PHP works on Localhost but not on Server/Cpanel - annanickles - 10-31-2024

I also have the same issue. Did you find any solution?