0

After reading other similar question this is what I understand. I can set my own session_save_path() but i am on a shared host and can't set the save path above public_html. For session_start() headers alredy sent there is nothing else above my session_start() statement. The second warning says output started at 2 lines of index.php that is exactly where I have set session_start().

Here is the exact error i am getting

Warning: session_start(): open(/home/users/web/b2659/ipg.apnasikkacom/cgi-bin/tmp/sess_d48d5bfff4fc5df81ab868122feec5e3, O_RDWR) failed: No such file or directory (2) in /hermes/bosnaweb04a/b2659/ipg.apnasikkacom/8mags/bored/people/index.php on line 2 
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /hermes/bosnaweb04a/b2659/ipg.apnasikkacom/8mags/bored/people/index.php:2) in /hermes/bosnaweb04a/b2659/ipg.apnasikkacom/8mags/bored/people/index.php on line 2 
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hermes/bosnaweb04a/b2659/ipg.apnasikkacom/8mags/bored/people/index.php:2) in /hermes/bosnaweb04a/b2659/ipg.apnasikkacom/8mags/bored/people/index.php on line 2 

I have put session_start() at the top of my PHP file. Here is the code

<?php
session_start();
$mysqli = new mysqli($db_hostname,$db_username,$db_password,$db_database);

and other PHP code. I am using some PHP templates like this

<?php include_once("../../templates/socialtemplate.php")?>

but all these includes are after the first section of session_start() code.

Nitish Kumar
  • 163
  • 1
  • 8

0 Answers0