php-windows Digest 25 Apr 2004 07:27:46 -0000 Issue 2224
Topics (messages 23529 through 23539):
function parser
23529 by: John Yu
23530 by: Svensson, B.A.T. (HKG)
23531 by: Jordi Canals
23532 by: John Yu
23537 by: Jason Barnett
23538 by: John Yu
Re: Request: Get cURL 7.11.1 (current) included in PHP5 Win32 Builds
23533 by: Jason Barnett
23534 by: Jason Barnett
Re: COM on remote machine
23535 by: Jason Barnett
Re: The COM problem when converting from ASP to PHP[works now!!]
23536 by: Steven Kidd
PHP problem calling a COM from the Web Server
23539 by: Enrique Garcia M.
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 guys
If I want to input a function (for example x = 2y + 5) and then have it
stored in a database, so next time when I input the values for x and y, I
would like php to retrieve the function and compute it. I know how to store
and retrieve, anyone got any ideas about writing a parser to parse the
function?
I've wrote parsers under lisp and other languages before just not PHP. If
someone wrote something like this or know of something like this, I'd rather
not have to reinvent the wheel.
Thanks
John
--- End Message ---
--- Begin Message ---
Interresting concet. I duno if this work, but:
In php you might like to have a function template, wich
you spool to a file with the cinction, then include this
file in another script. Like:
if ($fp = fopen($functionFile, "w)) {
fwrite($fp, "function $funcName($arglist)\n");
fwrite($fp, "{\n");
fwrite($fp, "\t$return ($expression\n)");
fwrite($fp, "}\n");
fclose($fp);
}
// then redirect to script that included $functionFile
-----Original Message-----
From: John Yu
To: [EMAIL PROTECTED]
Sent: 24-4-2004 19:49
Subject: [PHP-WIN] function parser
Hi guys
If I want to input a function (for example x = 2y + 5) and then have it
stored in a database, so next time when I input the values for x and y,
I would like php to retrieve the function and compute it. I know how to
store and retrieve, anyone got any ideas about writing a parser to parse the
function?
I've wrote parsers under lisp and other languages before just not PHP.
If
someone wrote something like this or know of something like this, I'd
rather
not have to reinvent the wheel.
Thanks
John
--- End Message ---
--- Begin Message ---
John Yu wrote:
Hi guys
If I want to input a function (for example x = 2y + 5) and then have it
stored in a database, so next time when I input the values for x and y, I
would like php to retrieve the function and compute it. I know how to store
and retrieve, anyone got any ideas about writing a parser to parse the
function?
I've wrote parsers under lisp and other languages before just not PHP. If
someone wrote something like this or know of something like this, I'd rather
not have to reinvent the wheel.
Thanks
John
Hi John,
Take a look to the eval() function, sure it can help you about this.
Hope it helps,
Jordi.
--- End Message ---
--- Begin Message ---
Hmmm... What if I parse the function and store it as a binary tree with the
operators at the root. I can perform an inorder traversal and compute no?
Or is there an easier way to do this?
John
-----Original Message-----
From: Jordi Canals [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 24, 2004 3:46 PM
To: PHP-Windows List
Subject: Re: [PHP-WIN] function parser
John Yu wrote:
> Hi guys
>
> If I want to input a function (for example x = 2y + 5) and then have it
> stored in a database, so next time when I input the values for x and y, I
> would like php to retrieve the function and compute it. I know how to
store
> and retrieve, anyone got any ideas about writing a parser to parse the
> function?
>
> I've wrote parsers under lisp and other languages before just not PHP. If
> someone wrote something like this or know of something like this, I'd
rather
> not have to reinvent the wheel.
>
> Thanks
> John
Hi John,
Take a look to the eval() function, sure it can help you about this.
Hope it helps,
Jordi.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
John Yu wrote:
Hi guys
If I want to input a function (for example x = 2y + 5) and then have it
stored in a database, so next time when I input the values for x and y, I
would like php to retrieve the function and compute it. I know how to store
and retrieve, anyone got any ideas about writing a parser to parse the
function?
I've wrote parsers under lisp and other languages before just not PHP. If
someone wrote something like this or know of something like this, I'd rather
not have to reinvent the wheel.
Thanks
John
Does your database support stored procedures? If you're doing the same
computation (or only a small set of them) every time then that might
work for you as well.
--- End Message ---
--- Begin Message ---
It's going to be a standard mysql database. Nothing fancy
-----Original Message-----
From: Jason Barnett [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 24, 2004 10:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: function parser
John Yu wrote:
> Hi guys
>
> If I want to input a function (for example x = 2y + 5) and then have it
> stored in a database, so next time when I input the values for x and y, I
> would like php to retrieve the function and compute it. I know how to
store
> and retrieve, anyone got any ideas about writing a parser to parse the
> function?
>
> I've wrote parsers under lisp and other languages before just not PHP. If
> someone wrote something like this or know of something like this, I'd
rather
> not have to reinvent the wheel.
>
> Thanks
>
> John
>
Does your database support stored procedures? If you're doing the same
computation (or only a small set of them) every time then that might
work for you as well.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Hello,
Thank you in advance for any help you can provide.
I have a prod linux server running PHP5CVS with the latest cURL 7.11.1 compiled
in. It has several new features I require.
The Win32 PHP5CVS includes an older version of the Curl extension. Is there any
way to get it upgraded to the current version of cURL?
I have no idea who is in charge of getting curl into Win32 builds, perhaps you could
point me in the right direction?
Thank you again,
Jason
I'm mailing the list as well in case other people are interested in this
topic. Now to be honest, I have never compiled PHP myself so I can't
tell you exactly how to do it. However, if you're familiar with linux
tools then you should probably look into cygwin (www.cygwin.com). There
are a lot of linux tools ported to windows, including gcc.
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Hello,
Thank you in advance for any help you can provide.
I have a prod linux server running PHP5CVS with the latest cURL 7.11.1 compiled
in. It has several new features I require.
The Win32 PHP5CVS includes an older version of the Curl extension. Is there any
way to get it upgraded to the current version of cURL?
I have no idea who is in charge of getting curl into Win32 builds, perhaps you could
point me in the right direction?
Thank you again,
Jason
I'm mailing the list as well in case other people are interested in this
topic. Now to be honest, I have never compiled PHP myself so I can't
tell you exactly how to do it. However, if you're familiar with linux
tools then you should probably look into cygwin (www.cygwin.com). There
are a lot of linux tools ported to windows, including gcc.
--- End Message ---
--- Begin Message ---
M.Staiger wrote:
Hello NG,
Imagine that you have one machine running iis with php and want to call a
COM-Server (e.g. Word) on a remote machine.Would this be possible? How would
it look like, if this is the call for the local machine : $word = new
COM("word.application");
Thanks,
Marc
I haven't played with this much, but I saw an interesting article over
at Zend's site that will help you out I think...
http://www.zend.com/zend/tut/interplatformcomm.php
Although in this article the author was taking the opposite direction
(Windows box connecting to Linux server) you might be able to take the
FTP idea and get it to use COM. Or perhaps XML-RPC/SOAP would work
better for your needs? PEAR has some classes available to get you started.
--- End Message ---
--- Begin Message ---
Thx Dvdmandt,
I have enable it and use var pass by reference but it still doesn't work.
However, when I switch to the PHP5 RC1, it works!~~
I use the recommonded php.ini setting( means the "pass by reference" is
DISABLED ).
my previous version is 4.3.6.
I really love PHP 5! :)
Strongly suggest anyone who uses COM switch to PHP 5.
Stev
Try
$com->GenerateSigningKeys(&$privkey,&$pubkey); and enable
allow_calltime_pass_by_reference or whatever it's called..
--- End Message ---
--- Begin Message ---
Hello,
I have a problem using COM and PHP. I create a simple script that call a
COM that I create in VB6.
When I call the script from the command prompt all works OK, but if I call
the script from the web server (IIS) I get the following results:
- If I use the ISAPI dll:
Unable to obtain IDispatch interface for CLSID ....
- If I use the PHP exe:
The page doesn't respond.
Can any help me telling how can I get the same result that I get when call
the PHP interpreter from the command prompt?
Regards and thanks in advance
--- End Message ---