Jump to content

minware

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

minware's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That worked thanks! I copy and pasted sections of code into another file one after the other and tested it after each addition and found near the very bottom, instead of having 2 forward slashes // infront of a comment I had one /, so it thought it was code! Very pleased it's fixed but annoyed there wasn't an easier way to know that! Cheers, Steve
  2. Could you clarify what unhandling means, I've checked through all the if else brackets and loops and they are all in the right place and start andf end properly
  3. Thanks but that didn't bring up anything either I'm afraid. I have no access to php.ini and tried htaccess file but that didn't work
  4. I have quite a lengthy php code that is bringing up the blank screen of death. I've put error_reporting(E_ALL) at the top but nothing. I can't see obvious errors while looking through the code and can't print it here as it's very long and uses a few include files. How else can I see what errors are occuring?
  5. I've found out when it works. I have 2 websites, 1 on maindomain and 1 on subdomain. They share the same pages and php files which are stored in the maindomain directory. If I just have the subdomain's website open the shopping cart doesn't work but if I also have the maindomain's website open I can add items to the shopping cart when in the subdomain's website. The sessions are stored and created in the main domains directory. This helps make things clearer I hope, Steve
  6. Hi me again, it appears the problem isn't solved yet. The shopping cart only works sometimes as it did yesterday when I thought it was solved, but most of the time it doesn't work. Basically my main page index.php is on the subdomain which has product links pointing to an include frame. If nothing is added to the cart (ie $_SESSION['added']==no) the frame includes the welcome page. When customers click on the links the correct product page which is on my maindomain is loaded into the include frame. When customers click on 'add to cart' the main page index.php refreshes and loads the main page index.php again but this time the $_SESSION['added']==yes and it displays the shopping cart page (which is on my maindomain) in the frame window (this is what we achieved above yesterday). But 9 times out of 10 the shopping cart is empty. this is very wierd. Steve
  7. Ok I got it all working with if(isset($_GET['PHPSESSID'])) {session_id($_GET['PHPSESSID']) ;} And the error message has disapeared! Thanks for your help! much appreciated Steve
  8. Ok I have changed the include path from file ../frames.inc to http://wwwmaindomain.com/frames.inc An I can add items to the shopping cart which is great but at the start of my page before I do anything I get Warning: session_start() [function.session-start]: The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/minware/public_html/mwbeads/index.php on line 3 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/minware/public_html/mwbeads/index.php:3) in /home/minware/public_html/mwbeads/index.php on line 3 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/minware/public_html/mwbeads/index.php:3) in /home/minware/public_html/mwbeads/index.php on line 3
  9. That is basically how it's setup. Its wierd, after passing the session varible 'added=yes' I get it by session_id($_GET['PHPSESSID']); session_start(); echo $_SESSION['added']; Then I exit; to just see this variable. And sure enough the page displays 'yes'. But later on in this same page I call the include file ../frames.inc (which is in the root directory) and have the line 'if(isset($_SESSION['added']))' /*if something is added to the cart*/ {display shopping cart} else {display stock pages} But all that displays is the stock pages. Steve
  10. Do I put that before or after the session_start(); on my index.php page that addon.com loads. Neither position works.
  11. Ok I have now tried that by stating (on the add to cart page) $_SESSION['added']="yes"; $PHPSESSID=session_id(); <script type=text/javascript> window.top.location.href =echo'addon.com/?PHPSESSID=$PHPSESSID''; </script> (I tried to get rid of the slash / before ?PHPSESSID but it always gets added when page loads) And when addon.com/ loads it has added ?PHPSESSID=acc2f6a31f1dc319bbe54591d684c685 Which is the session id, but sessions are still not working. My index.php page that addon.com loads contains the line 'if(isset($_SESSION['added']))' /*if something is added to the cart*/ {display shopping cart} else {display stock pages} How can I make the passing of the session id make this work? How do I use that information? Steve
  12. To give more detail, I have a main domain ie main.com and an addon domain (addon.com) that points to a directory 'addon'. All my files are in my main directory except an index.php file in my subdomain directory 'addon' that has include paths pointing to files in my main directory. When I am in addon.com I cannot add items to the shopping cart which uses sessions, although I can if I am in the full path http://main.com/addon/index.php I don't want to display the full path but always have addon.com showing only. I have discovered that there is a problem with using sessions with some kind of url masking. How can I solve this? Thanks, Steve
  13. Hi, I use php sessions but I also need some kind of url masking. My domain name server provides frames based url masking but if I use that sessions don't work. How can I do this? Steve
×
×
  • 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.