Re: [PHP-WIN] Mixing include path styles. How do I do this???

2002-10-24 Thread Brian McGarvie
if your including plain HTML with no php in it then it's quicker to use
readfile()...

"Roderick Martin" <[EMAIL PROTECTED]> wrote in message
news:45763EEA-E6A8-11D6-A0B1-0030653D8C1C@;network23.com...
> My bad! Windows is definitely not a strong suit with me. I did not know
> I could do the drive paths with the reverse slashes. I tried it and it
> worked flawlessly! Thank you!!!
>
> All I have to do now is add the drive path up to the web directory to
> the replace.
>
> Thanks again! Easier than I could have hoped for.
>
> Rod
>
> On Wednesday, October 23, 2002, at 10:13  AM, Rich Gray wrote:
>
> > Roderick
> >
> > Have you tried just changing '/acc/includes/headstart.htm' to
> > 'c:/acc/includes/headstart.htm'? i.e. leaving the unix style slashes in
> > place...
> >
> > There is a nasty bug in the latest versions of PHP on Win32 affecting
> > the
> > include statement with absolute paths.
> > The above is a workaround solution - once the bug is fixed you should
> > be
> > able to remove the 'c:' stuff.
> >
> > HIW!
> > Rich
> > -Original Message-
> > From: Roderick Martin [mailto:maillist@;network23.com]
> > Sent: 23 October 2002 15:43
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Mixing include path styles. How do I do this???
> >
> >
> > We recently switched from Netscape Enterprise to IIS and I now need to
> > make a lot of changes to over 600 htmls - mostly in include statements.
> > We're doing two things here, switching servers and switching all our
> > SSI's to PHP includes.
> >
> > Under Enterprise, I could define a path just by putting it into the
> > include from the root, ie:
> >
> > 
> >
> > I used a global Find and Replace app to change all these (each html has
> > about eight includes) to:
> >
> > 
> >
> > and now they don't work. If I replace the whole path with a Windows
> > path structure (C:\...) to the included file, it does work.
> >
> > Here's the problem as I see it. I can easily do another Find and
> > Replace to add in the first part of the directory tree to the web
> > directory. What I cannot easily do is change the "/" to "\" inside the
> > path for the part of the path that's already there.
> >
> > Is there some way to define the path to the web directory using "\",
> > maybe in a variable and then somehow/way switch over to "/" so I don't
> > have to mess with the paths I already have?
> >
> > Or maybe there's a solution I'm not even aware of. Thank you.
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>



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




RE: [PHP-WIN] Speed

2002-10-24 Thread Svensson, B.A.T. (HKG)
You might wont to have a look at sparse system and
see if it possible in your case to use them.

See: http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookcpdf/c2-7.pdf

This gives a brief theoretical overview of the possibilities.


> -Original Message-
> From: Mihail Bota [mailto:mbota@;almaak.usc.edu]
> Sent: Wednesday, October 23, 2002 9:25 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Speed
> 
> 
> Dear all,
> 
> I have a piece of code which posts a matrix which can be from 1X1
> dimension to...the sky is the limit (can be 500X500). In this piece of
> code I have 2 while loops, nested, which I cannot get rid of..
> I'd like to ask you for any suggestions to optimize the posting of the
> matrix..I already put in action zend optimizer, ---with mm option...
> Where/what should I tweak more, in order to make the whole thing faster. I
> am running the system on Win 2k, therefore I cannot use Zend accelerator.
> 
> Thanks.
> 
> Mihai
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP-WIN] COM gurus... please help

2002-10-24 Thread Asendorf, John
Hello all,

PHP 4.2.3, NT4, IIS4

I finally have a practical application to use COM and I'm trying to port
some ASP scripting.  I'm getting an error (Warning: Invoke() failed:
Exception occurred. Source: Unavailable Description: Unavailable in
D:\spoof\gis\file.php on line 66 and then the timeout error).  The second
uncommented line is line 66 ($objMapSvr = ...).  If someone knows the ASP
code, it's commented above the PHP lines.  Any help would be appreciated.
The ASP file runs fine.  I have a feeling once I get past this hump... the
rest should run smoothly.  Thanks,  John

