Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"magic" crush #247

Closed
Repkit opened this issue Feb 23, 2013 · 2 comments
Closed

"magic" crush #247

Repkit opened this issue Feb 23, 2013 · 2 comments

Comments

@Repkit
Copy link

Repkit commented Feb 23, 2013

I've a weird stupid issue on a production server but managed to reproduce on localhost also and it sounds like this:
app: http://localhost/myapp/public/index.php/ (don't have mod_rewrite enabled);

  1. I've added login/logout widget on the first page.
  2. In the same first page I've some images which have source served by a php script like:
    img alt="" src="http://localhost/otherApp/script.php/?type=image&id=1234.gif"
    (As you can see it's an otherApp which lies on the same server/domain as mine).
    3.The script.php (which is not a class) from otherApp has a session_start() inside;
  3. When I login the login works ok (with redirect or without redirect on localhost on production apache log a stupid error PHP Warning: Class __PHP_Incomplete_Class has no unserializer in otherApp/script.php on line 2(where the session_start(); is used);
    5.On production server when I hit F5 (refresh page) after zfcUser tells me I'm logged in and display the correct user name from database I get surprissed that to see that after refresh I'm not logged in anymore.
    6.On localhost it keeps me logged in after refresh page, which is ok, works as expected.
    7.On both servers when I hit loggout button (with or without redirect) I get Catchable fatal error: Argument 1 passed to Zend\Stdlib\ArrayObject::exchangeArray() must be of the type array, null given, called in my_app_path\vendor\zendframework\zendframework\library\Zend\Stdlib\ArrayObject.php on line 399 and defined in my_app_path\vendor\zendframework\zendframework\library\Zend\Stdlib\ArrayObject.php on line 184.
    After this the app is unusable on both servers in current session. For get it working again you have open a new session (restart browser).
  4. If I remove session_start(); from the otherApp/script.php all works fine as expected on both servers. The problem is that is not my application and it's a third party application which is very hard to archive this remove from their side, more it's not my server it's customer's server so I must play as they sing.
  5. Now to reproduce the error on localhost you must have widget on the same page with one image that is populated from some kind of this script.
    Here is my test script that used to reproduce the strange behavior:

and in layout.phtml file i have

zfcUserIdentity()): echo $this->zfcUserLoginWidget(); else: echo $this->zfcUserIdentity()->getDisplayname(); ?>

a href="url('zfcuser/logout'); ?>"> Logout</a

For more information I'm at your discretion. 10x and sorry for long message but It's a strange stupid situation and got me some days to figure out up to here and to successfully reproduce on localhost too.

@Repkit
Copy link
Author

Repkit commented Mar 7, 2013

this is related to zendframework/zendframework#3700 hope helps someone :)

@spiffyjr
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants