472,806 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,806 software developers and data experts.

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

usafshah
104 100+
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 7602
ronverdonk
4,258 Expert 4TB
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 100+


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 Expert 4TB
You are welcome any time!

Ronald :cool:
Jan 7 '07 #4
plm66
1
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
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...
0
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)...
0
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....
0
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)...
1
by: Jim Michaels | last post by:
=> Array ( => UML:CLASS => open => 5 => Array ( => .:00000000000008EC => quiz_batteries => public
4
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...
3
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...
3
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,...
6
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...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.