//Set objMapSvrMngr = Server.CreateObject("GMWebMap.MapServerManager")
$objMapSvrMngr = new COM("GMWebMap.MapServerManager") or die("Couldn't
create COM");

//set objMapSvr = objMapSvrMngr.MapServer("")
$objMapSvr = $objMapSvrMngr->MapServer("");
  

-
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit

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




Re: [PHP-WIN] COM gurus... please help

2002-10-24 Thread Scott Carr
What are you trying to use?  MapServer, what is that.  If you are trying to do
web mappin, I suggest you look at the MapServer project from University Of M...
at http://mapserver.gis.umn.edu/.  It is a very good mapping system that uses
ESRI Shp files as well as several others.  

It also has a direct PHP interface for it as well.
-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting "Asendorf, John" <[EMAIL PROTECTED]>:

> Hello all,
> 
> PHP 4.2.3, NT4, IIS4
> 
> I finally have a practical application to use COM and I'm trying to port
> some ASP scripting.  I'm getting an error (Warning: Invoke() failed:
> Exception occurred. Source: Unavailable Description: Unavailable in
> D:\spoof\gis\file.php on line 66 and then the timeout error).  The second
> uncommented line is line 66 ($objMapSvr = ...).  If someone knows the ASP
> code, it's commented above the PHP lines.  Any help would be appreciated.
> The ASP file runs fine.  I have a feeling once I get past this hump... the
> rest should run smoothly.  Thanks,  John
> 
> //Set objMapSvrMngr = Server.CreateObject("GMWebMap.MapServerManager")
> $objMapSvrMngr = new COM("GMWebMap.MapServerManager") or die("Couldn't
> create COM");
> 
> //set objMapSvr = objMapSvrMngr.MapServer("")
> $objMapSvr = $objMapSvrMngr->MapServer("");
>   
> 
> -
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-
This mail sent through IMP: http://horde.org/imp/

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




RE: [PHP-WIN] COM gurus... please help

2002-10-24 Thread Asendorf, John
I'm trying to work with Intergraph's Geomedia WepMap Server...  I'll check
that out.  

-
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -Original Message-
> From: Scott Carr [mailto:scarr@;progbits.com]
> Sent: Thursday, October 24, 2002 10:08 AM
> To: Asendorf,John
> Cc: PHP Windows
> Subject: Re: [PHP-WIN] COM gurus... please help
> 
> 
> What are you trying to use?  MapServer, what is that.  If you 
> are trying to do
> web mappin, I suggest you look at the MapServer project from 
> University Of M...
> at http://mapserver.gis.umn.edu/.  It is a very good mapping 
> system that uses
> ESRI Shp files as well as several others.  
> 
> It also has a direct PHP interface for it as well.
> -- 
> Scott Carr
> OpenOffice.org
> Documentation Maintainer
> http://documentation.openoffice.org/
> 
> 
> Quoting "Asendorf, John" <[EMAIL PROTECTED]>:
> 
> > Hello all,
> > 
> > PHP 4.2.3, NT4, IIS4
> > 
> > I finally have a practical application to use COM and I'm 
> trying to port
> > some ASP scripting.  I'm getting an error (Warning: Invoke() failed:
> > Exception occurred. Source: Unavailable Description: Unavailable in
> > D:\spoof\gis\file.php on line 66 and then the timeout 
> error).  The second
> > uncommented line is line 66 ($objMapSvr = ...).  If someone 
> knows the ASP
> > code, it's commented above the PHP lines.  Any help would 
> be appreciated.
> > The ASP file runs fine.  I have a feeling once I get past 
> this hump... the
> > rest should run smoothly.  Thanks,  John
> > 
> > //Set objMapSvrMngr = 
> Server.CreateObject("GMWebMap.MapServerManager")
> > $objMapSvrMngr = new COM("GMWebMap.MapServerManager") or 
> die("Couldn't
> > create COM");
> > 
> > //set objMapSvr = objMapSvrMngr.MapServer("")
> > $objMapSvr = $objMapSvrMngr->MapServer("");
> >   
> > 
> > -
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> > Nullum magnum ingenium sine mixtura dementiae fuit
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> > 
> 
> 
> -
> This mail sent through IMP: http://horde.org/imp/
> 

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




php-windows Digest 24 Oct 2002 14:14:04 -0000 Issue 1404

2002-10-24 Thread php-windows-digest-help

php-windows Digest 24 Oct 2002 14:14:04 - Issue 1404

Topics (messages 16518 through 16525):

Re: Oracle IAS version of Apache (1.3.12) & php_oci8.dll
16518 by: Philippe Saladin

Re: Print data
16519 by: Brian McGarvie
16522 by: J Wynia

Re: Mixing include path styles. How do I do this???
16520 by: Brian McGarvie

Re: Speed
16521 by: Svensson, B.A.T. (HKG)

COM gurus... please help
16523 by: Asendorf, John
16524 by: Scott Carr
16525 by: Asendorf, John

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 ---
- is your "oracle client" installed on your server ?

- you may have a look to extension_dir in your php.ini.
By default, I think it is something like
extension_dir = ./
You would try to set the value to the directory where your php_oci8.dll is,
something like :
extension_dir=C:\php\extensions\

Regards,
Philippe



--- End Message ---
--- Begin Message ---
an alternative I'm looking into is simply writing/formatting the data into a
text file, then using the good old 'net print' dos command to print the
file...

"José Moreira" <[EMAIL PROTECTED]> wrote in message
news:1035381924.1052.8.camel@;inf4.pt...
> hello, at my company we have several network printers and i was was
> wondering if it's possible to print directly to them using PHP, instead
> of showing on the screen or both ...
> to gain more control on what is printed, because of the nasty browsers
> header and footer ... whom i now how to remove ...
>
> i know that the printer IP is  192.192.1.100 and the port is 9005 ...
>



--- End Message ---
--- Begin Message ---
José Moreira wrote:

hello, at my company we have several network printers and i was was
wondering if it's possible to print directly to them using PHP, instead
of showing on the screen or both ...
to gain more control on what is printed, because of the nasty browsers
header and footer ... whom i now how to remove ...

i know that the printer IP is  192.192.1.100 and the port is 9005 ...



If you're willing to do a bit of work, you can do a workable solution. 
I'm assuming that PHP is running on a Windows server.

You can use the Windows printer functions if the printer was connected 
directly. If not, you can still get it to work. The Windows Scripting 
Host resources give you a few ways. A kludgy way would be to configure 
IE on the printer machine (since it's almost surely installed) to not 
show the header and footers. You can use the WSH functions to open a 
non-visible IE instance and issue the print command from there. WSH also 
has functions in it's COM objects for mapping network printers, etc so 
you could customize your own server's IE config and print to a mapped 
printer. Lots of ways to skin this cat, but they're all messy.

--- End Message ---
--- Begin Message ---
if your including plain HTML with no php in it then it's quicker to use
readfile()...

"Roderick Martin" <[EMAIL PROTECTED]> wrote in message
news:45763EEA-E6A8-11D6-A0B1-0030653D8C1C@;network23.com...
> My bad! Windows is definitely not a strong suit with me. I did not know
> I could do the drive paths with the reverse slashes. I tried it and it
> worked flawlessly! Thank you!!!
>
> All I have to do now is add the drive path up to the web directory to
> the replace.
>
> Thanks again! Easier than I could have hoped for.
>
> Rod
>
> On Wednesday, October 23, 2002, at 10:13  AM, Rich Gray wrote:
>
> > Roderick
> >
> > Have you tried just changing '/acc/includes/headstart.htm' to
> > 'c:/acc/includes/headstart.htm'? i.e. leaving the unix style slashes in
> > place...
> >
> > There is a nasty bug in the latest versions of PHP on Win32 affecting
> > the
> > include statement with absolute paths.
> > The above is a workaround solution - once the bug is fixed you should
> > be
> > able to remove the 'c:' stuff.
> >
> > HIW!
> > Rich
> > -Original Message-
> > From: Roderick Martin [mailto:maillist@;network23.com]
> > Sent: 23 October 2002 15:43
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Mixing include path styles. How do I do this???
> >
> >
> > We recently switched from Netscape Enterprise to IIS and I now need to
> > make a lot of changes to over 600 htmls - mostly in include statements.
> > We're doing two things here, switching servers and switching all our
> > SSI's to PHP includes.
> >
> > Under Enterprise, I could define a path just by putting it into the
> > include from the root, ie:
> >
> > 
> >
> > I used a global Find and Replace app to change all these (each html has
> > about eight includes) to:
> >
> > 
> >
> > and now they don't work. If I replace the whole path with a Windows
> > path structure (C:\...) to the included file, it does work.
> >
> > Here's the problem as I see it. 

[PHP-WIN] Date validation

2002-10-24 Thread John Meyer
I have a date coming in in the format (mm/dd/) that I need to insert
into a date column.  How do I modify this using regexps so that it will fit
in.


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




RE: [PHP-WIN] Date validation

2002-10-24 Thread Asendorf, John
Actually, you could use explodo or split and reorder the pieces:

from the docs:

$date = "04/30/1973";  // Delimiters may be slash, dot, or hyphen
list ($month, $day, $year) = split ('[/.-]', $date);
echo "Month: $month; Day: $day; Year: $year\n";



-
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -Original Message-
> From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> Sent: Thursday, October 24, 2002 10:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Date validation
> 
> 
> I have a date coming in in the format (mm/dd/) that I 
> need to insert
> into a date column.  How do I modify this using regexps so 
> that it will fit
> in.
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




RE: [PHP-WIN] Date validation

2002-10-24 Thread Asendorf, John
Actually... you can't use explodo... but you could use explode...

-
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -Original Message-
> From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> Sent: Thursday, October 24, 2002 10:27 AM
> To: John Meyer; Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Date validation
> 
> 
> Actually, you could use explodo or split and reorder the pieces:
> 
> from the docs:
> 
> $date = "04/30/1973";  // Delimiters may be slash, dot, or hyphen
> list ($month, $day, $year) = split ('[/.-]', $date);
> echo "Month: $month; Day: $day; Year: $year\n";
> 
> 
> 
> -
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
> 
> 
> > -Original Message-
> > From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> > Sent: Thursday, October 24, 2002 10:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Date validation
> > 
> > 
> > I have a date coming in in the format (mm/dd/) that I 
> > need to insert
> > into a date column.  How do I modify this using regexps so 
> > that it will fit
> > in.
> > 
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP-WIN] COM advice ...

2002-10-24 Thread Michael Hazelden





Hi there,


I thought I'd just drop a note with some advice that might be of use to you all. I am running some command line scripts which activate Cognos Impromptu via the COM interface.

We are activating these scripts via scheduled tasks on a Windows 2000 server. We found that the COM interface would work when the scripts were run by the user, but when run by scheduled tasks - the COM part of the script failed.

We checked everything we could think of - permissions on program directories ... log on settings ... local admin settings ... security fields and could find no problem.

Finally - we found the problem in the "Component Services" screen. You will find that there are two default permission settings on the "computer" object. If the user running the task (specifically when running a scheduled task) does not have permission to launch or access the com object - it will fail.

Anyway - it might save someone a bit of time in the future!


Cheers,


Michael.





smime.p7s
Description: application/pkcs7-signature


[PHP-WIN] enable_dl don't work with apache?

2002-10-24 Thread Hornig at NOSPAM artshock2d dot de
hi ng

i've tried to enable the dl() function in php but it doesn't work! :(

i set enable_dl = on in the php.ini but phpinfo() always telling me, this
feature is disabled.

if i try running a script using the dl() function i get:
"Fatal error: dl() is not supported in multithreaded Web servers - use
extension statements in your php.ini [..]"

but why?

my system:
win2000 pro sp2
apache 1.3.27
php 4.2.3
mysql currently not installed


if anyone know how to solve this problem or know why i get this message
please tell me... :)

regards,
rené




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




[PHP-WIN] Re: picking files (server side) - need help please

2002-10-24 Thread David Elliott
Dear Aidal

On 23 October 2002 at 08:41:52 +0200 (which was 07:41 where I live) Aidal
might have written

> By the way, couldn't you see my examples

Yeeesss

> or whats with the < ... > ?

Cutting out what is not needed unlike your reply. Aggh hate top quoting as
produced by M$ OE/OL

-- 
 Best regards, ___
  David   |David  Elliott|   Software Engineer|
 _|  [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
| Just another dull moment in S.MR|



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




[PHP-WIN] enable_dl don't work with apache?

2002-10-24 Thread Hornig at NOSPAM artshock2d dot de
hi ng

i've tried to enable the dl() function in php but it doesn't work! :(

i set enable_dl = on in the php.ini but phpinfo() always telling me, this
feature is disabled.

if i try running a script using the dl() function i get:
"Fatal error: dl() is not supported in multithreaded Web servers - use
extension statements in your php.ini [..]"

but why?

my system:
win2000 pro sp2
apache 1.3.27
php 4.2.3
mysql currently not installed


if anyone know how to solve this problem or know why i get this message
please tell me... :)

regards,
rené



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




[PHP-WIN] google API via nuSoap

2002-10-24 Thread brendan
Hello all,
		Running PHP on IIS WIN2k. Have a strange situation which is confusing 
the heck out of me. I read a very interesting article about accessing 
the Google API via NuSoap 
http://www.devshed.com/Server_Side/PHP/GoogleAPI/page1.html .   Looked 
simple enough, a bit of cut and paste .. at most some tweaking ... A 
week later and several conversations with a german developer who doesnt 
speak very good english and I am starting to get a tad frustrated.
My problem is (which the nuSoap developer cant seem to understand) that 
I am stuck inside a firewall.  To send or receive http requests I need 
to do so through a proxy server (no control over it).  This requires 
username/password authentication.  If i just want to do a http request 
through CURL i would use ...

  curl_setopt($ch,CURLOPT_PROXY,"http://proxy.utas.edu.au:8080";);
  curl_setopt($ch,CURLOPT_PROXYUSERPWD,"MYusername,MYpassword");

HOWEVER using the nuSoap implimentation I cannot access the GOOGLE API 
or any other WSDL feed for that matter as it doesnt have a proxy 
feature.  I tried tweaking the code to add my proxy settings to no avail 
... Am I missing something?  Is it impossible to do a WSDL request via a 
proxy server?
has ANYONE managed to get the google API running from a WIN2K box?
cheers
Brendan.


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



[PHP-WIN] spam protection boxes

2002-10-24 Thread Blue Presley
Yahoo and a couple other companies use boxes to help block spam.  before 
posting an ad on their classifieds, you see a box with  word in it.. it's a 
graphic.  and you have to type the letters or words from the box into a 
text box to proceed, and that ensures that a real person is at the 
keyboard.  anyone know how this can be accomplished in PHP?

thx

blue


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



[PHP-WIN] text file parsing

2002-10-24 Thread Bryan Luisana
Hello,

I have only been working with php for about 2 hours now so bare with me if I
type something stupid.

I am trying to open up a remote text file, parse the file, and output the
parsed text as html.  As of now I can open the file read characters into a
buffer and then output them as html.  My problem is with parsing the buffer
to get to the text I want to output.

Should I read the entire file into an array?  Then output the parts of the
array I want to show?  If so please post some type of example code.

Does php have functions to move through a file and choose which characters
you want to put into an array or a buffer?

Any help would be greatly appreciated.

Thanks for your time



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




Re: [PHP-WIN] text file parsing

2002-10-24 Thread Luis Ferro
Bryan Luisana wrote:


Hello,

I have only been working with php for about 2 hours now so bare with me if I
type something stupid.

I am trying to open up a remote text file, parse the file, and output the
parsed text as html.  As of now I can open the file read characters into a
buffer and then output them as html.  My problem is with parsing the buffer
to get to the text I want to output.

Should I read the entire file into an array?  Then output the parts of the
array I want to show?  If so please post some type of example code.
 

Read the whole file to a single variable and then use regexp (ereg for 
instance [there is a regexp like function in php that gives you the 
starting position of the text... ereg will give you the found item...) 
to find the piece of text that you want...

Cheers...
Luis Ferro

---
[This E-mail scanned for viruses by Declude Virus]


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



[PHP-WIN] Re: spam protection boxes

2002-10-24 Thread Hornig at NOSPAM artshock2d dot de
"Blue Presley" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:5.1.1.6.0.20021024202123.00b224c0@;pop-server.carolina.rr.com...
> Yahoo and a couple other companies use boxes to help block spam.  before
> posting an ad on their classifieds, you see a box with  word in it.. it's
a
> graphic.  and you have to type the letters or words from the box into a
> text box to proceed, and that ensures that a real person is at the
> keyboard.  anyone know how this can be accomplished in PHP?
>
> thx
>
> blue
>

i don't have a code for you but i think
it would work like that...

starting an randomizer with a couple of
numbers for example...

output the numbers by using the
feature, that php can print text
into images...

and than recheck if the typed
text is the same which was generated
by the randomizer...


hope it would help a little bit!? :)



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




[PHP-WIN] Notice: Undefined variable:

2002-10-24 Thread Richard West
Hey, I just installed apache and php on my desktop and everything was
working great. I went to go make a form and I am getting these errors
everytime I try to access one of the variables in the form

 Notice: Undefined variable: guest_name in C:\www\book_add.php on line 18

anyone got an idea why its doing it. this is what my form looks like.

Your Name: 
Your e-mail: 
Your comments: 





 and my out put it this

 any ideas why I can't access my query variables??

Richard West
[EMAIL PROTECTED]



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




php-windows Digest 25 Oct 2002 02:14:22 -0000 Issue 1405

2002-10-24 Thread php-windows-digest-help

php-windows Digest 25 Oct 2002 02:14:22 - Issue 1405

Topics (messages 16526 through 16541):

Date validation
16526 by: John Meyer
16527 by: Asendorf, John
16528 by: Asendorf, John

Re: Print data
16529 by: José Moreira

Re: Mixing include path styles. How do I do this???
16530 by: Rod Martin

SIGN OFF
16531 by: John  Dunn

COM advice ...
16532 by: Michael Hazelden

enable_dl don't work with apache?
16533 by: Hornig at NOSPAM artshock2d dot de
16535 by: Hornig at NOSPAM artshock2d dot de

Re: picking files (server side) - need help please
16534 by: David Elliott

google API via nuSoap
16536 by: brendan

spam protection boxes
16537 by: Blue Presley
16540 by: Hornig at NOSPAM artshock2d dot de

text file parsing
16538 by: Bryan Luisana
16539 by: Luis Ferro

Notice: Undefined variable:
16541 by: Richard West

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 ---
I have a date coming in in the format (mm/dd/) that I need to insert
into a date column.  How do I modify this using regexps so that it will fit
in.


--- End Message ---
--- Begin Message ---
Actually, you could use explodo or split and reorder the pieces:

from the docs:

$date = "04/30/1973";  // Delimiters may be slash, dot, or hyphen
list ($month, $day, $year) = split ('[/.-]', $date);
echo "Month: $month; Day: $day; Year: $year\n";



-
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -Original Message-
> From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> Sent: Thursday, October 24, 2002 10:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Date validation
> 
> 
> I have a date coming in in the format (mm/dd/) that I 
> need to insert
> into a date column.  How do I modify this using regexps so 
> that it will fit
> in.
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Actually... you can't use explodo... but you could use explode...

-
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -Original Message-
> From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> Sent: Thursday, October 24, 2002 10:27 AM
> To: John Meyer; Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Date validation
> 
> 
> Actually, you could use explodo or split and reorder the pieces:
> 
> from the docs:
> 
> $date = "04/30/1973";  // Delimiters may be slash, dot, or hyphen
> list ($month, $day, $year) = split ('[/.-]', $date);
> echo "Month: $month; Day: $day; Year: $year\n";
> 
> 
> 
> -
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
> 
> 
> > -Original Message-
> > From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> > Sent: Thursday, October 24, 2002 10:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Date validation
> > 
> > 
> > I have a date coming in in the format (mm/dd/) that I 
> > need to insert
> > into a date column.  How do I modify this using regexps so 
> > that it will fit
> > in.
> > 
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---


How is it possible to create web services in Windows NT4 using open source
;) ?

perhaps i could create a web service to print PDF files and output my
what-to-print to it in that format ...

perhaps :

network/atatchedprinters <- PDF <- server web service 
<- XML <- PHP /
client





-Mensagem original-
De: J Wynia [mailto:letterj@;Phpgeek.com]
Enviada: quinta-feira, 24 de Outubro de 2002 13:58
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-WIN] Re: Print data


