|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
PHP Custom Sessions Article Question??
Hi Ya Folks,
Just a quickie for all u PHP Pros... I keep getting the following error every time the function expire() calls destroy, well i've renamed it to destroy_sess() but same difference... Fatal error: Call to undefined function: destory_sess() in sess.php on line 149 I have included my sess.php file, but am really stuck on this one, i will be very grateful for any advice... Also, the dev article I took the sess.php file from is: http://www.devarticles.com/art/1/171/2 Cheers All, Harvey PHP Code:
|
|
#2
|
|||
|
|||
|
Sorry everyone, but the following code in the sess.php file was typed incorrectly, and should be...
PHP Code:
...cheers for all your help Harvey |
|
#3
|
|||
|
|||
|
Have you checked that you did not mistype the destroy_sess function when calling it?
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#4
|
|||
|
|||
|
the destroy_sess() function is called destroy_sess(), but its still not finfing it...
...any other ideas?? Cheers, Harvey |
|
#5
|
||||
|
||||
|
Change this line
PHP Code:
PHP Code:
Last edited by nicat23 : June 5th, 2003 at 12:28 PM. |
|
#6
|
|||
|
|||
|
I've already tried that...
...No luck, same error. There must be an error in the code? Help!? - Harvey |
|
#7
|
|||
|
|||
|
Quote:
Are you sure about that... take a look at your error line: Fatal error: Call to undefined function: destory_sess() in sess.php on line 149 is it supposed to be destroy or destory? |
|
#8
|
|||
|
|||
|
Where is the line with the error? Do you want us to count all your lines there until we find line 149?
If line 149 is inside the checkAcc operation, your problem is here: PHP Code:
The $this-> is a reference pointer. When used inside a class definition, it means exactly what it says ( $this->function) - in short: USE THIS FUNCTION NAMED 'FUNCTION' INSIDE THIS CLASS DEFINITION. If you don't use that, it looks outside of the class. Since there is no function outside the class named that, you get undefined function error...
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#9
|
|||
|
|||
|
There are two problems:
(1) - Line 71 : destroy_sess(); (2) - Line 140: $this->destory_sess(); Look at the spelling of this method call on line 140. You really should spend more time double checking your own code man. |
|
#10
|
|||
|
|||
|
Quote:
Lol - I am glad you counted the lines. I refuse to count lines in a big birds nest of code - it is easy to do copying and pasting, but we should'nt have to do that. But good catch... |
|
#11
|
|||
|
|||
|
Jpenn,
yeah, you are so right... and believe me, I would have never done it had I not had the quick find feature of ultraedit. |
|
#12
|
|
|