Help - PHP problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ryan Miller

    Help - PHP problems

    HI guys and gals,

    The situation is this - My F***ing boss has told one of our clients that we
    will host their website ..... it is php and I have no idea at all about php.
    My uber-inteligent boss has also inform their former hosting company to stop
    hosting, so now our client has NO website .... well done boss

    We host with IIS, WIN 2K.

    I have placed their existing site in my a subdomain of the company's -


    Intalled PHP and made the associations in IIS. The page comes up and reports
    various PHP errors - please veiew page to see problem.

    Is there any basic steps I have miseed .... Could someone please help me ...
    I am desperate.

    Cheers, Ryan


  • Anders K. Madsen

    #2
    Re: Help - PHP problems

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On Fri, 30 Jul 2004 13:56:50 +0800
    "Ryan Miller" <x@xxxx> wrote:

    [snip]
    [color=blue]
    >
    > Intalled PHP and made the associations in IIS. The page comes up and
    > reports various PHP errors - please veiew page to see problem.
    >[/color]

    Hmm, I see no error but one produced in the script std.php, not by PHP
    itself though, but by the script...
    [color=blue]
    > Is there any basic steps I have miseed .... Could someone please help
    > me ... I am desperate.[/color]

    Hmm, depends on whether you boss is going to pay via paypal or visa. :p

    Madsen

    - --
    Anders K. Madsen --- http://lillesvin.linux.dk

    "There are 10 types of people in the world.
    Those who understand binary - and those who don't."

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBCe18lNH Je/JASHcRArd0AJ0bS imeF2tA+sFgftL2 lJA8XjhAugCfWSw r
    iXRnhigf5mKLtMV 7PummgwY=
    =FKs9
    -----END PGP SIGNATURE-----

    Comment

    • Geoff Berrow

      #3
      Re: Help - PHP problems

      I noticed that Message-ID: <20040730084100 .213ecaa4@lapsv in> from Anders
      K. Madsen contained the following:
      [color=blue][color=green]
      >> Intalled PHP and made the associations in IIS. The page comes up and
      >> reports various PHP errors - please veiew page to see problem.
      >>[/color]
      >
      >Hmm, I see no error but one produced in the script std.php, not by PHP
      >itself though, but by the script...[/color]

      Me neither. I notice the links have query strings, is there a database
      associated with this site by any chance or is there just a series of
      numbered pages? It may be that the script has been written assuming
      register globals is on (which it won't be on your new install). Try
      looking at what it is doing with the id variable or failing that, post
      the code for std.php in here.
      --
      Geoff Berrow (put thecat out to email)
      It's only Usenet, no one dies.
      My opinions, not the committee's, mine.
      Simple RFDs http://www.ckdog.co.uk/rfdmaker/

      Comment

      • Ryan Miller

        #4
        Re: Help - PHP problems

        Geoff,

        Code for std.php

        -----------------------------------------------------
        <?php
        /*

        require("includ es/sitedef.php");
        require("classe s/template.php");
        require("classe s/pages.php");
        require("classe s/std.php");
        include("includ es/printcheck.php" );

        if(isset($page) && file_exists("te mplates/".$page.".tpl") )
        {
        $tpl_page = new Template("templ ates/".$page.".tpl") ;
        $content = $tpl_page->template;
        $title = "";
        }
        elseif($id)
        {
        $std = new Std("includes/sitedef.php", $id);
        require("includ es/security.php");
        $std->print = $print;
        $content = $std->getPage();
        $title = $std->getTitle();
        }
        else
        {
        $content = "No page supplied to std.php";
        }

        $values = array( "main" => $content, "title" => $title );
        $tpl->parse($values) ;
        $tpl->output();
        ?>

        -----------------------------------------------------------------

        "Geoff Berrow" <blthecat@ckdog .co.uk> wrote in message
        news:8atjg0t5qm k1cu989026fduld ft2ieha0j@4ax.c om...[color=blue]
        > I noticed that Message-ID: <20040730084100 .213ecaa4@lapsv in> from Anders
        > K. Madsen contained the following:
        >[color=green][color=darkred]
        > >> Intalled PHP and made the associations in IIS. The page comes up and
        > >> reports various PHP errors - please veiew page to see problem.
        > >>[/color]
        > >
        > >Hmm, I see no error but one produced in the script std.php, not by PHP
        > >itself though, but by the script...[/color]
        >
        > Me neither. I notice the links have query strings, is there a database
        > associated with this site by any chance or is there just a series of
        > numbered pages? It may be that the script has been written assuming
        > register globals is on (which it won't be on your new install). Try
        > looking at what it is doing with the id variable or failing that, post
        > the code for std.php in here.
        > --
        > Geoff Berrow (put thecat out to email)
        > It's only Usenet, no one dies.
        > My opinions, not the committee's, mine.
        > Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]


        Comment

        • Geoff Berrow

          #5
          Re: Help - PHP problems

          I noticed that Message-ID: <4109ff2f$1@quo kka.wn.com.au> from Ryan
          Miller contained the following:
          [color=blue]
          >Code for std.php[/color]

          To see if it is a register globals problem try adding

          $id=$_GET['id'];

          at the top.

          --
          Geoff Berrow (put thecat out to email)
          It's only Usenet, no one dies.
          My opinions, not the committee's, mine.
          Simple RFDs http://www.ckdog.co.uk/rfdmaker/

          Comment

          • Aidan

            #6
            Re: Help - PHP problems

            Ryan Miller wrote:
            [color=blue]
            >Geoff,
            >
            >Code for std.php
            >
            >
            >[/color]

            Set the register_global s directive in the php.ini file to
            'register_globa ls = on'...

            Comment

            • Sebastian Lauwers

              #7
              Re: Help - PHP problems

              Aidan wrote:
              [color=blue]
              > Set the register_global s directive in the php.ini file to
              > 'register_globa ls = on'...[/color]

              Bad idea, as this is a major security hole.

              S.

              Comment

              • Andy Hassall

                #8
                Re: Help - PHP problems

                On Sun, 01 Aug 2004 22:55:14 +0200, Sebastian Lauwers
                <dacrashanddie@ nospam.9online. fr> wrote:
                [color=blue]
                >Aidan wrote:
                >[color=green]
                >> Set the register_global s directive in the php.ini file to
                >> 'register_globa ls = on'...[/color]
                >
                >Bad idea, as this is a major security hole.[/color]

                Not inherently it isn't. It's only when combined with bad programming
                practices that it can produce a security hole.

                Since it introduces unknown numbers of global variables it is itself a bad
                programming practice, but turning it on does not automatically introduce
                vulnerabilities .

                --
                Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
                <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
                (v1.4.0 new 1st Aug 2004)

                Comment

                • Aidan

                  #9
                  Re: Help - PHP problems

                  Sebastian Lauwers wrote:
                  [color=blue]
                  > Aidan wrote:
                  >[color=green]
                  >> Set the register_global s directive in the php.ini file to
                  >> 'register_globa ls = on'...[/color]
                  >
                  >
                  > Bad idea, as this is a major security hole.
                  >
                  > S.[/color]


                  I know this, but it's the quickest way to get the site working, as it
                  appears that the errors arise due to unset global variables... turn it
                  on, fix the script so it doesn't need it, then turn it back off...

                  Comment

                  • Ryan Miller

                    #10
                    Re: Help - PHP problems

                    Thanks guys,

                    The site is running .... well sortof .... and any one help me with the
                    Script errors at the bottom of the page ??



                    Thanks again to all those who helped.

                    Cheers, Ryan


                    "Ryan Miller" <x@xxxx> wrote in message news:4109ff2f$1 @quokka.wn.com. au...[color=blue]
                    > Geoff,
                    >
                    > Code for std.php
                    >
                    > -----------------------------------------------------
                    > <?php
                    > /*
                    >
                    > require("includ es/sitedef.php");
                    > require("classe s/template.php");
                    > require("classe s/pages.php");
                    > require("classe s/std.php");
                    > include("includ es/printcheck.php" );
                    >
                    > if(isset($page) && file_exists("te mplates/".$page.".tpl") )
                    > {
                    > $tpl_page = new Template("templ ates/".$page.".tpl") ;
                    > $content = $tpl_page->template;
                    > $title = "";
                    > }
                    > elseif($id)
                    > {
                    > $std = new Std("includes/sitedef.php", $id);
                    > require("includ es/security.php");
                    > $std->print = $print;
                    > $content = $std->getPage();
                    > $title = $std->getTitle();
                    > }
                    > else
                    > {
                    > $content = "No page supplied to std.php";
                    > }
                    >
                    > $values = array( "main" => $content, "title" => $title );
                    > $tpl->parse($values) ;
                    > $tpl->output();
                    > ?>
                    >
                    > -----------------------------------------------------------------
                    >
                    > "Geoff Berrow" <blthecat@ckdog .co.uk> wrote in message
                    > news:8atjg0t5qm k1cu989026fduld ft2ieha0j@4ax.c om...[color=green]
                    > > I noticed that Message-ID: <20040730084100 .213ecaa4@lapsv in> from Anders
                    > > K. Madsen contained the following:
                    > >[color=darkred]
                    > > >> Intalled PHP and made the associations in IIS. The page comes up and
                    > > >> reports various PHP errors - please veiew page to see problem.
                    > > >>
                    > > >
                    > > >Hmm, I see no error but one produced in the script std.php, not by PHP
                    > > >itself though, but by the script...[/color]
                    > >
                    > > Me neither. I notice the links have query strings, is there a database
                    > > associated with this site by any chance or is there just a series of
                    > > numbered pages? It may be that the script has been written assuming
                    > > register globals is on (which it won't be on your new install). Try
                    > > looking at what it is doing with the id variable or failing that, post
                    > > the code for std.php in here.
                    > > --
                    > > Geoff Berrow (put thecat out to email)
                    > > It's only Usenet, no one dies.
                    > > My opinions, not the committee's, mine.
                    > > Simple RFDs http://www.ckdog.co.uk/rfdmaker/[/color]
                    >
                    >[/color]


                    Comment

                    Working...