php-windows Digest 25 Feb 2002 16:08:14 -0000 Issue 1017

Topics (messages 12256 through 12269):

php, xml, win32, encoding, bug?
        12256 by: Alexander Gräf

Re: passthru(), system() and exec() - help please
        12257 by: alain samoun
        12258 by: Sviss Cobazor

compiling and building under Windows
        12259 by: Piotr Pluciennik
        12267 by: Christoph Grottolo

shell_exec (or other exec sunctions) and pgp.exe
        12260 by: Paul J. Smith
        12261 by: Paul J. Smith

Beginner's Teething Problems
        12262 by: Lindsay Gillam
        12263 by: Symeon Charalabides
        12264 by: DL Neil
        12265 by: DL Neil
        12266 by: DL Neil

fopen() - returns null when error occurs...
        12268 by: Svensson, B.A.T. (HKG)

comparing dates with oracle
        12269 by: Sandeep Murphy

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,

when im using <xsl:output encoding="ISO-8859-1"> i get

Sablotron error on line 1: unknown encoding 'ISO-8859-1' in .... on line ...

but i think iso-8859-1, utf-8, etc. support must be build in. in addition,
when i try to include an external xsl with <xsl:include href="..." /> or a
xml file with "document()", no matter what encoding the target-file has, i
get the following error:

Sablotron error on line 1: unknown encoding '' in .... on line ...

yes, the position where the unknown encoding has to appear is empty, he says
he does not know an unknown encoding ... how can i use the including
functions, and how can i use iso-8859-1 as output encoding (the only
workarround would be to convert the output encoding from utf-8 to iso-8859-1
with iconv, but this isnt the way i thought a xml-parser has to work ...)

configuration:

apache:
Server Version: Apache/1.3.23 (Win32) PHP/4.1.1 DAV/1.0.3-dev
Server Built: Jan 24 2002 20:30:48

server:
Windows 2000 Server, SP2
2 GB RAM, dual-xeon 933 mhz

php-info:
System: Windows NT 5.0 build 2195
Build Date: Dec 30 2001
Thread Safety: enabled
ZEND_DEBUG: enabled
Configuration File (php.ini) Path: C:\WINNT\php.ini
Virtual Directory Support: enabled

This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies
    with Zend Optimizer v1.2.0, Copyright (c) 1998-2001, by Zend
Technologies

XSLT support: enabled
iconv support: enabled
XML Support: active
XML Namespace Support: active
EXPAT Version: 1.95.2


;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for
it.
;
;extension=php_bz2.dll
;extension=php_ctype.dll
extension=php_cpdf.dll
extension=php_curl.dll
;extension=php_cybercash.dll
;extension=php_db.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
extension=php_domxml.dll
;extension=php_dotnet.dll
;extension=php_exif.dll
;extension=php_fbsql.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
;extension=php_gd.dll
;extension=php_gettext.dll
;extension=php_hyperwave.dll
extension=php_iconv.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_ingres.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
extension=php_mhash.dll
extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_oracle.dll
extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_printer.dll
;extension=php_sablot.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
extension=php_sockets.dll
;extension=php_sybase_ct.dll
extension=php_xslt.dll
;extension=php_yaz.dll
extension=php_zlib.dll



thanks in advance
alex

______________________________________________

alexander gräf
[EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
Show us the part of the script where you use these functions.
A+
Alain


-----Original Message-----
From: Sviss Cobazor [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 24, 2002 4:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] passthru(), system() and exec() - help please


Hi everyone, I'm running Win98/Apache/PHP 4.1.1/MySQL.
Everything so far has been really smooth and I have had no problems at all.
The function passthru() however is really killing me. I can't get it to work
nor system() og exec().
So now I just wanted to know if anyone running the same combo as me has
gotten this/these function(s) to work?

Please let me know asap if you know how to make this work, I really need it.

Thanks...

~ Sviss [EMAIL PROTECTED]




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

--- End Message ---
--- Begin Message ---
Gladly :)
I've tried almost everything sone it's not quotes or full paths that is the
problem.

