?
Solved

javascript causing apache to crash?!?

Posted on 2004-04-01
2
Medium Priority
?
301 Views
Last Modified: 2010-03-04
Hi all,
i'm running Apache/2.0.47 (Win32) mod_perl/1.99_10-dev Perl/v5.8.0 mod_ssl/2.0.47 OpenSSL/0.9.7b PHP/4.3.3
on an xp pro machine.
i added a javascript to randomly pick and display certain banner images.
now i get strange behavior in that after 2-3 reloads or clicks to other pages apache dies writing the following into error.log:

[Thu Apr 01 14:49:47 2004] [notice] Parent: child process exited with status 4294967295 -- Restarting.
[Thu Apr 01 14:49:51 2004] [notice] Parent: Created child process 1664
[Thu Apr 01 14:50:25 2004] [notice] Child 1664: Child process is running
[Thu Apr 01 14:50:25 2004] [notice] Child 1664: Acquired the start mutex.
[Thu Apr 01 14:50:25 2004] [notice] Child 1664: Starting 250 worker threads.

i've looked into bug reports (http://bugs.php.net/bug.php?id=25570) but that didn't really help me any.
here's the script that causes the prob :

      path = 'pics/banner/'
      num1 = Math.round(Math.random() * 8);
      num2 = Math.round(Math.random() * 8);
      if(num1 == num2)
            num2++
      banner_pics = new Array()
      banner_pics[0] = 'banner_1.gif'
      banner_pics[1] = 'banner_2.gif'
      banner_pics[2] = 'banner_3.gif'
      banner_link = new Array()
      banner_link[0] = 'http://www.bla.com'
      banner_link[1] = 'local_file.html'
      banner_link[2] = 'another_local_file.php'

      banner2 = document.getElementById('banner_2') // img tag with id='banner_2'
      banner3 = document.getElementById('banner_3') // dito

      b2_link = document.getElementById('b_2_link') // a tag with id = 'b_2_link'
      b3_link = document.getElementById('b_3_link') // dito
      
      banner2.src = path+banner_pics[num1]
      banner3.src = path+banner_pics[num2]
      switch(num1) {
            case 0:
            case 2:
                  b2_link.target = '_new'
                  break;
      }
      
      switch(num2) {
            case 0:
            case 2:
                  b3_link.target = '_new'
                  break;
      }

      b2_link.href = banner_link[num1]
      b3_link.href = banner_link[num2]

would greatly appreciate any help!
thnx
J
0
Comment
Question by:Mike D
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Author Comment

by:Mike D
ID: 10731997
ups!
guess i solved it myself... ;-}

took the src= and href= out of the elements and now it works ok!

hope this helps anybody having similar problems.
would still like to know what was going on though...
0
 
LVL 2

Accepted Solution

by:
Lunchy earned 0 total points
ID: 10734146
Closed, 500 points refunded.
Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question