-
My code Not Working On Hosting Server
over 9 years ago
-
over 9 years ago
Hi, Thank You @narendra.arora and @sukhminder.kaur. Finally Found the Problem. I changed 404 error page as index.php. Chrome is automatically requesting favicon.ico. But it's not in server. Therefore it responded with body of index.php. That is affected session....
-
over 9 years ago
Hi, If you moved the code from WAMP (windows) to a hosting server (Cpanel) I assume the basic problem that we see in this case is the file permissions. Please set the file permissions to 0644 and then try to execute the page again.
If it still does not work please look into the error logs and post the messages you get.
Hope this helps.
-
-
over 9 years ago
Hi Sukhminder, session_autostart is off session.save_path is c:\php55\sessiondata
If i did like this it's working. But it's not working above mentioned code
aaa.php:
<?php session_start(); $_SESSION['name']="Puvipavan"; header(location:bbb.php); ?>
bbb.php:
<?php session_start(); echo $_SESSION['name']; ?>
-
-
over 9 years ago
Hi
Can you check the session settings in your php.ini files. As you are using sessions, the values need to be defined correctly in php.ini file. You can look for session_autostart which should be set to 0 and also the path where the session variables will be stored. You should have permissions to write to that folder.
-
-
over 9 years ago
-
-
over 9 years ago
Hi,
It would really help us to sort your problem if you could post the output on error logs when you execute the code.
Thanks
-
6 Answer(s)