php-windows Digest 21 Dec 2004 14:55:58 -0000 Issue 2514
Topics (messages 25178 through 25190):
How to parse XML in php
25178 by: Pravin-Kumar
25179 by: Jason Barnett
25181 by: Jason Barnett
Re: Timer in Safe Mode
25180 by: Jason Barnett
25184 by: MikeA
25185 by: Jason Barnett
PHP-based survey software?
25182 by: Anne Shroeder
Re: Escaping quotes in form validation
25183 by: Chris
4.3.10 upgrade problem: The specified procedure could not be found.
25186 by: Greg E.
Re: Step by Step on Using PHP5 with mySQL 4.1.17
25187 by: Edin Kadribasic
Re: is exif installed with php for windows?
25188 by: Edin Kadribasic
Re: Problems with require.
25189 by: Jason Barnett
php to ticker problem
25190 by: Ross Hulford
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
hi!
How can i parse a xml file in php. need to do some extension enable or
what? give me some details. i had tried xml_parse() yet but not working :(
i am getting error messages.........
Warning: xml_parse(): Unable to call handler startElement() in
f:\xml\xml.php on line 23
--thanks
pravin d.
--- End Message ---
--- Begin Message ---
Please start a new thread when you ask a new question.
Pravin-Kumar wrote:
hi!
How can i parse a xml file in php. need to do some extension enable or
what? give me some details. i had tried xml_parse() yet but not working :(
i am getting error messages.........
Warning: xml_parse(): Unable to call handler startElement() in
f:\xml\xml.php on line 23
What version of PHP are you using? And do you want to use a DOM parser?
--- End Message ---
--- Begin Message ---
Jason Barnett wrote:
Please start a new thread when you ask a new question.
Pravin-Kumar wrote:
hi!
How can i parse a xml file in php. need to do some extension enable or
what? give me some details. i had tried xml_parse() yet but not
working :(
i am getting error messages.........
Warning: xml_parse(): Unable to call handler startElement() in
f:\xml\xml.php on line 23
Never mind, I should have read your error message better the first time
around...
If you're using the SAX parser then you need to define handler functions
for start and end tags. Did you create a function called startElement
and have it do the work you require of it for start tags? You'll also
need to create the handler for the end tags. See php.net's website for
more info on this.
--- End Message ---
--- Begin Message ---
A timer script? Go check out PEAR's Benchmark package.
--- End Message ---
--- Begin Message ---
Why would I want that? Is that the answer to getting around timeouts? I'm
not sure what you are telling me. Thanks.
Mike
"Jason Barnett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>A timer script? Go check out PEAR's Benchmark package.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Mikea wrote:
Why would I want that? Is that the answer to getting around timeouts? I'm
not sure what you are telling me. Thanks.
Mike
No it is not the answer to timeouts... whoops! All righty well it seems
that you are trying to call set_time_limit but your PHP binary is
running in safe mode? If this is the case then you are SOL... you
either will have to get the administrator to change max_execution_time
as previously mentioned or live with the max time.
Are you certain this is a timeout issue? PHP should run indefinitely up
until the timeout limit unless you have something else that terminates
script execution. There are a lot of things that could be causing
premature termination... including using up too much memory? Try
increasing the memory limit as well... that is, if you want to allow
that to happen :P
--- End Message ---
--- Begin Message ---
Does anyone have recommendations of specific OS software they have used for
constructing surveys? I've been using www.votations.com but it's not all
that satisfactory and my boss wants something that will reside on our server
and not look third party. I've looked through hotscripts but it's always
very hard to tell what is going to be reliable.
Anne
--- End Message ---
--- Begin Message ---
From your minimal details, I assume you're trying to print the value of
a textbox/textarea to a webpage?
You would need to use htmlentities() to escape the quotes if that's the
case.
Chris
S.D.Price wrote:
Hi can anyone help. I have a news blog system where a user can add news
stories to a database. As part of the data validation I indicate when
the user has not entered data correctly and allow then to re-enter data
in a n error prompt form
However if the user has entered quotes the error prompt form does not
display the information correctly. For example if I enter Steven's news
blog in the original form then either steven (non-escaped quotes) or
steven\ (escaped quotes) will appear in the error prompt form. This is
because the html value attribute is ended prematurely.
I can't find any solution to this, can anyone help?
Thanks
Steve
--- End Message ---
--- Begin Message ---
I'm upgrading my 4.3.3 installations to 4.3.10 (due to bugs per SANS
recommendation). In the past, the upgrade process has been smooth - I
simply copied the new files over the top of the old ones, updated php.ini.
restarted IIS and I was done.
When I performed the same procedure this time I get the following error
message when I run my "helloworld.php" test script (and my phpBB site
stopped working):
"The specified procedure could not be found."
Anybody have a clue as to what the problem is?
When I reinstalled the 4.3.3 files into my install folder, php worked again.
- greg e.
--- End Message ---
--- Begin Message ---
"S Kang" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Mick,
>
> Overwrite existing libmysQL.dll to c:\php\libmySQL.dll from C:\Program
> Files\MySQL\MySQL Server 4.1\bin\libmySQL.dll.
No need to do that. PHP comes with libmysql.dll that is identical to one
from mysql distribution.
Edin
--- End Message ---
--- Begin Message ---
In php .zip that you can download from php.net there are two extensions that
you need to enable in order to get exif to work.
Add to your php.ini (in this order)
extension=php_mbstring.dll
extension=php_exif.dll
Edin
"Rob Aldred" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> i am trying to use the exif functions for and image directory, i want to
> display advanced header attributes such as shutter speed and color depth.
>
> I run my own windows servers, installed with plesk.
> it would appear the binary included with plesk doesnt have exif
compiled...
>
> iv never compiled a version myself before... does the binary archive on
> php.net have exif enabled for windows?
>
> Cheers
> Rob
--- End Message ---
--- Begin Message ---
Please do not email me personally; keep your questions on the list.
There are a lot of good reasons for this... most importantly being that
I am not your paid tech support person ;)
S wrote:
Im actually not defining the pear include in my PHP.ini file. Im
defining it in the application itself. the line where i set the include
path is as follows:
$PEAR_DIR = $_SERVER['DOCUMENT_ROOT'] . '/PEAR';
$PHPLIB_DIR = $_SERVER['DOCUMENT_ROOT'] . '/phplib';
$APP_FRAMEWORK_DIR = $_SERVER['DOCUMENT_ROOT'] . '/testing/ch4/class';
$PATH = $PEAR_DIR . ':' .
$PHPLIB_DIR . ':' .
$APP_FRAMEWORK_DIR;
I have tried hard coding the locations rather than using the $_server
call (putting C:\wamp\www\pear) but that did not help.
Any more ideas whats wrong?
Again I say: your seperator is wrong. Use a semicolon instead of a
colon i.e.
$PATH = $PEAR_DIR . ';' . $PHPLIB_DIR . ';' . $APP_FRAMEWORK_DIR;
--- End Message ---
--- Begin Message ---
Here is the code (not mine) what I am trying to so is cut out all the header
info that is included in the message as shown here
http://supercool-74.com/sms/liveticker.php
The message is supposed to be terminated by the "xx" string which is defined
in config.php but it just continues and prints all the header info too.
-------------------------------------------------------------------------------------
<?php
include ("config.php");
$mbox = imap_open ("{".$pop3_server."/pop3:110}INBOX",$mailbox,$password);
$headers = imap_headers ($mbox);
$max = count($headers);
include ("head.php");
echo "<table border=\"0\" cellspacing=\"30\" cellpadding=\"0\">\n";
for ($i = $max; $i > 0; $i--)
{
$header = imap_header ($mbox,$i);
$from = $header->from;
$email = $from[0]->mailbox."@".$from[0]->host;
$date = $header->date;
$date = split(" ",$date);
$structure = imap_fetchstructure ($mbox,$i);
$encoding = $structure->encoding;
if ($endword)
{
$end = strpos(imap_body ($mbox,$i),$endword);
}
if ($startword)
{
$beginning = ereg($startword,imap_body ($mbox,$i));
$start = strpos(imap_body ($mbox,$i),$startword);
if ($end)
{
$body = substr(imap_body
($mbox,$i),$start+strlen($startword),$end-$start-strlen($endword));
}
else
{
$body = substr(imap_body ($mbox,$i),$start+strlen($startword));
}
}
else
{
$beginning = true;
if ($end)
{
$body = substr(imap_body ($mbox,$i),0,$end);
}
else
{
$body = imap_body ($mbox,$i);
}
}
if (in_array ($email,$allowed_senders) && $beginning)
{
if ($date[1] == "1"){$date[1]="01";}
elseif ($date[1] == "2"){$date[1]="02";}
elseif ($date[1] == "3"){$date[1]="03";}
elseif ($date[1] == "4"){$date[1]="04";}
elseif ($date[1] == "5"){$date[1]="05";}
elseif ($date[1] == "6"){$date[1]="06";}
elseif ($date[1] == "7"){$date[1]="07";}
elseif ($date[1] == "8"){$date[1]="08";}
elseif ($date[1] == "9"){$date[1]="09";}
if ($date[2] == "Jan"){$date[2]="01";}
elseif ($date[2] == "Feb"){$date[2]="02";}
elseif ($date[2] == "Mar"){$date[2]="03";}
elseif ($date[2] == "Apr"){$date[2]="04";}
elseif ($date[2] == "May"){$date[2]="05";}
elseif ($date[2] == "Jun"){$date[2]="06";}
elseif ($date[2] == "Jul"){$date[2]="07";}
elseif ($date[2] == "Aug"){$date[2]="08";}
elseif ($date[2] == "Sep"){$date[2]="09";}
elseif ($date[2] == "Oct"){$date[2]="10";}
elseif ($date[2] == "Nov"){$date[2]="11";}
elseif ($date[2] == "Dec"){$date[2]="12";}
// Decode quoted printable and base64 encoding and coding HTML special
charakters
if ($encoding == 4)
{
$body = htmlentities(quoted_printable_decode($body), ENT_QUOTES);
}
elseif ($encoding == 3)
{
$body = htmlentities(base64_decode($body), ENT_QUOTES);
}
else
{
$body = htmlentities($body, ENT_QUOTES);
}
// Line breaks
$body = eregi_replace("\*br","\n<br>",$body);
echo "<tr>\n";
echo "<td nowrap valign=\"top\"><b>".$date[0]."
".$date[1].".".$date[2].".".$date[3]."<br>\n".$date[4]."</b></td>\n";
echo "<td valign=\"top\">+++ ".$body." +++</td>\n</tr>\n";
$beginning = false;
}
}
echo "</table>\n";
// Copyright reference must not be removed:
?>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"> </td>
<td> </td>
</tr>
</table>
<?php
imap_close ($mbox);
// Link to admin page
echo "<p> </p>";
echo "<p><a href=\"admin.php\">=> Admin</a></p>";
include ("foot.htm");
--- End Message ---