PHP Wrapper For Microsoft SAPI
I can not figure out the reason why this does not go past step 2, it will not go to 2a. Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Microsoft SAPI Problem With PHP
As I've found tons of VB and C# sample codes, I was trying to transform it into PHP code, using the COM objects. My aim is to create a simple html, that creates a wav from a text. Here's what I've tried -the php script part-: $Voice = new COM("SAPI.SpVoice");//works //com_load_typelib("SAPI.SpVoice"); //This doesn't help... $Voice->Speak("Hello!"); //works $FileStream = new COM("SAPI.SpFileStream"); //works - I mean no error $FileMode = SpeechStreamFileMode.SSFMCreateForWrite;// = 3 //works - no error $FileStream->Open("c:a.wav", 3, false); //works - no error $Voice->AllowAudioOutputFormatChangesOnNextSet = false; //works - no error $Voice->AudioOutputStream = $FileStream; //HERE'S THE PROBLEM $Voice->Speak("Hello world",1); $FileStream->Close(); Here's the error I get for that line: Uncaught exception 'com_exception' with message 'Error [0x80020003] Member not found
SQL Error: [Microsoft][ODBC Microsoft Access Driver] Too Few Parameters
I'm trying to execute the following SQL statement and get the following error. SELECT DomainNames.DomainName FROM DomainNames WHERE DomainNames.DomainName Like "*ab*" ORDER BY DomainNames.DomainName SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect I'm running PHP4, Apache 1.3.12 (Win32) and connecting to an Access database on a Win2K box.
Odbc_exec(): SQL Error: [Microsoft][ODBC Microsoft Access Driver]
i am trying to write to the database through odbc. i get the following error: Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in c:inetpubwwwroot514VIP_SurveyProcess.php on line 41 my directory has read/write permissions why am i getting this? here is the code as an example: ... $x = 10; $querySet = "UPDATE Survey SET $rdoOption = $x"; odbc_exec($objConn, $querySet); ...
Php Sapi
Anyone have experience of installing PHP by the modules system? I'm about to install PHP on Win 2000 and Apache. Should I use the cgi version or the new SAPI modules? I would like to use the HTTP Authentication with PHP and I've heard that you must use the modular system then? What shall I use?
Install-sapi
i have installed Red Hat Linux 8 on my computer, i then followed this by setting up my httpd server 2. i am now in the process of installing PHP, and after $make i typed $make install as it is in one of devshe guides, but i get an error message saying -------------- Installing PHP SAPI module /usr/lib/httpd/build/instdso.sh: No such file or directory apxs:Error: Command failed with rc=8323072 . make: *** [install-sapi] Error 1 ------------------ Could someone help me please?
PHP 4.3.8 On WinXP - No Sapi Folder??
I am so confused right now. I installed 4.3.8 on my computer and am reading the install notes for apache. It refers to all these dlls and the sapi, but under c:php, I don't see any of that stuff! What is going on here?
Wrapper For ADOdb_lite -- Best Way To Do It?
I'm trying to adapt a function I'd written to insert arrays in MySQL to the ADOdb_lite class. The best way to do this would probably be to extend the ADOdb_lite class, but there doesn't seem to be a nice way to do that. So what I've done is created two wrapper functions: 1. wrapper_ado_cx($db_name='_default', $db_user='_default', $db_pass='_default', $db_server='_default', $db_type='mysql') 2. wrapper_ado_insert_array($ARRAY, $table, $check_cols=1, $db_name='_default') The first creates the ADO object and manages the database connection using the ADOdb_lite class. The second inserts an array into a table by preparing a statement that matches the array keys to the table columns. I'd like to know if I'm going about this is the most efficient way or if anyone has any suggestions for making this more efficient. The goal is to package the connection and insert code into the functions as neatly as possible and have each function always refer to the same ADO object. I do this by making the ADO object a global. Is there a better way to do this? The functions are below. If the formatting gets mangled, please see this site for clean formatting: http://project1020.pbwiki.com/adodb...20wrappers#Code // wrapper_ado_cx /*_________________________________________________ ___________________________*/ function wrapper_ado_cx($db_name='_default', $db_user='_default', $db_pass='_default', $db_server='_default', $db_type='mysql') { // *** DATA # Global global $O_WRAP_ADO; // *** MANIPULATE // Sanity Checks # DB Name if ( $db_name == '_default' ) { if ( defined('DBA_NAME') ) { $db_name = DBA_NAME; } else { trigger_error('invalid db name - DBA_NAME not set', E_USER_WARNING); return 0; } }
Install: Sapi/php4activescript.dll Missing In 4.3.11
The install.txt that comes with the manual binary install of PHP4 for Windows states that the ActiveScript engine is included in sapi/php4activescript.dll. This is not true in 4.3.11. It just plain isn't in that folder, or anywhere in the .zip file for that matter. Is there an official binary provided, or do I have to get the source and Visual C++ 6 and compile it myself?
This Script Is Just A Wrapper For Php (solaris!)
Hi there. Had a look around google and found one post from someone with almost the same error and no reply. SunOS webdb 5.8 I have been trying to install PHP to work with Apache and it all works fine apart from trying to run php from bash. ../configure --with-sybase=/usr/local/freetds --with-tdsver=7.0 --with-apxs=/ usr/apache/bin/apxs --with-mysql=/opt/sfw/mysql --enable-sockets All fine... /opt/sfw/bin/gmake install # echo $LD_RUN_PATH /usr/local/ssl/lib:/opt/sfw/mysql/lib/mysql This all works fine with PHP and Apache but when trying from bash I get the error.. # /usr/local/bin/php /usr/local/bin/php: error: /usr/local/bin/.libs/php does not exist This script is just a wrapper for php. See the libtool documentation for more information. I tried a few more things without success and even tried creating `.libs` incase it was a permission problem when it was compiling - still zilch.
Unable To Find The Wrapper Https
I tried to include a php script that i downloaded to get me real time money exchange rates, but it uses fopen() function and i get this error: Fatal error: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? so i found out that IIS is the problem and i need PHP 4.3+ and OpenSSL(which i don't understand what it is or how to get it) I tried to setup Apache 2 on my windows and use it instead of IIS, and i setup Apache to use port 8080, but when i access any page in /htdocs, The IE tells me that the page can't be displayed. I want to know how to configure apache and how to run php scripts from it (ofcourse after i configure the httpd.conf file to use php).
TLS Stream Wrapper On Existing Socket
I implement a proprietary protocol, which consists of cleartext messages (much like FTP) and has a TLS mode, which will be initiated by a "AUTH TLS" command (also, like for FTP). After send AUTH TLS, the whole TLS negotiation starts and the following communication will be wrapped in TLS. Instead of implementing TLS by myself, I would like to use the stream wrappers. But how? Something like fopen("tls://...") does not help me here. A stream filter for tls (instead of a wrapper) would be perfect for this purpose, but it does not exist. Or something like freopen().
File:// Streams: Writing A Custom Wrapper
Here is the problem: I'd like to restrict local filesystem stream operations to one directory just like a root jail. fopen('/file.bin') would actually open /some/path/file.bin. One goal of this behavior is to prevent Xinclude instructions to point to "out of application directory" files when processed by the XSLT processor, among other things. I've been reading all I can about streams and wrappers and came to the conclusion that one have no possibility of rewriting a stream wrapper for the file:// scheme. Even if we can unregister the built-in wrapper and register a custom one, we have no way to do the actual on-disk stream operations within that wrapper. My idea was to: 1. register a custom scheme that would use the built-in wrapper used to handle the file:// wrapper. That could even be something dynamic to prevent 3rd-party XML documents to use that unrestricted scheme. let's say we give it a static name and call it "file.full://". 2. write a wrapper rejecting operations on files outside of the allowed jailed directory. that wrapper would use the file.full:// scheme to actually write/read data, after having mapped jailed paths to real filesystem paths. Here is an example: 1. An XML document needs "/dir/file.xml" to be xinclude'd by the XSLT processor. 2. The custom file:// wrapper receives the request and maps "/dir/file.xml" to "/var/www/data-jail/dir/file.xml". It then uses the file.full:// scheme to pass the request to the real wrapper. This means that what I wanted was a situation where "file:///dir/file.xml" is equivalent to "file.full:///var/www/data-jail/dir/file.xml". As already said, file.full could be dynamic to prevent the XML document from using the unrestricted wrapper. Ideally, PHP would provide the classes that handle the built-in schemes. Imagine that 'BuiltInFileWrapper' is the class that handle file:// streams by default: <?php stream_wrapper_unregister('file'); stream_wrapper_register('file', 'CustomRestrictedFileWrapper'); stream_wrapper_register('file.full', 'BuiltInFileWrapper'); ?> In this example my CustomRestrictedFileWrapper class may still actually handle the read/write operations through the file.full scheme. Is there any solution to simulate this? How can I get that behavior? Another less important question is: is it possible to register another default scheme than file://?
Php5 Builds Fails (cannot Stat `sapi/cgi/php': No Such File Or Directory)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 22 Message-ID: <Ca52h.21400$E02.8869@newsb.telia.net> Date: Wed, 01 Nov 2006 17:53:38 GMT NNTP-Posting-Host: 81.232.22.128 X-Complaints-To: abuse@telia.com X-Trace: newsb.telia.net 1162403618 81.232.22.128 (Wed, 01 Nov 2006 18:53:38 CET) NNTP-Posting-Date: Wed, 01 Nov 2006 18:53:38 CET Organization: Telia Internet Xref: number1.nntp.dca.giganews.com comp.lang.php:130948 comp.os.linux.misc:655257 comp.os.linux.setup:480493 comp.os.linux.questions:51499 Following the guidelines in http://www.php.net/manual/en/install.unix.apache2.php I thought I might add PHP5 support to Apache 2. Apache runs fine. Php builds without the --with-apxs2 option. However when I added '--with-apxs2=/usr/sbin/apxs ' to the Pkgfile the php build fails ending with: [stuff deleted] Build complete. (It is safe to ignore warnings about tempnam and tmpnam). + install -D -m 755 sapi/cgi/php /usr/ports/contrib/php/work/pkg/usr/bin/php install: cannot stat `sapi/cgi/php': No such file or directory =======ERROR: Building '/usr/ports/contrib/php/php#5.1.6-1.pkg.tar.gz' failed. bash-3.1#
PHP On Microsoft-IIS/6.0
Is it possible to make IIS parse .html files the same way as Apache does with AddType application/x-httpd-php .html in .htaccess?
Warning: Fopen(http://localhost/.. ?HTTP Wrapper Does Not Support Writeable Conn
I am able to create a pdf using php and ezpdf, its works fine, and display the pdf document in the current server page. But here are two things i wish to do, first store the pdf and than open, if possible in a new popup window? When i tried this function below, it gives me an error Error: Warning: fopen(http://localhost/pdf/files/tmp1/yasmina.pdf) [function.fopen]: failed to open stream: HTTP wrapper does not support writeable connections. in C:Program FilesxampphtdocspdfpdfClassesAndFonts_009ecertificate.php on line 139 Could not open file to save PDF. Code:
Microsoft SQL Connection
I am looking to have a php page that will have a required include of a config file with the MS SQL connection creation. I want to have a form that saves into a MS SQL database. Could call out to a stored procedure or have inline code in the php page. Anyone have examples or generic sample code I can use?
PHP With Microsoft Sharepoint ?
I would like to ask if I can synchronize Sharepoint Services with my PHP website? Hint: I think it can be done by XML as a bridge.. but I am not sure and wanna be sure.
PHP And Microsoft Access
Is it possible to use php to interface with an ms access database? Our current database (customers, suppliers etc) is in ms access format and we need to run msaccess. I dont feel like converting the whole database over to mysql and we still need the original system, the idea will be that the staff can access the database on the road thru a webpage.
PHP And Microsoft Word
I have users who can sent a Word document as an attachment to an email from a Microsoft-rich environment. I would like to be able to "capture" that attachment as a blob and deposit it into a mysql database. I am not sure how to do the capture.
PHP To Microsoft Outlook
Is it possible to send meeting notifications to microsoft outlook through php? I guess it would be sort of an e-mail sent to an individual telling them they have been invited to attend an event and the event info is automatically added to thier outlook calender or something?
Exporting To Microsoft Access
I have a PHP website with a mySQL database and a client wants to be able to see the database on his computer using Microsoft Access. I would like to be able to make a special backdoor section for him, where he enters his username and password and is given a link which will make take a snapshot of the mySQL database and convert it to a Microsoft Access database which he can download to his computer. Is this possible? Since he isn't very computer savvy I need a way as user friendly as possible to let him download the database and view on his local computer.
Microsoft Access -> PhpMyAdmin
Alright, so what’s going on is that I have coded an entire website with in mind to have an Access Database. So everything works great... But now I am faced with the problem that I have to have my webpage work with phpMyAdmin, which works completely differently in running my sql statements and everything, ie: ->EOF, select statement, etc... Is there a way for me to have a smooth transition for my code to work with phpMyAdmin instead of Access at the moment, because recoding all of this means an enormous amount of work with not much free time left on my hands. Code:
Parse Error For Microsoft.XMLHTTP
I want the following ASP code to be rewritten in PHP: <% Set xml = Server.CreateObject("Microsoft.XMLHTTP") xml.Open "GET", "http://www.mydomain.com", False xml.Send Response.Write(xml.responseText) %> I tried myself with ASP2PHP conversion tool. The following code was generated. But does not work. I get a parse error. Please help! <?PHP $xml->Open "GET" "http://www.mydomain.com" $False; $xml->Send; echo $xml->responseText; ?>
Any Ideas How To Run Macro In Microsoft Publisher Through PHP COM ?
my macro in Publisher changes "123" into "321" (example) but I can't be able to run it. This is how far I get throught with PHP & Publisher: <? $pub = new COM('publisher.application') or die('Unable to load Publisher'); print "Loaded Publisher, version {$word->Version} "; $pub->Open('xxx.pub'); $pub->Documents[1]->SaveAs('xxx2.pub'); $pub = null; ?> this works, but of course does not do anything else than open xxx.pub and save it as xxx2.pub. I am trying to run my macro: $pub->Documents[1]->RunMacro(replaceme); where replaceme is my macro. I tried different variations: $pub->Documents[1]->Run(replaceme); $pub->Documents[1]->Application->Run(replaceme), etc but no luck so far :(
Microsoft Access Dropdown List
l am building a new site using PHP which has a lot of pages pulling from an Access Database. I would like to have a dropdown list that pulls exhibitions from the database and then when the user selects one it shows the rest of the details from DB just below the dropdown list, hope that makes sense. Code:
Reading Microsoft Office Documents?
I need to be able to upload a Microsoft office document and then show the contents to the visitor, in addition i need to be able to write documents on the fly. Is there a way of doing this, or will i have to spend days researching and programming my own classes to handle it?
PHP Will Not Read More Than 4096 From My Microsoft Sql Text Field.
I have a textarea that is saving to a mssql text (very large) field. The insert, update is working fine. However, when php reads the data using mssql_result function, I'm getting limited to 4096 characters read by php. I know that there are at least 6000 characters and I can see them using microsoft's query analyzer. This is not a magic quotes, single quote, quote, html entity or anthing like that. PHP will not read more than 4096 from my microsoft sql text field. Any ideas how I can get php to read more?
Insert Into Microsoft Access Table Using ODBC
The following lines of code don't return an error but they also do not insert the row into the database: $SQLText="Insert into member (MailingID, MemberID, [File As], EMail, LetterID, AudienceID, DateSent, Sent) Select $MailingCode, $row[0], '".$row[5]."', '".$row[6]."', $LIDToInsert, $AIDToInsert, '".$DateSent."', 1;"; print '<br>'.$SQLText; $rs_upd=odbc_exec($link, $SQLText); if (!$rs_upd) die("Couldn't update database"); I've tested the resulting $SQLText string in Access directly and it works find there so this must be a PHP or ODBC issue.
Microsoft JET Database Engine Error '80040e10'
I am new to ASP, I am trying to create a page using ASP that will read from a database and write to my page, but I get this error every time: Microsoft JET Database Engine error ?e10' No value given for one or more required parameters.
Microsoft And Zend Announce Collaboration To Enhance PHP On IIS
Microsoft's Product Unit Manager for Internet Information Services (IIS), announced a new collaboration with Zend to improve performance and stability of PHP on Windows. This isn't just vaporware, either. During Andi Gutmans' keynote (Andi is one of the creators of PHP and co-founder of Zend), Bill announced the availability of a technical preview release of FastCGI for IIS and demoed it for the audience as well. FastCGI is a new component for Microsoft's Web server platform that is available for download & evaluation today. It works IIS 6.0 in Windows 2003 Server and IIS 5.1 in Windows XP. Even cooler, it also works with the brand new IIS 7.0 making its debut with Windows Vista and, later, as part of Windows Server code-named "Longhorn." This announcement continues to solidfy IIS as the premiere Web application server whether you are developing sites with ASP.NET or any other server framework. Moreover, regardless of the programming language or framework they choose, developers building sites of any size can leverage the full capabilities of the Microsoft platform with enterprise-class security, speed and stability.
Inserting A Date Into A Microsoft Access 97 Database
I was wondering if anyone could help me insert a short date into microsoft access 97 using php? i can insert text no problem but i can't seem to be able to insert a date properly. i have been using //$date = "#" . "$sqlmonth" . " |