José Moreira wrote:
> hello, at my company we have several network printers and i was was
> wondering if it's possible to print directly to them using PHP, instead
> of showing on the screen or both ...
> to gain more control on what is printed, because of the nasty browsers
> header and footer ... whom i now how to r

RE: [PHP-WIN] Notice: Undefined variable:

2002-10-24 Thread Thoenen, Peter Mr. EPS
RTFM would fix this in 2 minutes but trying to avoid work.

First off, make that  ...  is not a block
element and you can't place 's in it ... eg  ...
you can but its a) illegal b) bad form.  But I digress.  All your form
variables are in the enviromental arrays $_POST and $_GET  try 

-Peter

> -Original Message-
> From: Richard West [mailto:ice_dog76@;hotmail.com]
> Sent: Friday, October 25, 2002 05:01
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Notice: Undefined variable: 
> 
> 
> Hey, I just installed apache and php on my desktop and everything was
> working great. I went to go make a form and I am getting these errors
> everytime I try to access one of the variables in the form
> 
>  Notice: Undefined variable: guest_name in 
> C:\www\book_add.php on line 18
> 
> anyone got an idea why its doing it. this is what my form looks like.
> 
> Your Name: 
> Your e-mail: 
> Your comments: 
> 
> 
> 
> 
> 
>  and my out put it this
> 
>  any ideas why I can't access my query variables??
> 
> Richard West
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP-WIN] Problem with set_time_limit() and uploading large files

