1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Apache/PHP crash on db query (Windows)

Discussion in 'Resolved Bug Reports' started by ponology, Oct 6, 2010.

  1. ponology

    ponology Member

    I downloaded the latest package and failed to install it. After a few tracing, I commented out this line

    PHP:
    $data[] = '
    INSERT INTO xf_bb_code_media_site
            (media_site_id, site_title, site_url, match_urls, embed_html)
        VALUES
            (blah blah blah)
    '
    ;
    And the installer went through step 2 without problem. It's quite strange so I tested to use dump (and short) data for field `embed_html` and that query worked fine. I suspect there's problem with Zend Mysqli library when it has to deal with long text data in Windows system.

    Back to my installation, it failed hard again in step 2b. I tracked it down one more time and all the template building cause problem (including 'ImportTemplate', 'Template', 'ImportAdminTemplate', 'AdminTemplate', 'ImportEmailTemplate', 'EmailTemplate'). Once again, (I guess) they are the tasks involving long text fields.

    My Windows system: Windows XP SP3, Apache 2.2, PHP 5.3.0, MySQL 5.1.34. In other side, I installed it just fine in my linux box but I want to get it running on my local machine badly :(

    Any ideas?

    Update: Visual Studio pointed out it was a stack overflow in httpd.exe in the middle of something from php5ts.dll. I have no symbols loaded so I can't tell exactly what was happening but I hope this help...
     
  2. Luciano

    Luciano Member

    Well I had similar problems with my local server. (using wamp server bundle... where you can switch apache, mysql and php versions on the fly) (http://www.wampserver.com/en/)
    just like you it more or less crashed at step 2b

    I then just downloaded a different localhost server bundle xampp (http://www.apachefriends.org/en/xampp-windows.html)
    you can install it without deinstalling the other server (just make sure you dont run both at the same time.
    I installed xenforo on that one and.. (it did give me a small errorr but continued..) and suddenly it was installed. And it works fine.
    Now when i'm working with xenforo, i launch xampp, for vbulletin and other stuff i run wamp..

    only drawback with xampp is that you cant test an application with several versions of php just with 1 click.. but i can live with that.

    Luc
     
    Jethro and Umit like this.
  3. vbgamer45

    vbgamer45 Active Member

    I think having the same issue. I ran into a stack overflow on the same spots that you mentioned.
     
  4. ponology

    ponology Member

    I updated the post with information when I use Visual Studio to debug the exception in httpd
     
  5. Mike

    Mike XenForo Developer Staff Member

    I'm trying to figure out what specifically is causing this issue...
     
    cornishman and ponology like this.
  6. vbresults

    vbresults Well-Known Member

  7. ponology

    ponology Member

    I'm running XenForo in Windows XP (the machine mentioned in the first post) by using a database dump from my other linux box. It works very well until now. I can edit templates and everything. I copy and pasted a few time into template editor and it was saved without any "exception" raised. Very strange
     
  8. Umit

    Umit Active Member

    installed xampp after reading Luciano here, needed to delete install_lock file,
    i am using win7 32. (cant wait to switch to mac, really this was the last draw)
     
  9. Mike

    Mike XenForo Developer Staff Member

    I was able to work around this particular issue, but as noted the issue appears during the cache rebuilding step. That's harder to workaround.

    I've only ever seen this reported with WAMP, so I'm not sure if it's something they've done specifically.
     
  10. ponology

    ponology Member

    Hi Mike,

    Yeah, it was very hard to catch as most of the time the script runs in the background. I don't know if this information is helpful: I didn't use a bundle solution (WAMP for example), I setup my Apache/PHP/MySQL by myself. I enabled and installed a few extra Apache modules and PHP extensions...
     
  11. p4guru

    p4guru Well-Known Member

    yeah might be windows specific ? i using centos 5.5. 64bit, apache 2.2.16, php 5.3.3 native mysqlnd driver, percona 5.1.50 on a local win7 64bit pc with virtualbox virtual OS and installed fine without probs
     
  12. Pope Viper

    Pope Viper Well-Known Member

    FWIW, I installed it on a Windows 2008 R2, PHP 5.3.0, MySQL 5.1.39, no issues whatsoever.
     
  13. Mike

    Mike XenForo Developer Staff Member

    I tried with WAMP with PHP 5.3.0 and 5.3.1 and both had issues.

    I haven't had issues like this while developing, either with a non-packaged install or Zend Server CE.
     
  14. ponology

    ponology Member

    Maybe a PHP configuration? Like memory limit or something. What are yours?

    On my Windows machine, I increased it to 256M but that stack overflow still happened. Running a Core 2 Duo 2.1Ghz, 2GB RAM
     
  15. Mike

    Mike XenForo Developer Staff Member

    Shadab, Darkimmortal and ponology like this.
  16. ponology

    ponology Member

    Very nice investigation, Mike! So I think we will just go around this :D

     
  17. Luciano

    Luciano Member

    I agree its probably something wamp does.. but its the best tool you can have when developping, specially if you want to test how a script works with different versions of php, apache or mysql.. But its certainly not the php config because you can edit and configure each version of php with different php.ini s..
    xampp or manual installed server is the best solution
     
  18. arco

    arco Member

    Replace library/Zend/Db/Statement.php with the one in the attached zip. It contains the patch linked to by Mike, and made the install for me go past step 2. I get an error in step 2b now though, while rebuilding template cache. :(
     

    Attached Files:

  19. nestor718

    nestor718 Active Member

    Same exact here, I'm on IIS7 and the installation script tells me my server meets the requirements. However I only get to step 2 and then ends with a white screen and the message 'PHP has encountered a Stack Overflow'.

    When I add the 'Statment.zip' file above it will get me to step 2b and then the same message. I'll play with it a bit and report back ...

    p.s. don't know if this is related but this value in the .htaccess is not supported in the IIS7's mod rewrite: 'RewriteCond %{REQUEST_FILENAME} -l' So I just deleted it when I imported the rules. What does this '-l' switch do? Maybe there's a substitute for IIS7.
     
  20. nestor718

    nestor718 Active Member

    This code snip reproduces the error for me:

    PHP:
    <?php
    function a() { a(); }
    a();
     
    ?>
    Problem seems related to recursion and how PHP handles this on IIS/ISAPI
    http://bugs.php.net/bug.php?id=27946
     

Share This Page