<?
function topdf($filename, $options = "") {
    header("Content-Type: application/pdf");
    flush();
 passthru("htmldoc -t pdf14 --quiet --jpeg size A4 --webpage $options
\'$filename\'");
}

$option = "";
$file = "C:\Program Files\Apache\htdocs\jetas_login.html";
todpf($file, $option);
?>

It seems that not even the header is getting send. I get a blank html page
from this and I wanted a pdf document from the htmldoc application. I have
tested it from the command line and it does work. Also I have tested that my
headers work by making a simple redirect script.
The problem is that not passthru nor system nor exec works on my Win98
mashine. I use Win98/Apache/PHP 4.1.1/MySQL. Everything works fine but these
3 funcions doesn't.


"Alain Samoun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Show us the part of the script where you use these functions.
> A+
> Alain
>
>
> -----Original Message-----
> From: Sviss Cobazor [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 24, 2002 4:37 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] passthru(), system() and exec() - help please
>
>
> Hi everyone, I'm running Win98/Apache/PHP 4.1.1/MySQL.
> Everything so far has been really smooth and I have had no problems at
all.
> The function passthru() however is really killing me. I can't get it to
work
> nor system() og exec().
> So now I just wanted to know if anyone running the same combo as me has
> gotten this/these function(s) to work?
>
> Please let me know asap if you know how to make this work, I really need
it.
>
> Thanks...
>
> ~ Sviss [EMAIL PROTECTED]
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
Hi,

I'd like to ask you where I can find informations how
I can compile and build PHP 4.x and extensions in
Windows environment.

TIA

Piotr

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--- End Message ---
--- Begin Message ---
see in the manual under installation -> Windows (lower part of the page)

Christoph

"Piotr Pluciennik" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| Hi,
|
| I'd like to ask you where I can find informations how
| I can compile and build PHP 4.x and extensions in
| Windows environment.
|
| TIA
|
| Piotr
|
| __________________________________________________
| Do You Yahoo!?
| Yahoo! Sports - Coverage of the 2002 Olympic Games
| http://sports.yahoo.com


--- End Message ---
--- Begin Message ---
Hi,

Anyone any ideas how I can get this simple piece of code to work!?


        $output=shell_exec("pgp.exe -sta -u test test.txt");
        echo $output;


pgp.exe is in the folder where the script runs.  It has all the right
permissions. Safe mode is off for testing.

If I change the pgp command to something like 'dir', I get a response.
I've tried various combinations of 'cmd.exe /c pgp' etc., but havn't had
any luck.

I don't know if this is a pgp thing, or a PHP thing!  


This email or attachment(s) may contain confidential or legally privileged information 
intended for the sole use of the addressee(s). Any use, redistribution, disclosure, or 
reproduction of this message, except as intended, is prohibited. If you received this 
email in error, please notify the sender and remove all copies of the message, 
including any attachments. Any views or opinions expressed in this email (unless 
otherwise stated) may not represent those of Microtech Limited.

This email has been scanned for viruses by MailSafe.  For more infomation please visit 
http://www.microtech.co.gg/mailSafe


--- End Message ---
--- Begin Message ---
Solved it by upgrading PGP!

Paul Smith
Microtech Limited
http://www.microtech.co.gg


-----Original Message-----
From: Paul J. Smith 
Sent: 25 February 2002 10:45
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] shell_exec (or other exec sunctions) and pgp.exe

Hi,

Anyone any ideas how I can get this simple piece of code to work!?


        $output=shell_exec("pgp.exe -sta -u test test.txt");
        echo $output;


pgp.exe is in the folder where the script runs.  It has all the right
permissions. Safe mode is off for testing.

If I change the pgp command to something like 'dir', I get a response.
I've tried various combinations of 'cmd.exe /c pgp' etc., but havn't had
any luck.

I don't know if this is a pgp thing, or a PHP thing!  


This email or attachment(s) may contain confidential or legally
privileged information intended for the sole use of the addressee(s).
Any use, redistribution, disclosure, or reproduction of this message,
except as intended, is prohibited. If you received this email in error,
please notify the sender and remove all copies of the message, including
any attachments. Any views or opinions expressed in this email (unless
otherwise stated) may not represent those of Microtech Limited.

This email has been scanned for viruses by MailSafe.  For more
infomation please visit http://www.microtech.co.gg/mailSafe




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


This email or attachment(s) may contain confidential or legally privileged information 
intended for the sole use of the addressee(s). Any use, redistribution, disclosure, or 
reproduction of this message, except as intended, is prohibited. If you received this 
email in error, please notify the sender and remove all copies of the message, 
including any attachments. Any views or opinions expressed in this email (unless 
otherwise stated) may not represent those of Microtech Limited.

This email has been scanned for viruses by MailSafe.  For more infomation please visit 
http://www.microtech.co.gg/mailSafe