2002-10-24 Thread derek fong
Hi,

I am having a major problem getting set_time_limit() to work at all 
with PHP 4.2.3 running as a CGI program under IIS.  I have a script 
that accepts large files for upload, with the following lines at the 
top of the script:


// let this script take as long as it needs to complete its work
// and ignore if user hits stops button in his browser
set_time_limit(0);
ignore_user_abort(true);

// include site-wide configs and other include files
require_once('../includes/site.php');
...

If the file upload takes longer than 30 seconds, PHP bombs out with the 
following error:

"Fatal error: Maximum execution time of 30 seconds exceeded in 
D:\InetPub\test.php on line 3"

I've also tried adding:

ini_set('max_execution_time', 6);

before the set_time_limit() function, but to no avail.  PHP is not 
running in safe mode.  Does anyone have any ideas why this is not 
working as expected?  I'm sure it's something obvious, but I don't know 
what it is.

Thanks in advance,

-f


--
Derek Fong
Web Application Developer
subtitle designs inc. 

"Mistakes are the portals of discovery." --James Joyce
   >> GPG key/fingerprint available upon request <<


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



[PHP-WIN] Re: Notice: Undefined variable:

2002-10-24 Thread Hornig at NOSPAM artshock2d dot de
"Richard West" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:20021025015917.6473.qmail@;pb1.pair.com...
> Hey, I just installed apache and php on my desktop and everything was
> working great. I went to go make a form and I am getting these errors
> everytime I try to access one of the variables in the form
>
>  Notice: Undefined variable: guest_name in C:\www\book_add.php on line 18
>
> anyone got an idea why its doing it. this is what my form looks like.
> 
> Your Name: 
> Your e-mail: 
> Your comments: 
> 
> 
> 
> 
> 
>  and my out put it this
> 
>  any ideas why I can't access my query variables??
>
> Richard West
> [EMAIL PROTECTED]
>
>

