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
Solved

Points  for  AHOFFMAN

Posted on 2002-04-25
12
192 Views
Last Modified: 2010-03-04
Points for help with question.
0
Comment
Question by:kipper7
  • 5
  • 4
  • 3
12 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6969467
ok, lets continue. I'll try to earn these points ;-)
-------

IIRC the script seems to make trouble when called from apache only. So try following:

  1. login as that user which is used to run apache's httpd
     start the script as follows:  /full/path/to/script
     check if it realy produces what you expect

  2. (if 1. succeded)
     modify the script as follows (please post result then):
     $|=1; # flush output (place this before very first print statement)
     print "<BR>Row:$rowcount<BR>"; $rowcount++; # place this inside the foreach where you process @users
0
 

Author Comment

by:kipper7
ID: 6969711
Thanks
In that case I will bump up the pts :-)
0
 

Author Comment

by:kipper7
ID: 6969734
< . login as that user which is used to run apache's httpd
    start the script as follows:  /full/path/to/script
    check if it realy produces what you expect
>

did that and it works fine (from command line).

< modify the script as follows (please post result then):
    $|=1; # flush output (place this before very first print statement)
    print "<BR>Row:$rowcount<BR>"; $rowcount++; # place this inside the foreach where you process @users >

already tried this (from apache faq), did not work. in fact the addition of the $|=1; no matter where I put it results in no ouptut( from browser). from command line, stil works fine.


0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 51

Accepted Solution

by:
ahoffmann earned 300 total points
ID: 6969773
# have adapted your method of identing reply strings :-)

< did that and it works fine (from command line). >
fine.

< .. $|=1; ... id not work .. >
so I assume that you get no result at all.
This points to my very first comment, you remember?
     "script did not return within server timeout"

In this case we need to have a look into th eworld of debugging inter-process communication ...
Please modify your script in that way that you open a debug/log file, then write each mesage printed on STDOUT to this file too, something like:

     open(F,">/tmp/cgi.log") or print "open cgi.log failed";
     print F "Start logging here at date";

then add a "print F ..." statement in your foreach loop

I'm shure you test this from command line first, as usual ;-)
0
 
LVL 15

Expert Comment

by:samri
ID: 6970279
I thought that this is suppose to be a "here I am", "Accept Comment as Answer" and go home with the pts".  Just kidding guys.


You can try to use mod_cgi
http://httpd.apache.org/docs/mod/mod_cgi.html

* I tried, and it never worked! According to the docs, it should work.

cheers.
0
 
LVL 15

Expert Comment

by:samri
ID: 6970615
kipper,

The scripts works fine, the only difference is originally userid:apache has /bin/false as shell, I just changed it to /bin/sh

OS: rh7.2, apache 1.3.20


0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6970626
< comment by samri
  perhaps maybe some information in your passwd file that break the <table> tag.  Remember that some properties
                           like homedir, or shell do contain "/", which might have conflicted the HTML tag.
>

I also thought of a problem here, for example if a user is named ROW or TABLE, 'cause of:
     print <<ROW
unusual, but worth a check.
0
 
LVL 15

Expert Comment

by:samri
ID: 6970692
perhaps you could try to revise the code to instead of using

print TABLE;
.
.
TABLE

to
print "<table>\n";
print "<tr>..
.
.
print "</table>\n";

This might reduce the possibilities as commented by ahoffman.
0
 

Author Comment

by:kipper7
ID: 6971266
OK
Have already tried inserting debugging print statments and creating log files. the log files show no problems. the problem is only when trying to display all the data at the browser (thru apache).

the ideas about the table tags are good, but remember this worked fine a few days ago, which leads me further to believe that it is a system problem  or i need to reinstall apache. gonna wait for the next reboot and see what happens. in the meantime I made a plain vanilla script that uses no HTML formatting, so the users can at least get the information they need, not pretty but gets the job done.

Thanks again
0
 

Author Comment

by:kipper7
ID: 6971277
Here is something interesting. If I restart apache, and run the script from the browser it works fine ..ONCE !!
as soon as me or a user tries to run it again, it craps out at the 40th row again !!!

Wierd !!
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6971972
sounds like a caching problem.

< .. he log files show no problems. >
does this mean that all rows are in the logfile?

BTW, THANKS for grading.
0
 

Author Comment

by:kipper7
ID: 6986076
upgraded to apache 2.0.35 and now works fine !!!
Go figure !
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHPmailer and exchange online(Office365) 3 440
Apache Issues 9 86
Can't connect to WAMP server 5 71
Apache module 5 42
In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used.

791 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