charlesg83 has asked for the wisdom of the Perl Monks concerning the following question:


I am fairly new to PERL but I have an issue that I have not been able to solve. The code I am working with was created by another person who no longer works with our company.

Issue: I have a set of PERL scripts that form several web pages. The code works perfectly fine on one system but on a different system, the code fails in different areas.

System information:

1) Both systems are running AIX 5.3 - 64 bit
2) Both systems are running PERL 5.8.2.61 and both systems are running the same version.
3) Both systems are running Apache 1.3.31-1
4) DNS has been fully tested effectively on both systems and desktop.
5) I have examined the enviroment on both systems and everything is the same. (%env in PERL and Unix environment)
6) I have checked teh Apache conf files and all files compare to be the same.
7) I have verified that all the files and directories (PERL and APACHE) on both servers have the same permissions and sizes.

Detail description of problem:

On the system that I am having issues, the following are the different reactions I am seeing:

1) If I use the name of the server to access the main web page, the system will not create cookies and security fails without the cookies. This occurs whether I use the short name or the fully qualified name.
2) If I use the IP address of the server to access the web page, the system will create the cookies and allow access to the rest of the web pages.
3) Even with the IP address being used, the system fails to recognize any check boxes that cause other web pages to activate.

Does anyone have any idea what could cause these issues or how I can track down why it re-acts differently on the two systems?

thanks for the assistance

Replies are listed 'Best First'.
Re: Perl acting different on two machines
by keszler (Priest) on Nov 20, 2009 at 02:07 UTC
    My first guess would be the Apache configuration, not the Perl scripts. Find the httpd.conf (and likely other .conf files) for Apache on the two systems and compare them.
      I have updated the original message. I failed to added the information regarding Apache and the conf files.
        I assume when you say the Apache config files "compare to be the same" that you mean aside from their unique server names and IP addresses.

        Check the Perl for the cookie-setting code. Is the cookie domain set to the unique server name, i.e. server1.mydomain.com, or to mydomain.com? If the former, the Perl on server2 needs to use server2.mydomain.com.

Re: Perl acting different on two machines
by roboticus (Chancellor) on Nov 20, 2009 at 12:40 UTC
    charlesg83:

    You've probably checked this, too, but you didn't say: Are the perl modules the same version on both machines?

    ...roboticus
Re: Perl acting different on two machines
by Jenda (Abbot) on Nov 20, 2009 at 09:03 UTC

    I admit I know next to nothing about Apache but ... any chance the config should actually differ slightly. Namely in the host or domain for the cookies. If the two systems do have a different hostname, try to search the config for the first one and replace it by the second on the second system. Or it could be somewhere in the config files for the scripts or the script themselves.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      I have checked all the apache components and configs but can not find a difference. The more I look into this and based on everyone's comments, the problem may actually lie in the system configuration (ODM) and neither the Apache or Perl configurations.

      Thanks for the assistance.