ahm, which version of php you're using?

from version 4.2.3 the get and post requests changed because of a security
problem. now you have to access the post and get variables with
$HTTP_GET_VARS[] or
the short $_GET[] or for post variables $HTTP_POST_VARS[] or the same in
short $_POST[].

i think that would be the problem...

an other advice could be: go into your php.ini and set "register_globals"
on. ... but it isn't recommend...

i hope i could help you!? :)



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




[PHP-WIN] Re: Print data

2002-10-24 Thread Brian McGarvie
an alternative I'm looking into is simply writing/formatting the data into a
text file, then using the good old 'net print' dos command to print the
file...

"José Moreira" <[EMAIL PROTECTED]> wrote in message
news:1035381924.1052.8.camel@;inf4.pt...
> hello, at my company we have several network printers and i was was
> wondering if it's possible to print directly to them using PHP, instead
> of showing on the screen or both ...
> to gain more control on what is printed, because of the nasty browsers
> header and footer ... whom i now how to remove ...
>
> i know that the printer IP is  192.192.1.100 and the port is 9005 ...
>



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




[PHP-WIN] Re: Print data

2002-10-24 Thread J Wynia
José Moreira wrote:

hello, at my company we have several network printers and i was was
wondering if it's possible to print directly to them using PHP, instead
of showing on the screen or both ...
to gain more control on what is printed, because of the nasty browsers
header and footer ... whom i now how to remove ...

