Peter Houchin | 1 Oct 2002 01:16
Picon

RE: .php to .html?


> >
> >AddType application/x-httpd-php .php4 .php .htm .php3 .html
> >
> >anything you put in that line will be passed through php
>
> can't you just type .php* instead of .php4 .php3 .php a.s.o, or is that
> beyond Apache's abilities???
>
> haven't tried it ... but'd suggestive thinking says it's possible...
>
> Rene
>

Don't know to be honest some one on the list may have tried it and may be
able to spread more light on this...

Cheers
Peter

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Steve Keller | 1 Oct 2002 01:41

Re: Including Text File in PHP/HTML Template

At 9/30/2002 04:39 AM, Rick Beckman wrote:

>On line "6", I have the list of musicians in the song.
>Example (ignore the quotes): "Doyle Lawson -- lead vocal; Dale Perry -- bass
>vocal"
>Is there a way to make it so that, when I include line 6 in my PHP template,
>the ";" will be replaced with a line break so I get one musician per line in
>the HTML output?

$line6 = str_replace(";", "\n", $line6);

If you're talking about HTML line breaks,  just substitute <br /> for \n.

>Lines 7 and so on are the lyrics. The text file has one line per line (makes
>sense, right?) and a blank line between sections of the song. I have the
>script set up to read all the lines from 7 on, but it jumbles them all
>together, ignoring the line breaks. Is there a way to script PHP to add the
>line breaks, or should the line break HTML just be inserted everywhere
>needed in all my separate files?

Where is this jumbling that you're talking about, in your HTML display? 
HTML browsers don't recognize line-break escape characters. Yes, you would 
need <br /> if you want it to display in HTML. As far as the browser's 
concerned, there's no difference between HTML served cold and HTML 
generated by PHP.

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(Continue reading)

Daren Cotter | 1 Oct 2002 01:38
Picon
Favicon

Regular Expression

I need a regular expression to verify various inputs
on my form. I know the base case of:

"^[a-zA-Z0-9]+$"

matches any letter or number. I'm looking for various
input from the list as to what characters should be
allowed in the following fields:

Name: I would think -, ', and space for sure. Anything
else I don't know. I don't know how to write the
expression for this though. I tried escaping the -
like \-, but that doesn't work.

Street Address: Same as above, with #

City: Just '  ??

As I said, I'm looking for input, and how to actually
write these expressions.

TIA all!

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--

-- 
PHP General Mailing List (http://www.php.net/)
(Continue reading)

[-^-!-%- | 1 Oct 2002 01:40
Picon

MSSQL_ERROR() ?


Is there an SQL Server quivalent function, to the mysql_error()
function-available for msyql?

If not, then how do you retrieve the db error for an SQL Server error?

-j

=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Steve Keller | 1 Oct 2002 01:52

Re: vulnerabilities??

At 9/30/2002 06:17 PM, you wrote:

>Is there any version of php and apache for which there are no known
>vulnerabilities??

It's the vulnerabilities you don't know about that get you.

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skeller <at> healthtvchannel.org
Web: www.healthtvchannel.org

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Brad Bonkoski | 1 Oct 2002 01:56
Picon

Re: vulnerabilities??

Is there such a thing of a software package with no vulnerabilities
and/or bugs??  (Windows perhaps :-)
The advantage to apache/php is the ability to quickly address those
problems once found.
-Brad

Steve Keller wrote:

> At 9/30/2002 06:17 PM, you wrote:
>
> >Is there any version of php and apache for which there are no known
> >vulnerabilities??
>
> It's the vulnerabilities you don't know about that get you.
>
> --
> S. Keller
> UI Engineer
> The Health TV Channel, Inc.
> (a non - profit organization)
> 3820 Lake Otis Pkwy.
> Anchorage, AK 99508
> 907.770.6200 ext.220
> 907.336.6205 (fax)
> Email: skeller <at> healthtvchannel.org
> Web: www.healthtvchannel.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
(Continue reading)

John W. Holmes | 1 Oct 2002 02:13
Favicon

RE: SV: Quickie

> Another thing - the first time the page is loaded every link on the
page
> gets a '?PHPSESSID=...etc...' attached to itself. But only the first
time.
> It dissapears after the first click i make.

Do you have a session_start() on the page? It looks like you have a
trans_sid enabled. PHP will add that to all of your URLs automatically.
Can you disable it in php.ini?

---John Holmes...

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Bob Irwin | 1 Oct 2002 02:51
Picon

Multiple Tables Select

G'day,

Hoping someone can help me with a mysql select statement.

I have two tables that I am trying to do a select on.  The basic table
details are below.

table name: time

 |   ID   |   timefinished    |   status   |
 |    1    |   1000000001  |    C   |

table name: details

| sid | completedby |
|  1  |   bob             |

sid and ID are always the same corresponding value (one is inserted based on
the other).  What I am trying to do is do a select based on the current date
and status and then by who it was completed by.  What I have is...

select * from time, details where time.timefinished between '1000000000' and
'1000000002' and time.status='C' and details.completedby='bob' and time.ID =
details.sid;

What I am getting is not accurated, it just seems to grab the one entry,
which is correct, but there are 3 entries that fall within the range I am
trying to select on.

Any ideas what I'm doing wrong?
(Continue reading)

Tom Rogers | 1 Oct 2002 03:00

Re: xml encodeing with new_xmldoc("1.0");

Hi,

Monday, September 30, 2002, 10:54:25 PM, you wrote:
DÖJ> I need to apply iso-8859-1 encodeing to the <?xml version=”1.0”?> that
DÖJ> this function creates: 
DÖJ> new_xmldoc(“1.0”). 
DÖJ> I tried to replace the line but ofcourse the new_xmldoc function creates
DÖJ> object-tree of the document and I don’t know I can reffrer to
DÖJ> the first line, or <?xml version=”1.0”?> or just create the document
DÖJ> with the encodeing

DÖJ> Thanks, David

One way to force it:
<?
ob_start();
echo '<?xml version="1.0" encoding="iso-8859-1"?><root/>';
$buffer = ob_get_contents();
ob_end_clean();
$dom = domxml_open_mem($buffer);
echo '<pre>';
echo htmlentities($dom->dump_mem(true));
echo '</pre>';
?>

When it saves the document it should then convert to iso-8859-1
Just make '<root/>' whatever the root element will be.

--

-- 
regards,
(Continue reading)

John W. Holmes | 1 Oct 2002 03:21
Favicon

RE: Regular Expression

> I need a regular expression to verify various inputs
> on my form. I know the base case of:
> 
> "^[a-zA-Z0-9]+$"
> 
> matches any letter or number. I'm looking for various
> input from the list as to what characters should be
> allowed in the following fields:
> 
> Name: I would think -, ', and space for sure. Anything
> else I don't know. I don't know how to write the
> expression for this though. I tried escaping the -
> like \-, but that doesn't work.

Allow a period, too, for names like "St. Laurent"
"^[-a-zA-Z0-9' .]+$"

> Street Address: Same as above, with #

Again, periods for "Ave."
"^[-a-zA-Z0-9#' .]+$"

> City: Just '  ??

I'd allow space and period, too, for "Ft. Gordon" for example.

"^[-a-zA-Z0-9' .]+$"

> As I said, I'm looking for input, and how to actually
> write these expressions.
(Continue reading)


Gmane