[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] PHP include() error...RAQ3 problem?



On Sun, 27 Aug 2000, Cobalt wrote:

> I recently installed PHP3 on my system.  I am trying to use include()
> statements and I am receiving the following error:
> 
> "Parse error: parse error in /home/sites/site22/web/directory/file.php3 on
> line 16"
> 
> My code looks similar to this:
> 
> <html>
> <body>
> 
> <?php
> 	include("http://www.server.com/file.html";);
> ?>

I take it line 16 is the line with the include() statement?  It looks
properly formatted.  Read the first paragraph on
http://www.php.net/manual/function.include.php.  It may apply to you,
though I'm not familiar with the configuration option mentioned.  Also,
make sure you aren't missing a ";" or "}" or something similiar on a line
before the include() statement.

> The line that is receiving the parse error is the line after the </html>
> tag.  It does not look to be a programming error but some kind of
> configuration error.  I have been going back and forth on the PHP mailing
> list and it looks like my syntax and programming is correct.

Scott, have you done any testing to ensure that you can include a file
using a URL?  Create a PHP script that only has an include() statement and
include a URL that just has something like "<b>Bold text</b>" in it.  If
it doesn't work then you probably are just unable to include a file using
a URL.  I just tested on a RaQ2 running PHP4.0.1pl2 and I'm able to
include a file using a URL.  I never tried using PHP3.  As an alternative
you can use fopen() and fgets() to achieve the same thing as include().

> Does anyone know of any issues with PHP3 on a RAQ3?

No.  If include() isn't working as desired I don't think it's RaQ-related.

> It seems to work well
> for most functions I have used so far.

It won't work for a few others, but that's because they weren't introduced
until PHP4.

> include() seems to be the one that
> is giving me problems.  And of course it is the one I plan to use the most.

include() does work when using a local path instead of a URL, right?

--
Steven Werby {steven-lists@xxxxxxxxxxxx}