OK php nerds...

EdFred

Taxi to Parking
Joined
Feb 25, 2005
Messages
30,651
Location
Michigan
Display Name

Display name:
White Chocolate
Here's my problem (well, one of many)
pertient info
page1.php
PHP:
<?php
session_start();

lots of code

$_SESSION['zfile'] = $xufil;
echo $_SESSION['zfile']." test to see session variable works";

?>
Yes, it works, and provides me with the string that was $xufil

click a link which takes me to page2.php

PHP:
<?php
session_start();
echo $_SESSION['zfile']." test to see session variable works";
?>

Nope. Doesn't work. Blank.

Thoughts?

php.ini doesn't seem to show anything preventing it from working under the sessions header
 
Ed -- create a file with

<?php phpinfo(); ?>

E-mail me the output to

jesse

(AT)

angelldevelopment

(DOTCOM)
 
Link sent. Check spam folder, I always end up there for some reason.
 
Try printing $_REQUEST('SESSION_NAME') in both functions to assure you are indeed in the same session.
 
Someone just disembowel me...

[FONT=&quot]session.save_path = "C:\Temp"[/FONT][FONT=&quot][/FONT]

Guess what happens when there is no "C:\Temp" directory....


Yeah, that.
 
Someone just disembowel me...

[FONT=&quot]session.save_path = "C:\Temp"[/FONT][FONT=&quot][/FONT]

Guess what happens when there is no "C:\Temp" directory....


Yeah, that.

Why the hell are you running PHP on a Windows box? Why are you running anything on a Windows box?
 
Hardcoding C:\TEMP is fraught with peril on WINDOWS. There's no guarantee that's the temp directory or even that C: exists. Unfortunately, most people have their test systems set up that way so you don't find the problem right away.

In php you're supposed to use sys_get_temp_dir() to find the temp directory.
 
Why the hell are you running PHP on a Windows box? Why are you running anything on a Windows box?

Amount I know about non-windows systems: 0

The last time I touched anything non-windows was almost 20 years ago, and that was because we were still running DOS. I've only used *nix once, and that was only to get into a program, and I couldn't tell you a single commend string.
 
Hardcoding C:\TEMP is fraught with peril on WINDOWS. There's no guarantee that's the temp directory or even that C: exists. Unfortunately, most people have their test systems set up that way so you don't find the problem right away.

In php you're supposed to use sys_get_temp_dir() to find the temp directory.

Yeah, I've already redirected the sessions directory, and restarting the system. Just have to reboot.
 
If it's good enough to run AOPA's php based forums, it's good enough for Ed. :rofl:

I don't need anything robust. I run an exchange server, host a very basic website, with some simple php and that's pretty much it. Plus, I really don't feel like hiring someone to teach me *nix which I have no desire to learn.
 
Back
Top