|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-03-25 10:27 UTC] kur at natur dot cuni dot cz
When calling function session_start() in 4.1.2 version, it creates new empty file in session.save_path. In version 4.1.1 it was OK, after installing new version this does not work, even if php.ini is the same. print_r($_SESSION) gets empty array. I have register_globals off and using only $_SESSION, $_GET, .... vars my php.ini: session.save_handler = files session.save_path = c:\program files\php\tmp session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = burcin.natur.cuni.cz session.serialize_handler = php session.gc_probability = 1 session.gc_maxlifetime = 1440 session.referer_check = session.entropy_length = 0 session.entropy_file = session.cache_limiter = nocache session.cache_expire = 0 session.use_trans_sid = 1 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 07:00:01 2025 UTC |
Windows XP Professional Service Pack 2, v.2096 (build 2600) Internet Explorer 6 Php triad Php 4.1.1 Apache 1.3.23 I have changed the php.ini file in my default folder C:\apache\php i.e., SMTP = smtp.cc.iitk.ac.in (my mail server in iitk,india) & sendmail_from = shivamv@iitk.ac.in (my e-mail id) The code i am using is simple <?php mail('shivam.honey','Hi','Hello'); ?> Everything seems to be fine but i am getting an error --> Warning: Server Error in c:\apache\htdocs\experiment\e-mail.php on line 2 where, as i am able to send mails from my outlook account using the same mail server. Please Help!!! me out. Please!!!!!!!!!!!!!!!!!Windows XP Professional Service Pack 2, v.2096 (build 2600) Internet Explorer 6 Php triad Php 4.1.1 Apache 1.3.23 I have changed the php.ini file in my default folder C:\apache\php i.e., SMTP = smtp.cc.iitk.ac.in (my mail server in iitk,india) & sendmail_from = shivamv@iitk.ac.in (my e-mail id) The code i am using is simple <?php mail('shivam.honey','Hi','Hello'); ?> Everything seems to be fine but i am getting an error --> Warning: Server Error in c:\apache\htdocs\experiment\e-mail.php on line 2 where, as i am able to send mails from my outlook account using the same mail server. Please someone listen i got some serious problem,i gotta show it to someone!!! Please reply me at shivam.honey@gmail.comHi Every one. My name is shivam. Thanks for the suggestion i tried it and now its not giving me any error just simply printing mail sent successfully But i m "NOT" getting the mail delivered to the recipient account my new php.ini mail setting are [mail function] SMTP = smtp.cc.iitk.ac.in sendmail_from = shivamv@iitk.ac.in ; For Unix only. You may supply arguments as well (default: 'sendmail -t -i'). sendmail_path = /usr/local/sbin/sendmail -t -i and my code is <?php if(mail('shivam.honey@gmail.com', 'xxx', 'yyy')) { echo('<p>Mail sent successfully.</p>'); } else { echo('<p>Mail could not be sent.</p>'); } ?> Now i m just wondering if 1. my mail settings are not correct or 2. my smtp server is not forwarding the mail or 3. the reciepient server is not excepting the mail can anyone HELP me!!! Please do mention ur name would b easy to address. Thanks in advanceI had this issue the following header fixed the issue: <?php session_start(); header("Cache-control: private"); ... ?>The same issue. # php-cgi -v PHP 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: Apr 26 2009 22:11:16) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies System call trace (in fact, this is processed by mod_php of the same version): open(".../sess_a6549.............", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 1035 fstat64(1035, {st_mode=S_IFREG|0600, st_size=96, ...}) = 0 flock(1035, LOCK_EX) = 0 fcntl64(1035, F_SETFD, FD_CLOEXEC) = 0 fstat64(1035, {st_mode=S_IFREG|0600, st_size=96, ...}) = 0 _llseek(1035, 0, [0], SEEK_SET) = 0 read(1035, "Acess|s:1:\"1\";id|s:3:\"108\";login|"..., 96) = 96 ... ftruncate64(1035, 0) = 0 _llseek(1035, 0, [0], SEEK_SET) = 0 write(1035, ""..., 0) = 0 close(1035) = 0 Session files are shared via NFSv4, if it is important.I have the same problem. System: Linux 2.6.26-2-686 #1 SMP Sat Jun 11 14:54:10 UTC 2011 i686 PHP 5.3.3-7+squeeze1 with Suhosin-Patch (cli) (built: Mar 18 2011 17:22:52) Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH Problem: One PHP script creates a session (474 bytes), which I want to read with another PHP script. The second script starts like this: <?php session_start(); var_dump( session_name() . "=" . $_COOKIE['PHPSESSID'], "<br>\n" ); var_dump($_SESSION, "<br>\n"); ... The problem is, that when I start second script, the 474 bytes of the session is emptied to 0 bytes. The the domain of first and second script are different, but they are on the same virtual hosted server, and they use the same session path: /var/lib/php5 /etc/php5/apache2/php.ini session settings are: [Session] session.save_handler = files session.save_path = /var/lib/php5 session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = session.cookie_httponly = session.serialize_handler = php session.gc_divisor = 100 session.gc_maxlifetime = 1440 session.bug_compat_42 = 1 session.bug_compat_warn = 1 session.referer_check = session.entropy_length = 0 session.entropy_file = session.cache_limiter = nocache session.cache_expire = 180 session.use_trans_sid = 0 session.hash_function = 0 session.hash_bits_per_character = 4 Any ideas?