Current location: Hot Scripts Forums » Programming Languages » PHP » Session getting unset with every page navigation for wordpress


Session getting unset with every page navigation for wordpress

Reply
  #1 (permalink)  
Old 09-02-08, 08:02 AM
unni123 unni123 is offline
New Member
 
Join Date: Sep 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Session getting unset with every page navigation for wordpress

Hi..im a web developer...i recently had a project in wordpress...it was mini online shop....initially it was done as usual...without any open source platforms....but once the project was about to finish..the client just wanted to create the site in Wordpress ..i was bit worried....since am absolutely a fresher to this platform...since i want to use my existing script..i just thought of going crazy...the wordpress theme n all was done but instead of using the Wordpress plugins...i just tried for a small hack..as i wrotemy script inside the "page.php" file under the Theme/curr_template/ directory....i know its too complicated..but i didnt have much time to learn the Hooks and filters and other featuires of wordpress to create plugins...

Since, this application contains a shopping cart all the cart items was done using session....as it goes to different pages the session should be maintained..but here its not working..once the session is stored in a variable and when goes to the next page the session will be lost...i tried few forums search and some said that they too had the same issue and the solving point was using session_start() in the config.php file..i tried that too..but of no use....i think thats applicable only to those who create the application by following the wordpress rules..using plugins..but ive never used any wordpress functions....there is some issue with register_globals...can someone help me on this issues...as im close to my deadline and need to finish this..really appreciated for all yours help...imsusig session _start() in all my files i have...Waiting for a reply that can help me out...please
Reply With Quote
  #2 (permalink)  
Old 09-02-08, 01:56 PM
woyrz's Avatar
woyrz woyrz is offline
Newbie Coder
 
Join Date: Dec 2003
Location: montreal
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Wordpress manage the session

Do you know that any change in wordpress will be delete every time you upgrade your wordpress.

have a look at this:
http://wordpress.org/support/topic/173577
Reply With Quote
  #3 (permalink)  
Old 09-03-08, 08:03 AM
Firetalk's Avatar
Firetalk Firetalk is offline
New Member
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Post Any help ?

Hi
I Would also like to know an answer for Unni's questions .. are their any Wordpress experts over here

Thanks
Reply With Quote
  #4 (permalink)  
Old 09-03-08, 02:03 PM
Firetalk's Avatar
Firetalk Firetalk is offline
New Member
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Has any one got a way to sort this out
Reply With Quote
  #5 (permalink)  
Old 09-03-08, 02:39 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,515
Thanks: 20
Thanked 109 Times in 106 Posts
I've never done this, I hope my answers are helpful.

Set the session file name or storage path for the two applications differently, using the session.name or session.save_path directives. I recommend a prefix, such as wp for WordPress, and ct for the cart.

http://www.php.net/manual/en/session.configuration.php

Set the name in an Apache configuration file with

Code:
php_value name value
http://www.php.net/manual/en/configuration.changes.php

You will need settings for both applications, a quick test would be to add the lines to .htaccess files.

These are just examples for syntax.

Code:
# WordPress
php_value session.name 'wp_'
Code:
# cart
php_value session.name 'ct_'
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unset Session when Leaving Page sushi4664 PHP 2 06-10-08 11:06 PM
Session on new page? TenFormer PHP 4 03-04-08 11:51 AM
Using session for multipage on single page FeatherStone PHP 3 11-13-07 04:03 PM
Session Security (Continued from post below) nova912 PHP 1 09-05-06 09:29 AM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM


All times are GMT -5. The time now is 07:54 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.