Loading ...
Sorry, an error occurred while loading the content.
 

Parse error: Expecting `T_CONSTANT_ENCAPSED_STRING'

Expand Messages
  • Shantanu Kumar
    Hi all, Recently I got this error message when I tried executing an uploaded PHP script on a webserver: Parse error: parse error, expecting
    Message 1 of 13 , Aug 11, 2003
      Hi all,

      Recently I got this error message when I tried
      executing an uploaded PHP script on a webserver:

      Parse error: parse error, expecting
      `T_CONSTANT_ENCAPSED_STRING' in script_name.php at
      line ...

      All I was trying to do is as follows (to which the
      error message points):

      require_once($another_php_script_filename)

      What could have been my error?

      Regards and TIA,
      Shantanu


      __________________________________
      Do you Yahoo!?
      Yahoo! SiteBuilder - Free, easy-to-use web site design software
      http://sitebuilder.yahoo.com
    • Ajith C
      Hi ... think u missed the ; Ajith
      Message 2 of 13 , Aug 11, 2003
        Hi

        > require_once($another_php_script_filename);

        think u missed the ;

        Ajith
      • Shantanu Kumar
        No, I didn t. I just mentioned it on the list without a semicolon there. BTW, it started behaving funny only after I uploaded it onto an IBM-AIX running
        Message 3 of 13 , Aug 12, 2003
          No, I didn't. I just mentioned it on the list without a semicolon there. BTW, it started behaving funny only after I uploaded it onto an IBM-AIX running Apache/PHP. It's not giving any strange messages when I ran it successfully on my Red Hat Linux 9.

          Regards,
          Shantanu

          Ajith C <ajc377@...> wrote:
          Hi

          > require_once($another_php_script_filename);

          think u missed the ;

          Ajith


          ---------------------------------
          Do you Yahoo!?
          Yahoo! SiteBuilder - Free, easy-to-use web site design software

          [Non-text portions of this message have been removed]
        • Dr Tarique Sani
          ... Do an echo $another_php_script_filename If that is returning the correct file name then see if PHP has got permissions to open that file from that location
          Message 4 of 13 , Aug 12, 2003
            On Tue, 12 Aug 2003, Shantanu Kumar wrote:

            > > require_once($another_php_script_filename);

            Do an echo $another_php_script_filename

            If that is returning the correct file name then see if PHP has got
            permissions to open that file from that location

            HTH

            Tarique

            --
            ===================================================================
            PHP Applications for E-Biz: http://www.sanisoft.com -o)
            /\\
            Indian PHP User Group: http://groups.yahoo.com/group/in-phpug _\_v
            ===================================================================
          • Paul Alapatt
            This, Might have nothing to do with it per se. But could you simply enclose the same in a Require( $variable_name ); Fashion? Take care, Paul Alapatt
            Message 5 of 13 , Aug 12, 2003
              This,

              Might have nothing to do with it per se.

              But could you simply enclose the same in a

              Require("$variable_name");

              Fashion?

              Take care,
              Paul Alapatt
              ~~~~~~~~~~~~~~~~~~~~~~
              Mo: +91-(0)-9820187987
              Fax: +91-022-26603643
              ~~~~~~~~~~~~~~~~~~~~~~



              http://www.bernardlabs.com
              Awaken to the future!
              _____________________________________________________________________

              This e-mail message may contain proprietary, confidential or legally
              privileged information for the sole use of the person or entity to whom
              this message was originally addressed. Any review, e-transmission
              dissemination or other use of or taking of any action in reliance upon
              this information by persons or entities other than the intended
              recipient is prohibited. If you have received this e-mail in error
              kindly delete this e-mail from your records. If it appears that this
              mail has been forwarded to you without proper authority, please notify
              us immediately at admin@... and delete this mail.
              _____________________________________________________________________




              -----Original Message-----
              From: Shantanu Kumar [mailto:shantanu_k06@...]
              Sent: Tuesday, August 12, 2003 2:09 PM
              To: in-phpug@yahoogroups.com
              Subject: Re: [in-phpug] Parse error: Expecting
              `T_CONSTANT_ENCAPSED_STRING'


              No, I didn't. I just mentioned it on the list without a semicolon there.
              BTW, it started behaving funny only after I uploaded it onto an IBM-AIX
              running Apache/PHP. It's not giving any strange messages when I ran it
              successfully on my Red Hat Linux 9.

              Regards,
              Shantanu

              Ajith C <ajc377@...> wrote:
              Hi

              > require_once($another_php_script_filename);

              think u missed the ;

              Ajith


              ---------------------------------
              Do you Yahoo!?
              Yahoo! SiteBuilder - Free, easy-to-use web site design software

              [Non-text portions of this message have been removed]



              Read Posting Guidelines at
              http://groups.yahoo.com/group/in-phpug/files/guidelines.html
              To unsubscribe from this group, send an email to:
              in-phpug-unsubscribe@yahoogroups.com



              Your use of Yahoo! Groups is subject to
              http://docs.yahoo.com/info/terms/
            • Shantanu Kumar
              ... Heavens! It worked when I substituted require_once() with require(). (Though I am clueless as to what wrong must I have done to face this.) But now, all
              Message 6 of 13 , Aug 12, 2003
                --- Paul Alapatt <a.paul@...> wrote:
                > This,
                >
                > Might have nothing to do with it per se.
                >
                > But could you simply enclose the same in a
                >
                > Require("$variable_name");
                >
                > Fashion?

                Heavens! It worked when I substituted require_once()
                with require(). (Though I am clueless as to what wrong
                must I have done to face this.) But now, all sorts of
                unexpected errors are cropping up. It no more
                recognizes $HTTP_SERVER_VARS['REQUEST_URI'] as a
                defined index (ERROR: Undefined index). Nor does it
                support ($HTTP_GET_VARS + $HTTP_POST_VARS) expression
                anymore (ERROR: Unsupported operand type).

                Is it because the version I am now testing on is a
                very old (read 'primitive') PHP4 ?

                Regards,
                Shantanu


                __________________________________
                Do you Yahoo!?
                Yahoo! SiteBuilder - Free, easy-to-use web site design software
                http://sitebuilder.yahoo.com
              • d.k.jariwala (JD)
                Hi Shantanu, Are you using PHP v. 4.0.2 by any chance? If yes, this is a known bug. Check http://bugs.php.net/bug.php?id=6814 If you are using later version of
                Message 7 of 13 , Aug 12, 2003
                  Hi Shantanu,

                  Are you using PHP v. 4.0.2 by any chance? If yes, this is a known bug.
                  Check http://bugs.php.net/bug.php?id=6814

                  If you are using later version of PHP, check lines before the line where you are getting error. One of them might be missing semi colon.

                  Btw, this is my first mail on Indian PHP blug! So a BIG hi to everybody!
                  My name is JD and I have been programming in PHP for almost 3 years now. I was mostly active on Devshed Forums earlier, with id 'JDK'. Before new company took over Devshed, I was moderator at Devshed forums.

                  I just recently came to know about this group and I am really excited to be part of it. Will be great to interact with fellow indian PHP lovers! :)

                  I am currently in Mangalore and would like to know if there are any developers from Mangalore hanging on this group!

                  Regards,
                  JD



                  __________________________________________
                  d.k.jariwala (JD)
                  scripting freak!
                  http://www.phpkid.org


                  ---------------------------------
                  Do you Yahoo!?
                  Yahoo! SiteBuilder - Free, easy-to-use web site design software

                  [Non-text portions of this message have been removed]
                • d.k.jariwala (JD)
                  Hi Shantanu, I guess you are affected by the bug which I mentioned in my earlier mail! Please upgrade your PHP! As such, PHP 4.1.x has lot of improvements over
                  Message 8 of 13 , Aug 12, 2003
                    Hi Shantanu,
                    I guess you are affected by the bug which I mentioned in my earlier mail! Please upgrade your PHP!
                    As such, PHP 4.1.x has lot of improvements over PHP 4.0.x!
                    All the best,
                    Regards,
                    JD


                    Shantanu Kumar <shantanu_k06@...> wrote:

                    --- Paul Alapatt <a.paul@...> wrote:
                    > This,
                    >
                    > Might have nothing to do with it per se.
                    >
                    > But could you simply enclose the same in a
                    >
                    > Require("$variable_name");
                    >
                    > Fashion?

                    Heavens! It worked when I substituted require_once()
                    with require(). (Though I am clueless as to what wrong
                    must I have done to face this.) But now, all sorts of
                    unexpected errors are cropping up. It no more
                    recognizes $HTTP_SERVER_VARS['REQUEST_URI'] as a
                    defined index (ERROR: Undefined index). Nor does it
                    support ($HTTP_GET_VARS + $HTTP_POST_VARS) expression
                    anymore (ERROR: Unsupported operand type).

                    Is it because the version I am now testing on is a
                    very old (read 'primitive') PHP4 ?

                    Regards,
                    Shantanu


                    __________________________________
                    Do you Yahoo!?
                    Yahoo! SiteBuilder - Free, easy-to-use web site design software
                    http://sitebuilder.yahoo.com

                    Yahoo! Groups SponsorADVERTISEMENT

                    Read Posting Guidelines at
                    http://groups.yahoo.com/group/in-phpug/files/guidelines.html
                    To unsubscribe from this group, send an email to:
                    in-phpug-unsubscribe@yahoogroups.com



                    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



                    __________________________________________
                    d.k.jariwala (JD)
                    scripting freak!
                    http://www.phpkid.org


                    ---------------------------------
                    Do you Yahoo!?
                    Yahoo! SiteBuilder - Free, easy-to-use web site design software

                    [Non-text portions of this message have been removed]
                  • Dr Tarique Sani
                    ... It will help you if you read which version supports what functions Also look at the output of phpinfo() - that also provides a whole lot of clues HTH
                    Message 9 of 13 , Aug 12, 2003
                      On Tue, 12 Aug 2003, Shantanu Kumar wrote:

                      > Heavens! It worked when I substituted require_once()
                      > with require(). (Though I am clueless as to what wrong
                      > must I have done to face this.) But now, all sorts of

                      It will help you if you read which version supports what functions

                      Also look at the output of phpinfo() - that also provides a whole lot of
                      clues

                      HTH
                      Tarique

                      --
                      ===================================================================
                      PHP Applications for E-Biz: http://www.sanisoft.com -o)
                      /\\
                      Indian PHP User Group: http://groups.yahoo.com/group/in-phpug _\_v
                      ===================================================================
                    • Paul Alapatt
                      Yes Shantanu, Please Upgrade to the latest Stable version of PHP.net, I believe that should put it to rest. Take care, Paul Alapatt ~~~~~~~~~~~~~~~~~~~~~~ Mo:
                      Message 10 of 13 , Aug 12, 2003
                        Yes Shantanu,

                        Please Upgrade to the latest Stable version of PHP.net,

                        I believe that should put it to rest.

                        Take care,
                        Paul Alapatt
                        ~~~~~~~~~~~~~~~~~~~~~~
                        Mo: +91-(0)-9820187987
                        Fax: +91-022-26603643
                        ~~~~~~~~~~~~~~~~~~~~~~



                        http://www.bernardlabs.com
                        Awaken to the future!
                        _____________________________________________________________________

                        This e-mail message may contain proprietary, confidential or legally
                        privileged information for the sole use of the person or entity to whom
                        this message was originally addressed. Any review, e-transmission
                        dissemination or other use of or taking of any action in reliance upon
                        this information by persons or entities other than the intended
                        recipient is prohibited. If you have received this e-mail in error
                        kindly delete this e-mail from your records. If it appears that this
                        mail has been forwarded to you without proper authority, please notify
                        us immediately at admin@... and delete this mail.
                        _____________________________________________________________________




                        -----Original Message-----
                        From: Shantanu Kumar [mailto:shantanu_k06@...]
                        Sent: Wednesday, August 13, 2003 12:12 AM
                        To: in-phpug@yahoogroups.com
                        Subject: RE: [in-phpug] Parse error: Expecting
                        `T_CONSTANT_ENCAPSED_STRING'



                        --- Paul Alapatt <a.paul@...> wrote:
                        > This,
                        >
                        > Might have nothing to do with it per se.
                        >
                        > But could you simply enclose the same in a
                        >
                        > Require("$variable_name");
                        >
                        > Fashion?

                        Heavens! It worked when I substituted require_once()
                        with require(). (Though I am clueless as to what wrong
                        must I have done to face this.) But now, all sorts of unexpected errors
                        are cropping up. It no more recognizes $HTTP_SERVER_VARS['REQUEST_URI']
                        as a defined index (ERROR: Undefined index). Nor does it support
                        ($HTTP_GET_VARS + $HTTP_POST_VARS) expression anymore (ERROR:
                        Unsupported operand type).

                        Is it because the version I am now testing on is a
                        very old (read 'primitive') PHP4 ?

                        Regards,
                        Shantanu


                        __________________________________
                        Do you Yahoo!?
                        Yahoo! SiteBuilder - Free, easy-to-use web site design software
                        http://sitebuilder.yahoo.com


                        Read Posting Guidelines at
                        http://groups.yahoo.com/group/in-phpug/files/guidelines.html
                        To unsubscribe from this group, send an email to:
                        in-phpug-unsubscribe@yahoogroups.com



                        Your use of Yahoo! Groups is subject to
                        http://docs.yahoo.com/info/terms/
                      • Shantanu Kumar
                        Hi JDK, Paul and Dr Sani, Thanks a lot for your replies and helping me to learn to check the PHP-version before feeling surprised. I discovered that the server
                        Message 11 of 13 , Aug 13, 2003
                          Hi JDK, Paul and Dr Sani,

                          Thanks a lot for your replies and helping me to learn
                          to check the PHP-version before feeling surprised. I
                          discovered that the server I am now trying to run my
                          PHP scripts on runs PHP 4.0.0 (you may like to check
                          for yourself: http://zetty.port5.com/phpinfo.php).

                          I don't have any control over their server and as to
                          what version of PHP they'd want to stick to. So,
                          probably I'll look for some other place where they
                          have a newer version or well, wait until they update
                          it for good.

                          Nevertheless, yet another important lesson in PHP. :-)

                          Regards,
                          Shantanu


                          __________________________________
                          Do you Yahoo!?
                          Yahoo! SiteBuilder - Free, easy-to-use web site design software
                          http://sitebuilder.yahoo.com
                        Your message has been successfully submitted and would be delivered to recipients shortly.