NYCPHP Meetup

NYPHP.org

Fw: [nycphp-talk] HELP!!!!

Phil Powell soazine at erols.com
Sat May 11 13:14:50 EDT 2002


----- Original Message -----
From: "Phil Powell" <soazine at erols.com>
To: "George Herson" <gherson at snet.net>
Sent: Saturday, May 11, 2002 1:14 PM
Subject: Re: [nycphp-talk] HELP!!!!


> In the "HOW BOUT THAT" department.. this worked:
>
> <?
>   flush();
>   $menubarPath = $DOCUMENT_ROOT . "/menubar_functions.php";
>   require_once($menubarPath);
>   echo PRODUCE_MENUBAR();
>
> ?>
>
> Thanx for hearing my tales of woe..
>
> Phil
> ----- Original Message -----
> From: "George Herson" <gherson at snet.net>
> To: <soazine at erols.com>
> Sent: Saturday, May 11, 2002 10:20 AM
> Subject: Re: [nycphp-talk] HELP!!!!
>
>
> > hi,
> >
> > Do you have to require_once( menubar_functions.php ) over http?  I'm not
> sure
> > that works.  Require it as a file, that'll work.
> >
> > When you get a clear error like this, make a copy of the script and in
it
> delete
> > all lines except what's relevant to the failure.  Then hack that to
learn
> what's
> > wrong.
> >
> > george
> >
> > Phil Powell wrote:
> > > The example still doesn't work for me, though, here is the error:
> > >
> > > Fatal error: Call to undefined function: produce_menubar() in
> > > /users/ppowell/web/chat/chat_login.php on line 55
> > >
> > > Here is the code of menubar_functions.php:
> > >
> > > <?
> > >
> > >  // This function is the PHP version of the TCL proc PRODUCE_MENUBAR
> which
> > >  // will produce the menubar for all PHP files
> > >  //
> > >  // Syntax: echo PRODUCE_MENUBAR()
> > >  //
> > >
> > >
> > >  function PRODUCE_MENUBAR() {
> > >   global $HTTP_HOST;
> > >   $tcl = (preg_match("/\\bdyndns\\b/i", $HTTP_HOST)) ? "tclsh83" :
> "tclsh";
> > >   $path = (preg_match("/\\bdyndns\\b/i", $HTTP_HOST)) ? "cgi-bin" :
> > > "cgi-bin/cgiwrap/ppowell";
> > >   $fileID = fopen("http://$HTTP_HOST/$path/menubar.cgi", "r");
> > >   $menubar = fread($fileID, 1000000);
> > >   fclose($fileID);
> > >   return $menubar;
> > >  }
> > >
> > > ?>
> > >
> > > and the offending code in /chat/chat_login.php:
> > >
> > > <?
> > >   flush();
> > >   $menubarPath = "http://" . $HTTP_HOST . "/menubar_functions.php";
> > >   require_once($menubarPath);
> > >   flush();
> > >   echo PRODUCE_MENUBAR();
> > >
> > > ?>
> > >
> > > Phil
> > > ----- Original Message -----
> > > From: "George Herson" <gherson at snet.net>
> > > To: <soazine at erols.com>
> > > Sent: Friday, May 10, 2002 9:43 PM
> > > Subject: Re: [nycphp-talk] HELP!!!!
> > >
> > >
> > >
> > >>hi.
> > >>
> > >>http://www.php.net/manual/en/function.flush.php has a chat-based
> example,
> > >
> > > fyi.
> > >
> > >>geo
> > >>
> > >>Phil Powell wrote:
> > >>
> > >>>I don't know how categorize this one so I'll just shout out a plea
for
> > >>
> > > HELP!!!!!!!!
> > >
> > >>>I have the following .php file, menubar_functions.php, resting in the
> > >>
> > > docroot:
> > >
> > >>><?
> > >>>
> > >>> // This function is the PHP version of the TCL proc PRODUCE_MENUBAR
> > >>
> > > which
> > >
> > >>> // will produce the menubar for all PHP files
> > >>> //
> > >>> // Syntax: echo PRODUCE_MENUBAR()
> > >>> //
> > >>>
> > >>>
> > >>> function PRODUCE_MENUBAR() {
> > >>>  global $HTTP_HOST;
> > >>>  $tcl = (preg_match("/\\bdyndns\\b/i", $HTTP_HOST)) ? "tclsh83" :
> > >>
> > > "tclsh";
> > >
> > >>>  $path = (preg_match("/\\bdyndns\\b/i", $HTTP_HOST)) ? "cgi-bin" :
> > >>
> > > "cgi-bin/cgiwrap/ppowell";
> > >
> > >>>  $fileID = fopen("http://$HTTP_HOST/$path/menubar.cgi", "r");
> > >>>  $menubar = fread($fileID, 1000000);
> > >>>  fclose($fileID);
> > >>>  return $menubar;
> > >>> }
> > >>>
> > >>>?>
> > >>>
> > >>>I have a file called chat_login.php that is resting in
> > >>
> > > $DOCUMENT_ROOT/chat folder.
> > >
> > >>>I can't call menubar_function.php 's function PRODUCE_MENUBAR (Fatal
> > >>
> > > error) from my file chat_login.php.
> > >
> > >>>What on earth do I do??!?!
> > >>>
> > >>>Phil
> > >>>
> >
> >
> >
> >
> >
>




More information about the talk mailing list