[PHP] Re: the xml functions
Robert Samuel White wrote: I am having a hard time understanding one of the features of the xml parser functions. If the string I am parsing includes nbsp; or something similar, it encounters an error. I've read the docs and I don't understand how to have the parser process these. Any advice would be great. Basically, unless you've coded something to deal with them ampersands are the ultimate reserved word in XML. The easiest way to deal with them is to scrub them to amp;nbsp; before they go through the XML parser. The right way to deal with them is to define nbsp; as a valid entity in your DTD and make sure that all XML strings have a DTD when they are fed through the parser. J Wynia phpgeek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP from behind a proxy-server ??
You can use the CURL module to do this fairly easily as it has a proxy setting. Some example code available at: http://www.phpgeek.com/articles.php?content_id=29 Rob wrote: hi, i'm trying to get phpMySetiStats (phpmysetistats.sourceforge.net) running on my NT4 box (Apache 2.0.39, PHP 4.2.3 and MySQL 3.23.52). problem is that i am behind a proxy server and can not get the 'file' function to work to retrieve my stats from the Berkeley server ... i've searched the net groups and noticed that i'm not the first one to run into this problem ; but could not find any answers ... anybody here knows how to use 'file' thru a proxy ? Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPTriad on Windows XP?
PHPTriad 2.2 will work on XP. No, Sokkit is not out yet. Sokkit will most definitely work on XP as that's what I'm developing it on. Stephen wrote: Is this even out yet? I have PHPTriad 2.2 I'm pretty sure. - Original Message - From: Tyler Longren [EMAIL PROTECTED] To: Stephen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 01, 2002 5:20 PM Subject: Re: [PHP] PHPTriad on Windows XP? Did you even try to find the answer by yourself? You could have found the answer to this on the PHPTriad(now called Sokkit) homepage: http://www.phpgeek.com/sokkit/ The answer is listed under Sokkit Requirements. tyler On Tue, 1 Oct 2002 17:19:13 -0500 Stephen [EMAIL PROTECTED] wrote: Just wondering but is it possible to install and use PHPTriad on Windows XP Professional? I had it on my Windows 98 machiene but then formatted and went up to Windows XP Pro. Thanks, Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to Pass the Username which from Windows Login
$network = new COM(WScript.Network); $computername = $network-ComputerName; $username = $network-UserName; Password can't be grabbed for fairly obvious reasons. Jack [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear all I want to prevent user to make another login before they can browse the Intranet, so is there anyway that php can grep the username from the windows Login or Domain Login? Which means if a user can login to the Windows NT, then he/she will have the right to browse the Intranet! Thx a lot Jack [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Create Word Document from PHP??
Don't know what code you're using to do this, but here's a spellcheck function that creates a new Word doc. See if this works for you. function spellcheck($string){ $word = new COM(word.application) or die(The spellcheck function requires MS Word.); $word-Visible = 0; $word-Documents-Add(); $word-Selection-TypeText($string); $word-ActiveDocument-CheckSpelling(); $word-Selection-WholeStory(); $corrected = $word-Selection-Text; $word-ActiveDocument-Close(false); $word-Quit(false); $word-Release(); $word = null; return $corrected; } Jeremy Spielmann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've been trying to create a MS Word document from PHP, but I've been running into some issues. I was wondering if there was anything in the config file (php.ini) that needs to be configured before I can do this. I'm using the example from the manual, but i'm receiving several errors. Loaded Word, version 9.0 Warning: Invoke() failed: Exception occurred. Source: Microsoft Word Description: Could not open macro storage. in C:\Inetpub\wwwroot\php\word.php on line 11 Warning: Invoke() failed: Exception occurred. Source: Microsoft Word Description: The requested member of the collection does not exist. in C:\Inetpub\wwwroot\php\word.php on line 15 PHP Warning: Invoke() failed: Exception occurred. Source: Microsoft Word Description: Could not open macro storage. in C:\Inetpub\wwwroot\php\word.php on line 11 PHP Warning: Invoke() failed: Exception occurred. Source: Microsoft Word Description: The requested member of the collection does not exist. in C:\Inetpub\wwwroot\php\word.php on line 15 # Any help would be appreciated... Thanks, Jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php, win32, xml bug?
If you happen to be running PHP on Windows, you can use the MSXML engine through it's COM interface. Unfortunately, I haven't seen any documentation on plugging any of the other engines into the new (for PHP4.1) XSLT API. So, I don't know of a solution on UNIX (most of my XSLT work is in a Websphere on Win2K environment). Here's the basic COM code for Windows servers: $xml_com = new COM(MSXML.DOMDocument) or die(MSXML must be installed on server.); $xsl_com = new COM(MSXML.DOMDocument) or die(MSXML must be installed on server.); $xml_com - loadXML($xml_string); $xsl_com - loadXML($xsl_string); $output = $xml_com - transformNode($xsl_com); Alexander GräF [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... J Wynia [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The first thing I'd do is run your transformation through one of (or all of) the rest of the XSL engines out there. There's a lot more variability out there in XSL engines. Unfortunately, Sablotron isn't the most conformant of the field. I haven't used Sablotron in a while for XSLT processing so am not sure of your specific question. I left Sablotron behind for reasons like this one. It fails on a great many transformations that run through Xalan, Saxon and MSXML identically with no errors. My general rule is if it blows up all XSLT engines, it's probably my XSLT. If Sablotron's the only one that chokes, it's Sablotron. The new API for XSLT should allow for the other engines, however, I haven't seen anything on putting the rest of them into the equation, yet. i tested it on MSXSL, no problem, all runs fine. but how to choose another xsl-engine? thanks alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP COM with Distiller
Don't have sample code handy, but you'd create a new Word, Excel or Powerpoint object (depending), and use the print methods of those objects to send it to Distiller. Kumar [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi All, Installed Apache, PHP, Office and Adobe Distiller on Win2000 Professional. By using $pdf = new COM(pdfdistiller.pdfdistiller.1); $pdf-FileToPdf($psfile, , ); I am able to convert PS to PDF. In the same fashion I want to convert DOC, XLS and PPT to PDF format. Is that possible, please explain in detail. Thanks in advance, Regards, Kumar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sending mail via SMTP server
Does your script take longer than the default 30 seconds? It might be timing out and dying. You may just need to give the script time to finish by making the max_execution_time longer. Matthew Delmarter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am using a script to send mail directly to the SMTP socket. It seemed to work OK for the first 200 emails - then stops sending them. Is there something I'm missing here? As you may be able to tell I'm trying to come to grips with how sockets/SMTP works. Is it like this... 1. I open the socket to the SMTP server 2. I fire the mail through - a few thousand emails 3. I close the socket Do I have to close and reopen the socket every few hundred emails? Regards, Matthew Delmarter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php, win32, xml bug?
The first thing I'd do is run your transformation through one of (or all of) the rest of the XSL engines out there. There's a lot more variability out there in XSL engines. Unfortunately, Sablotron isn't the most conformant of the field. I haven't used Sablotron in a while for XSLT processing so am not sure of your specific question. I left Sablotron behind for reasons like this one. It fails on a great many transformations that run through Xalan, Saxon and MSXML identically with no errors. My general rule is if it blows up all XSLT engines, it's probably my XSLT. If Sablotron's the only one that chokes, it's Sablotron. The new API for XSLT should allow for the other engines, however, I haven't seen anything on putting the rest of them into the equation, yet. Alexander GräF [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 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] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Windows Logon Username Pass to PHP
This may sound kludgy. Probably is. Since it's an internal site, you can control things a bit. The Windows Scripting Host (installed on Win 98+ and Win2K+, available for others as download) exposes at least the username as a property on a WScript.Network object. However, since access to that object is outside the security of a browser, you can't use client-side code to grab it while in a browser. You COULD create an HTA(HTML Application. Just rename an HTML file to *.hta on an IE enabled file and double click it) file to distribute to your users that they use as an interface to your app instead of the browser. That lets Javascript or VBScript access the WScript.Network object and you can grab the username and at least prefill the logon box. The password isn't exposed as a part of the object and sites with info to grab it are filtered under Criminal Skills I can't help on that one. Here's the Javascript to put in an HTA file to pull out the user information (among other info). var WshNetwork = new ActiveXObject(WScript.Network); var oDrives = WshNetwork.EnumNetworkDrives(); var oPrinters = WshNetwork.EnumPrinterConnections(); WScript.Echo(Domain = + WshNetwork.UserDomain); WScript.Echo(Computer Name = + WshNetwork.ComputerName); WScript.Echo(User Name = + WshNetwork.UserName); WScript.Echo(); WScript.Echo(Network drive mappings:); for(i=0; ioDrives.Count(); i+=2){ WScript.Echo(Drive + oDrives.Item(i) + = + oDrives.Item(i+1)); } WScript.Echo(); WScript.Echo(Network printer mappings:); for(i=0; ioPrinters.Count(); i+=2){ WScript.Echo(Port + oPrinters.Item(i) + = + oPrinters.Item(i+1)); } Jack [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear all Is there any ways that i can pass the Windows Logon Username to PHP? Any Built in Function that can handle this? cause i don't want the user to logon so many times and my website is for internal only! Thx Jack [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: licensing, protection
There is the PHP Obfuscator that makes output code a real pain to read. It doesn't really compile it or anything, but it's a level of protection if you need it. http://pobs.mywalhalla.net/ Kunal Jhunjhunwala [EMAIL PROTECTED] wrote in message 005101c1bae4$6e7a6770$0301a8c0@CONFUSED">news:005101c1bae4$6e7a6770$0301a8c0@CONFUSED... Hey, Any suggestions on how to write a licensing system or something similar to protect against illegal distribution of your programs? Zend is a way, but is very expensive. Regards, Kunal Jhunjhunwala Minds think with ideas, not information. No amount of data, bandwidth, or processing power can substitute for inspired thought. - Clifford Stoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Specify php.ini per virtual host?
Is it possible to specify a different php.ini file for each virtual host? I know that that -c altphp.ini syntax on the end of the commandline will switch it, however, that doesn't exactly work like I'd hoped in Apache's configuration. I'd like a solution that worked with either the CGI or module version. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and COM - Syntax question
I sent this to the php.windows group as well, but haven't heard an answer, so I'm escalating it to the general list. Please don't be offended by the redundant posting. I've scoured the web for an answer, but virtually all COM examples using Word are copies of the code in the PHP manual. I'm just looking for the PHP syntax for a specific COM call. I have the VBA code I'm trying to base it on included below. The answer is probably blatantly obvious, but I don't see it. I'm just using the quit() to close it and having to hit no every time. I'm working on a simple PHP spell check that uses Word as its engine. The whole thing works, but I want to close the temp document without being prompted to save. The VBA to do this according to several VBA sites is: ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges I'm looking for the PHP syntax to do this. function spellcheck($string){ $word = new COM(word.application) or die(The spellcheck function requires MS Word.); $word-Visible = 0; $word-Documents-Add(); $word-Selection-TypeText($string); $word-ActiveDocument-CheckSpelling(); $word-Selection-WholeStory(); $corrected = $word-Selection-Text; //the VBA sample code ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges $word-Quit(); $word-Release(); $word = null; return $corrected; } J Wynia phpgeek.com -- PHP General 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]
[PHP] Re: PHP and COM - Syntax question
Figured it out. Pulled out the -Close() and had the quit() just override the save. Here's the new function in case anyone cares. function spellcheck($string){ $word = new COM(word.application) or die(Unable to instanciate Word); $word-Visible = 0; $word-Documents-Add(); $word-Selection-TypeText($string); $word-ActiveDocument-CheckSpelling(); $word-Selection-WholeStory(); $corrected = $word-Selection-Text; $word-Quit(false); $word-Release(); $word = null; return $corrected; } J Wynia phpgeek.com -- PHP General 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]
[PHP] Re: PHP and COM - Syntax question
Hopefully this is my last reply on this thread. I discovered after opening Word normally after a few dozen tests, that it tried to recover all those lost documents. The following demo script has that fixed. ?php function spellcheck($string){ $word = new COM(word.application) or die(The spellcheck function requires MS Word.); $word-Visible = 0; $word-Documents-Add(); $word-Selection-TypeText($string); $word-ActiveDocument-CheckSpelling(); $word-Selection-WholeStory(); $corrected = $word-Selection-Text; $word-ActiveDocument-Close(false); $word-Quit(false); $word-Release(); $word = null; return $corrected; } if ($text) { $checkedtext= spellcheck($text); print($checkedtext); } else { ? form action=spellcheck.php method=post Enter Texttextarea name=text/textarea input type=submit /form ?php } ? -- PHP General 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]