473,847 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fatal error: Cannot use object of type Session as array in

usafshah
104 New Member
Hi all,

I installed a script and as i run it gives the following error:

Fatal error: Cannot use object of type Session as array in c:\www\musicbox \index.php on line 2692

index.php ---> line 2692 --->
Expand|Select|Wrap|Line Numbers
  1. $mymusic = new Music($HTTP_GET_VARS['action'], $session['username']); 
Jan 7 '07 #1
4 7692
ronverdonk
4,258 Recognized Expert Specialist
Are you sure that you did not misspell the name of the session array? WHen it is your own array, then its name could be $session. However, if this is meant to use an entry in the global $_SESSION array, it must be spelled as $_SESSION['username'].

Also, do not use the $HTTP_GET_VARS. This is a deprecated array that will not be available any longer in PHP V6. It is better to use $_GET['action'],

Ronald :cool:
Jan 7 '07 #2
usafshah
104 New Member


great !! Problem solved .. :D

I changed the $HTTP_GET_VARS to $_GET and $session to $_SESSION and it solved my problem .. many thanks dude ..
Jan 7 '07 #3
ronverdonk
4,258 Recognized Expert Specialist
You are welcome any time!

Ronald :cool:
Jan 7 '07 #4
plm66
1 New Member
Re: Fatal error: Cannot use object of type Session as array in

Et oui, le blem est résolu juste avec un chercher remplacer
de $HTTP_GET_VARS pour $_GET et
$session pour $_SESSION !!

Valable pour une nulled installation de zainu.
Merci les pros!
Aug 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2451
by: PeterF | last post by:
Hello, what is wrong here? the purpose is to create an array of objects and then interate over it, calling some method from all of them. I get just the following at the marked line ("// FATAL ERROR"): Fatal error: Call to a member function on a non-object See the code:
0
4595
by: SHC | last post by:
Hi all, I have a VC++ .NET 2003 - Windows XP Pro PC. I created a Win32 console application in my VC++ .NET 2003 and copied validateDOM.cpp, books.xml and books.xsd (see the attached files below) from Microfost MSDN Library for my project "validateXML". When I did "Build" on my project, I got the following fatal error C1010: c:\Documents and Settings\SHC\My Documents\Visual Studio Projects\valoidateDOM\valoidateDOM.cpp(273): fatal error...
0
1517
by: pillars | last post by:
I have been developing an application in Windows CE.Net using the .Net Compact Framework and C#. Data is saved to a local Sql Server CE database and then transferred wirelessly to a central server. The device has to open a connection every 5 minutes, transfer all records and then disconnect. I have been running tests to verify the capacity of the database, if, for example, the network goes down and transfers cannot be made. I have...
0
23519
by: HKSHK | last post by:
This list compares the error codes used in VB.NET 2003 with those used in VB6. Error Codes: ============ 3: This Error number is obsolete and no longer used. (Formerly: Return without GoSub) 5: Procedure call or argument is not valid. 6: Overflow. 7: Out of memory.
1
29788
by: Jim Michaels | last post by:
=> Array ( => UML:CLASS => open => 5 => Array ( => .:00000000000008EC => quiz_batteries => public
4
3772
by: Flic | last post by:
Hi, I am a relative beginner with php and have run into the problem in the subject line. I wonder if anyone could point out what the problem is as I have tried a few different things and it still doesn't like it. The code itself is: if($_POST) { $product = $products]; $cart->add_item($product,$product,$product);
3
2769
by: Ming | last post by:
I am new to php5 programming :) I redirect users to another server to login. After they login successfully, they will be redirected to test.php. The server provides xml_rpc interface so I can communicate with it. After running my scripts, I get this error: Fatal error: Call to undefined method XML_RPC_Response::kindOf() in / usr/share/PEAR/XML/RPC.php on line 1972
3
2291
by: sjohnson1984 | last post by:
Hello all, thanks for taking the time out to read this. I have a javascript function, the purpose of which is to compare 2 form values and redirect the user if two values are met - however, although it seems simplicity, IE throws up an error box reading "Error: Object does't support this property or method_ Code: 0". Slight background on the use of this: user talks to customer on the phone, asks questions and fills in the form based on the...
6
3161
by: Patient Guy | last post by:
I am a newcomer to using PHP but not to programming (C, C++, Javascript). I am playing around with classes and wanted to make a function that has a method simply for producing either plain text or HTML output in a tabular way a listing of the global variables in the = keyValue two-column format. That's what the method listGlobals does. I am stumped by the following error message: PHP Catchable fatal error: Object of class phpEnv...
0
9879
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...
1
10706
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10330
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...
0
9477
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7879
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
7050
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
5716
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...
0
5907
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4521
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.