Jump to content

Session Problem


greatchap

Recommended Posts

Hi Guys,

 

I am developer and relatively new to php although I have written a few scripts. I have a site which runs on linux/unix platform.

 

I am facing a weird problem:

 

- I have a php script (e.g. site.com/test/test.php) which takes a input from url, and creates a session and opens a wordpress php in another folder (e.g. site.com/wp/index.php)

- I wrote a small php code in that wp/index.php which checks if session exists or not. if yes, then no problem, if not then die and show a message.

 

Now the problem is when I run the script, it opens the wp/index.php and the page opens. Good. But when I click on any link in that page e.g about or so, then I get message which I wrote that session not found and so on...

 

I don't know why this is happening.

 

So if you guys can help me with this it would be great. Alternatively, I thought if I protect the wp folder (using protect folder thru cpanel) and write a php script outside which call the php inside the wp folder with a hardcoded uname & pw, then i can run the php inside without anyone knowing what the actual uname or pw is. This way if a user directly tries to access it , he wont be able to do so as uname & password box will appear.

 

But I dunno how to call a php inside protected folder. I tried to redirect but the uname & pw box appeared.

 

I would be grateful if anyone can help me.

 

Thanks a lot,

 

Cheers,

GR

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.