[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

javascript causing apache to crash?!?

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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

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…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

656 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