[resolved] Cannot access self:: |
|
The thought just occurred to me that I'm using APC now, does the debugger not work with APC?
What if I turn off the caching of scripts but leave APC installed for the apc_store/fetch()? |
||||||||||||
|
Site Admin
|
What PhpED version/build number do you use? and could you please submit a screenshot illustrating the problem?
|
||||||||||||
_________________ The PHP IDE team |
|
I've attached a screen shot. With the screen shot, the function mysql_escape() is being called from line 401 (also shown) using $this->mysql_escape() so $this is valid.
I have also tested the APC deal by not loading it via extension= line, same problem. Running
|
||||||||||||||
|
Site Admin
|
$this is a very senstive keyword in php. Try to remove all statements with $this from Watches.
What's about screenshot with self:: ? |
||||||||||||
_________________ The PHP IDE team |
|
I didn't have that code in there as an example, but calling self:: any function would fail with the error I posted originally.
Clearing out all of my watches and breakpoints has cleared up the issue, thanks! Incidentally, I did have $this as a watch variable but it would only cause that error when it went to execute a line with $this or self:: in it. |
||||||||||||
|
Site Admin
|
I noticed earlier that sometimes watches may cause such problems. It was fixed but seems not completely. I'd highly appreciate if you post a sample that will replicate the error with $this or self:: or better both.
|
||||||||||||
_________________ The PHP IDE team |
Guru master
|
Hey Dmitri,
I just experienced the same problem with the "self::" thing (no class scope) with DBG 3.2.12. Reading this post (and having a lot of watches) I tried to remove them one by one and test every time until I found the one that caused the problem. Consequently, I spent about 4 hours scaling down my framework to find out what exactly causes the problem and I'm glad to tell you that I did it You need to fullfill a number of prerequisites to trigger the error: - You need an __autoload function and it HAS to be in an included file, not in the file that is initially called. - You need to have a watch that points to a static variable in a non-existing class (it needs the :: scope). I used "Error::$gnError" for my tests. - You need to break in the static class function that will execute the "self::" call. - The autoload function has to require/require_once() a file and fail (include() doesn't work) . Given all that, reproducing the problem is fairly simple: test.php:
test2.inc.php:
Make sure the breakpoint is set where indicated (DebugBreak works as well, as long as it's IN the function). Simply run test.php. I assume the reason it crashes is pretty simple. The __autoload function is called because of the watch and it causes a require statement to fail. Normally when a require fails it terminates PHP. Because it is the debugger causing this failure, attempting to show information in the watch window (and thus wouldn't fail under normal circumstances) execution continues, but internally PHP probably did some cleanup stuff already etc... causing the scope error later on. Hope that helps! Edit: I'm using PHP 5.2.4 on a 3rd party Apache/2.0.59 (Win32) server with DBG v3.2.12. For your viewing pleasure I have made my phpinfo() available here |
||||||||||||||||
|
Site Admin
|
Thanks for report.
Problem is fixed in dbg 3.2.14/phped 5.2.5234 |
||||||||||||
_________________ The PHP IDE team |
Guru master
|
You're welcome, glad I could help.
(You guys are fast ) |
||||||||||||
|
[resolved] Cannot access self:: |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by