Problems starting apache 1.3 with mysql

I've been working on a project to replace one of the my group's primary NIS servers. It also runs mysql and apache, as it is the host for the our team's hardware tracking database and website. Its running apache 1.3, and for some odd reason, I can't get apache to start on system boot. The original system, prince, used a startup script in /etc/rc3.d called S98hits. It was as follows:

#!/bin/sh
/usr/local/mysql/bin/safe_mysqld &
sleep 30
/usr/local/apache/bin/apachectl start

This script works fine on prince, but on the new system, serenity, nothing I do will run that apachectl start at boot time. I've tried pretty much everything I can think of. From what I've seen, if you try to execute apachectl start from a bourne shell, I get a mysql library error, which I've tracked down and fixed, yet the fix won't work. If you run it from a c-shell, the program executes every time, with no errors, but it won't start automatically. The latest iteration of my scripts has a startup script in rc3.d, which reads the following:

#!/bin/sh
/usr/local/apache/bin/startup

startup is a script that I created that contains the following:

#!/bin/csh
/usr/local/apache/bin/apachectl start

I saw somewhere that scripting in csh without adding a -f after the first line can sometimes cause problems, but after trying it, it didn't work.

Now, I'm totally stumped on why nothing is working here. Any ideas?

Thanks!

JR

Just a followup with some more information for you gurus. When I run the apachectl start from a command line, in a bourne or korn shell, I get the following error about the LD_LIBRARY:

ld.so.1: httpd: fatal: libmysqlclient.so.6: open failed: No such file or directory
Killed
/usr/local/apache/bin/apachectl start: httpd could not be started

The libmysqlclient.so.6 file is located in /usr/local/mysql/lib/mysql.

I've edited the global .cshrc file to include the following:

setenv LD_LIBRARY_PATH /usr/openwin/lib:usr/local/lib:/usr/lib:/usr/local/mysql/lib/mysql:/usr/local/mysql/lib:/usr/sfw/lib

Still, I'm stumped.