session / cookie doesnt work

sayfanet

New member
Joined
Jun 12, 2007
Messages
4
As i am a php programmer, i have never been faced a problem like that.

On freshly installed directadmin server, no cookie or session command is working.

check that: www.dalyanberay.com/deneme1.php

deneme1.php the code:
<?
setcookie("username", "selam", time()+3600, '/', '.dalyanberay.com');
setcookie("merhaba","selam");
$_SESSION['deneme'] = "geldi";
echo $_SESSION['deneme'];
print_r($_COOKIE);
?>

(session prints only for this page. not on another page)


deneme2.php the code:
<?
echo $_COOKIE['username'];
echo $_SESSION['deneme'];
echo $_SESSION['merhaba'];
print_r($_COOKIE);

?>


I couldn't find anything on the web related to this issue. Can you help me?
 
This sounds like a php problem not a directadmin problem. Directadmin is just the control panel and has nothing to do with your code. You would probably be better off asking your question on a php forum.
 
This sounds like a php problem not a directadmin problem. Directadmin is just the control panel and has nothing to do with your code. You would probably be better off asking your question on a php forum.

When you format the server and install only directadmin on it, you would expect that directadmin should handle all stuff.

That is part of it and not working.
 
When you format the server and install only directadmin on it, you would expect that directadmin should handle all stuff.

There is more to setting up a server than simply running the DA install script. I generally have to spend another 30-60 minutes after the DA install setting up stuff on a new server before it is ready.

I am not a php programmer and neither are a lot of people here. But that is why I suggested asking this on a php forum since somebody there may be able to tell you exactly why its not working.

If you need more immediate support and you still think its the responsibility of DA then email DA support directly about the problem. Somebody may be able to help you here but don't just sit around waiting for a response here. Post the question on some php forums and email support.

I am not saying the question was not appropriate for this forum. I am just suggesting doing something else to get your answer faster.
 
it has been fixed with:

cd /usr/local/directadmin/custombuild
./build rewrite_confs


have a nice day
 
since sessions are stored in /tmp directory or the path been specified in the php.ini so could be that webserver didn't have enough rights to create the temporary session file on the server.

As far as cookies are concerned, they are stored on the browser that has nothing to with the web server.

Good to know that the issue is been resolved, but would still be good to find out the exact reason why?
 
Back
Top