--- End Message ---
--- Begin Message ---
Hi All, 
These probably sound like really trivial and stupid questions to you but I
am a newcomer in this field. I have literally started looking at PHP this
weekend as I have been given a project in work to do and PHP seemed like the
best option. I have some previous programming experince so not a complete
novice at this type of thing. 
I have been looking through beginner's tutorials on sites and invested in a
couple of books, but I am having problems. I have come to realise that there
are two different ways of doing PHP. You can embed it into you html file and
save it as html or write the code and save it as .php file. I have copied
expamples letter by letter and cannot get anything to work. Not sure why but
I am pretty sure it's something stupid I have missed. I have tried creating
html files with the PHP embedded into them and also saving the code ad .php
files. When I try and open them in my IE browser window I get nothing. 
Anyone any ideas what I may be missing. I am getting rather frustrated with
it now. 
Linds


Lindsay Gillam
IT Support
Direct Line: 01423 877564
Fax: 01423 877466
E Mail:[EMAIL PROTECTED]
==============================================
InTechnology plc - Advanced Data Technology Services
Head Office:  Nidderdale House, Beckwith Knowle, Harrogate,  HG3 1SA.
Main:  01423 850000
Fax:  01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology's supplier accreditations visit 
our website accreditation page at 
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp

==============================================
InTechnology plc - Secure Offsite Data
Head Office:  Nidderdale House, Beckwith Knowle, Harrogate,  HG3 1SA.
Main:  01423 850000
Fax:  01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology's supplier accreditations visit 
our website accreditation page at 
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp

--- End Message ---
--- Begin Message ---
> Hi All, 
> These probably sound like really trivial and stupid questions to you but I
> am a newcomer in this field. I have literally started looking at PHP this
> weekend as I have been given a project in work to do and PHP seemed like the
> best option. I have some previous programming experince so not a complete novice
> at this type of thing. I have been looking through beginner's tutorials on sites
> and invested in a couple of books, but I am having problems. I have come to
> realise that there are two different ways of doing PHP. You can embed it into
> you html file and save it as html or write the code and save it as .php file. I
> have copied expamples letter by letter and cannot get anything to work. Not sure
> why but I am pretty sure it's something stupid I have missed. I have tried
> creating html files with the PHP embedded into them and also saving the code ad
> .php files. When I try and open them in my IE browser window I get nothing.
> Anyone any ideas what I may be missing. I am getting rather frustrated with it
> now. Linds
> 
First, you can only use PHP in php files (.php, .php3, .phtml), HTML files are not 
parsed by the server at all and browsers don't recognise php tags.
Second, you need to be running a web-server program with PHP so the language 
can be parsed and the output dynamically created to give you your custom HTML 
page.
These are just primary pointers. If you've done all this, we could use some more 
details.

Symeon Charalabides (cosmopolitan trainee)
------------------------------------------
http://www.webmate.gr

--- End Message ---
--- Begin Message ---
Hi Lindsay,

> These probably sound like really trivial and stupid questions to you but I
> am a newcomer in this field. I have literally started looking at PHP this
> weekend as I have been given a project in work to do and PHP seemed like the
> best option. I have some previous programming experince so not a complete
> novice at this type of thing.

=it is said that there is no such thing as a stupid question - only stupid answers. 
Sometimes the newer members
of the list stretch my belief in this - but not in this case!

> I have been looking through beginner's tutorials on sites and invested in a
> couple of books, but I am having problems. I have come to realise that there
> are two different ways of doing PHP. You can embed it into you html file and
> save it as html or write the code and save it as .php file. I have copied
> expamples letter by letter and cannot get anything to work. Not sure why but
> I am pretty sure it's something stupid I have missed. I have tried creating
> html files with the PHP embedded into them and also saving the code ad .php
> files. When I try and open them in my IE browser window I get nothing.
> Anyone any ideas what I may be missing. I am getting rather frustrated with
> it now.


It sounds as if you are opening the .htm[l] or .php file in your browser. Remember 
that PHP requires server-side
processing, so a page must be called from a web server (which is in turn interfacing 
to PHP). Can you set up
your own web server, or a virtual server somewhere?

Let us know if that's not 'it'!
=dn


--- End Message ---
--- Begin Message ---
Lindsay,
[I have posted this back to the list - there are others here with greater minds than 
mine!]

> It sounds as if you are opening the .htm[l] or .php file in your browser.
> Remember that PHP requires server-side
> processing, so a page must be called from a web server (which is in turn
> interfacing to PHP). Can you set up
> your own web server, or a virtual server somewhere?

> I have tried that now and they still appear blank even going through the web
> server and pointing my browser to that. The phpinfo.php I have also created
> as I am told this would give config deatils. When I view that I just see the
> code I have put in the file. Could it be that the web server is not php
> enabled?? It is a windows 2000 server box using IIS.


You are correct.

Despite indications to the contrary, it is not difficult to get IIS to serve PHP.
RTFM: Chapter 2. Installation
In particular:
General Installation Considerations
Installation on Windows systems
Servers-CGI/Commandline
and
Servers-IIS/PWS

