ID: 14623
Updated by: elixer
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Strings related
Operating System: linux
PHP Version: 4.0.6
Assigned To: elixer
New Comment:

When I wrote "useful code" I was assuming that something in your working code was 
causing get_meta_tags() to stop parsing the document.

I have since downloaded and tested with 4.0.6 and 4.1.0.  I have the same problem on 
4.0.6 on my redhat box.  4.1.0 seems to have fixed the problem and the latest CVS also 
works properly.

Closing this as its since been fixed.

Sean

Previous Comments:
------------------------------------------------------------------------

[2001-12-22 06:20:09] [EMAIL PROTECTED]

The code example shows the problem on my PHP 4.0.6 (redhat distr) - if you add the 110 
lines print_r() shows an empty array, if you delete half of it the headerinfo is 
there.
Yes it is a memory eater, but the only purpose was to have a reproducable and simple 
example ... next time I will make a usefull example - telling jokes or something :).
If you look in the C source - is the whole file been read?
Can the # of bytes read be os/config (default blocksize)dependent?
Have you tried it with more memory eating xxx's?
Or it might be solved in 4.1.0 (CVS)?

Jeroen

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

[2001-12-21 19:15:52] [EMAIL PROTECTED]

That example works fine here from the local CVS.  I don't think it has anything to do 
with PHP code being at the top of the page.  My wager is that you have _useful_ code 
that is breaking get_meta_tags, my guess is that the code contains the string "</head" 
in it somewhere.  Does this example piece of code actually not work on your setup?  
All it seems to do is waste memory :)

Sean

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

[2001-12-21 05:48:23] [EMAIL PROTECTED]

The way I use it is quite different:

When a file is parsed it is 'wrapped': a prepended wrapper opens the file and layouts 
it.
Based on the meta tags a layout is choosen, menus added, header defined, etc.
This way the content exists out of plain HTML files that are build into the vieuwed 
pages when parsed.
(That can differ for showing, printing, spiders, ... all with the same content - that 
is easy to maintain even by dummies :).)

Jeroen.




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

[2001-12-21 05:31:20] [EMAIL PROTECTED]

Just a note... why would you want to do get_meta_tags on a non parsed file? I think 
it's makes way more sense to use g_m_t on a parsed file.

Derick

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

[2001-12-21 05:29:12] [EMAIL PROTECTED]

<?

$s = "
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
... repeat this for about 110 lines of 80 'x'-es
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
";

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
        <title>Failing get_meta_tags</title>
  <META NAME="subject" CONTENT="mySubject">
  <META NAME="keywords" CONTENT="myKeywords">
  <link rel="stylesheet" href="mysheet.css">
</head>

<body>
GET_META_TAGS:
<?
print_r( get_meta_tags( $HTTP_SERVER_VARS["PATH_TRANSLATED"]));
?>
</body>
</html>


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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/?id=14623


Edit this bug report at http://bugs.php.net/?id=14623&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to