?
Solved

javascript causing apache to crash?!?

Posted on 2004-04-01
2
Medium Priority
?
305 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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Integration Management Part 2
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month16 days, 5 hours left to enroll

850 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