473,604 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sessions not working in Yahoo Small business

Hi,
I developed web app using Php and used sessions. Everything works on
my test server but sessions just dont work on the clients server which
uses Yahoo Small Business to host their site.

For example:
<?php
session_start() ;
if (!$_SESSION['count']) {
echo "Not registered<BR>" ;
$_SESSION['count'] = 1;
$count = 1;
} else {
$count = $_SESSION['count']++;
}
echo "count is '$count'";
?>
Always shows count as 1.
The yahoo site uses PHP Version 4.3.6.
The only difference relevant I can see in the two sites is
session.use_tra ns_sid which is off on Yahoo. Enabling this with ini_set
didnt help. Saving session information in the DB using custome session
handlers didnt help either.
Any ideas as to why this may be happenning?

Thanks in advance!

Other relevant php info is pasted below:

Session Support enabled
Registered save handlers files user

Directive Local Value Master Value
session.auto_st art Off Off
session.bug_com pat_42 On On
session.bug_com pat_warn On On
session.cache_e xpire 180 180
session.cache_l imiter nocache nocache
session.cookie_ domain no value no value
session.cookie_ lifetime 0 0
session.cookie_ path / /
session.cookie_ secure Off Off
session.entropy _file no value no value
session.entropy _length 0 0
session.gc_divi sor 100 100
session.gc_maxl ifetime 1440 1440
session.gc_prob ability 1 1
session.name PHPSESSID PHPSESSID
session.referer _check no value no value
session.save_ha ndler files files
session.save_pa th /tmp /tmp
session.seriali ze_handler php php
session.use_coo kies On On
session.use_onl y_cookies Off Off
session.use_tra ns_sid Off Off

Jul 17 '05 #1
4 3127
NC
phpvial wrote:

I developed web app using Php and used sessions. Everything
works on my test server but sessions just dont work on the
clients server which uses Yahoo Small Business to host their
site.
I have a site hosted there. Sessions work correctly.
For example:
<?php
session_start() ;
if (!$_SESSION['count']) {
echo "Not registered<BR>" ;
$_SESSION['count'] = 1;
$count = 1;
} else {
$count = $_SESSION['count']++;
}
echo "count is '$count'";
?>

Always shows count as 1.


I have encountered this behavior before. What happens here
is a typing issue. PHP seems to think that every variable
in the predefined variables is a string. So the ++ operator
has no effect on any of those variables. What you should do
is to give PHP a hint that $_SESSION['count'] should be
treated as an integer:

$count = $_SESSION['count'] + 1;

This will solve your problem.

Cheers,
NC

Jul 17 '05 #2
Hi NC,
Thanks for your reply. Its not just that the count is never
incremented, no session variables seem to be saved at all. I was just
using the above as an example (because of the underlying problem even
changing it to "$count = $_SESSION['count'] + 1;" didnt work for me).
Any other possibility? Do I need to initialize anything else? Any per
user config options?

Thanks!

Jul 17 '05 #3
I found the solution to this problem and wanted to share it with the
group in case anyone else has it too.
Yahoo Small Business requires a tmp directory to be created at the root
of the users home directory. This is where sessions information is
stored.

Jul 17 '05 #4
DOOD. I figured it out

http://help.yahoo.com/help/us/webhosting/php/php-29.htm

All you have to do is create a /tmp directory on your site. It wil
all work after that

SWEEET

Jaso
http://eye.cc -php- web design
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1374
by: Sheri | last post by:
Our working environment traditionally has a new project (application) that has multiple developers within the development of that project. I need to know the best way to start development. Is it better to have an individual team members have one solutions with one project....which would be a certain screen and then combine them back somehow. Or what is the best way to handle this? Thanks for any help.
8
18749
by: riprod | last post by:
Someone in the IIS newsgroup suggest I post this here, so sorry in advance for the cross posting. I have a Win 2003 SP1 with IIS 6 and host about 40 websites, most of them useing ASP/VB with access databases. The server is a Dell Dual 2.4Ghz XEON with 512Mb Ram. Every few days I get the error 'HTTP/1.1 New Session Failed' and the server stops showing the sites. It comes right after a bit and then the error comes back. I
2
2558
by: C16 | last post by:
Hi All Another newbie question. I have a small website working via php and all is fine, but I wanted to add some new features and was wondering if php allows for variables to be seen by multiple sessions, ie a user viewing the web site on one machine can see variables created by another users session. Is that what $_SERVER is for, or am I going to be better of creating a single entry table in mySQL that has a field for each global...
8
2027
by: Hitesh Bagadiya | last post by:
Hi, Our database contains Hindi as well as English characters. We have specified the encoding to be unicode during initdb as well as createdb commands. Unfortunately sorting of the Hindi fields is not working. For e.g. we have a person table and the query "SELECT * FROM PERSON ORDERY BY LASTNAME" returns all the rows but the records are not being sorted by the last name.
13
1681
by: Simon Dean | last post by:
And while Im at it... should I be using PHP's built in sessions, or use my own functions that I've chobbled together from various sources and takes advantage of also validating IP Addresses??? I don't like to use things just because they're there. Im currently rewriting a web front end to a helpdesk. The old one was written in ASP and very very poorly structured and programmed. Im blazing in with PHP and unfortunately SQL Server and I've...
1
2276
by: AnthonyC | last post by:
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application. When user log onto the application, an in-memory (per-session) cookie is created to hold the session key for the user. This unique key is assigned as part of the business layer logon process, and never changes while the user is logged on. The call to the business component returns this unique key if the logon...
13
3099
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those sorts of clients. Mine are all small businesses whose sites will never reach those sorts of scales. I deal with businesses whose sites get maybe a few hundred visitors per day (some not even that much) and get no more than ten orders per day....
6
3456
by: Dean Fields | last post by:
Hello, I am having some session problems wih an in-house (classic) asp application. My developers have not been able to figure it out. I am more of a systems admin type and much of this is over my head. But I will try to explain the best I can and tell you what I know so far. First a little summary of environment. I am running iis6 in a web farm with hardware NLB and 5 servers. Each server is identical. Each server uses a hosts file...
84
3925
by: Patient Guy | last post by:
Which is the better approach in working with Javascript? 1. Server side processing: Web server gets form input, runs it into the Javascript module, and PHP collects the output for document prep. 2. Client side processing: Web server gets form input and passes it to PHP which includes the Javascript written in a way to make the form input processed on the client side and rendered (probably using DOM function calls) on that side as...
0
7997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7929
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8409
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8280
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5882
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5441
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3907
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2434
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.