Read carefully, keep your wits about you, and take it one step at a time! My advice is 
to work through the text
and initially to disregard the user-annotations - there is a lot of confusion between 
the different requirements
of various combinations of versions of PHP and versions of IIS (and versions of 
Windows!).

I have been using Apache on NT, but last weekend sat down to put PHP on a Win2000 box. 
It was quite
straightforward, and works quite happily.

Regards,
=dn
PS if you really get in a bind, you can call me on my Orange cell phone (London) and 
I'll sit in front of my
machine and try to talk you through it.

--- End Message ---
--- Begin Message ---
Forwarded to list, in case others would like to add their wisdom/benefits of their 
experience.
=dn

----- Original Message -----
From: "DL Neil" <[EMAIL PROTECTED]>
To: "Lindsay Gillam" <[EMAIL PROTECTED]>
Sent: 25 February 2002 13:27
Subject: Re: [PHP-WIN] Beginner's Teething Problems


> Lindsay,
>
> > Thanks for your help. I was just trying to access it from the browser on my
> > local machine as you suspected. I have a web server setup here but didn't
> > realise you needed to upload the files for them to function correctly. I
> > will give that a try now. Just out of interest from what I have read the
> > best way of doing it is using .php files instead of enbedding the php in the
> > middle of .html files. If I want to code a counter or guestbook anything
> > like that where it would sit as a page in a webside already created. I am
> > assuming you would have to enbed the code in the html??
>
>
> I would use .php files and 'embed' the HTML within them. Remember that the PHP 
>processor's task is simply to
> take the HTML and PHP 'page'/file as input, and to translate the lot into a single 
>web page (HTML) as output -
> which is then fed back to the web server for serving to the client, just as if it 
>had been picked up from a
> .htm[l] file.
>
> You can use any filetype that you like - provided the server knows to handle the 
>file's data to the PHP
> processor. If you never use 'pure HTML' files then you could specify that files with 
>a file type of .htm[l] be
> forwarded to the PHP processor as well, but I can't recommend this course of action 
>because at the practical
> level any page which didn't need PHP's attentions would incur an unnecessary 
>processing/serving delay and why
> call it HTML if it is (at least in part) PHP?
>
> There is a quite a bit of discussion here on the list (check the archives when 
>you're ready) about the
> advisability of keeping HTML code separated from the PHP elements, the use of 
>template systems, and so on - so
> the topic is quite important!
>
> Regards,
> =dn
>
>

--- End Message ---
--- Begin Message ---
I would like to put in some additiona comments to this:

>-----Original Message-----
>From: Svensson, B.A.T. (HKG) 
>Sent: Thursday, February 21, 2002 2:51 PM
>To: [EMAIL PROTECTED]
>Cc: 'Olga Tonkonog'
>Subject: RE: [PHP-WIN] fopen()
>
>
>>I have problem with function fopen() - if file not exists, fopen() don't
>>return false, it returnnothing.
>
>It is impossible for a function in a typed language to return 
>different data types dependent on the evaluation of the 
>function. According to the manual pages of php's fiopen() it 
>should return an integer value.
>
>The php manual says about fopen:
>
>Description
>
> int fopen ( string filename, string mode [, int use_include_path])
>
>
>I assume php calls fopen() from the C-library (with some 
>preparing of the arguments). C's fopen() returns a handler 
>(e.g. an int, a.k.a. integer) to a file. If the file could not 
>be open the "handler" returned will be zero (0) - according to 
>the ANSI C std lib spec. I assume that php's fopen() just 
>forwards this handler, and in case a of failure to open a 
>file, the value returned by fopen() will be, most likely be, zero.


According to the ANSI-C specifications of fopen() it returns a NULL pointer
to the file pointer if an error occurs while opening the file. It seams
like, according to the problem some people has with it, that the php parser
does not translate this null pointer, but just forwards it?


A suggestion to the guys involved in the php development team:

If it is like the case above, maybe the dev. team should consider to change
this null pointer into a zero value before returning the value to the
application programmer?

        /Anders
--- End Message ---
--- Begin Message ---
Hi,

I am trying to compare dates between my form fields and my db field but so
far keep getting a format error.. Am using an Oracle Db...

my query reads like this:

SQL = "SELECT DISTINCT to_char(DOCUMENT.doc_date,'dd/mm/yyyy')
doc_date,DOCUMENT.document_code from Document where";

SQL += " doc_date BETWEEN '15/11/1258' AND '15/08/1988 '";

can anyone pl tell me whats wrong up here??

TIA,
sands
--- End Message ---

Reply via email to