i know that the printer IP is  192.192.1.100 and the port is 9005 ...



If you're willing to do a bit of work, you can do a workable solution. 
I'm assuming that PHP is running on a Windows server.

You can use the Windows printer functions if the printer was connected 
directly. If not, you can still get it to work. The Windows Scripting 
Host resources give you a few ways. A kludgy way would be to configure 
IE on the printer machine (since it's almost surely installed) to not 
show the header and footers. You can use the WSH functions to open a 
non-visible IE instance and issue the print command from there. WSH also 
has functions in it's COM objects for mapping network printers, etc so 
you could customize your own server's IE config and print to a mapped 
printer. Lots of ways to skin this cat, but they're all messy.


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



RE: [PHP-WIN] Re: Print data

2002-10-24 Thread José Moreira


How is it possible to create web services in Windows NT4 using open source
;) ?

perhaps i could create a web service to print PDF files and output my
what-to-print to it in that format ...

perhaps :

network/atatchedprinters <- PDF <- server web service 
<- XML <- PHP /
client





-Mensagem original-
De: J Wynia [mailto:letterj@;Phpgeek.com]
Enviada: quinta-feira, 24 de Outubro de 2002 13:58
Para: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Assunto: [PHP-WIN] Re: Print data


José Moreira wrote:
> hello, at my company we have several network printers and i was was
> wondering if it's possible to print directly to them using PHP, instead
> of showing on the screen or both ...
> to gain more control on what is printed, because of the nasty browsers
> header and footer ... whom i now how to remove ...
>
> i know that the printer IP is  192.192.1.100 and the port is 9005 ...
>

If you're willing to do a bit of work, you can do a workable solution.
I'm assuming that PHP is running on a Windows server.

You can use the Windows printer functions if the printer was connected
directly. If not, you can still get it to work. The Windows Scripting
Host resources give you a few ways. A kludgy way would be to configure
IE on the printer machine (since it's almost surely installed) to not
show the header and footers. You can use the WSH functions to open a
non-visible IE instance and issue the print command from there. WSH also
has functions in it's COM objects for mapping network printers, etc so
you could customize your own server's IE config and print to a mapped
printer. Lots of ways to skin this cat, but they're all messy.


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





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