Re: [PHP] Getting PHP to work under IIS 6.0
Jay Blanchard wrote: [snip] Has anyone been able to get PHP working fully under IIS 6.0? If so, try the following script: I get "Warning: shell_exec() [function.shell-exec]: Unable to execute" whenever I try this or any other shell_exec or back tick (`) shell function. I've tried running in IIS 5.0 isolation mode, and setting all kinds of execution permissions to no avail. [/snip] 6.0 or 5.0 (you mention both)? AFAIK print_r(shell_exec('dir')); will not work for several reasons... shell_exec(`dir`) would not return an array, so print_r for that would be unable to execute. Have you tried opendir() and readdir()? That is the way to get a directory listing. Try this; $var = shell_exec(`dir`); echo $var; print_r worked when I ran php from the command line. print_r when it's not an array acts just like print. IIS 6.0 is the target platform. It has a feature where you can run in "IIS 5.0 Isolation Mode", supposedly to make applications that can't run properly under the new security model of IIS 6.0. This doesn't work for php. And the error I get is that shell_exec couldn't execute. My application is not actually running `dir`, I'm running an ImageMagick identify/convert operation, but that's the simplest script that reproduces the problem. Maybe the ImageMagick pecl library is my only hope. Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting PHP to work under IIS 6.0
Has anyone been able to get PHP working fully under IIS 6.0? If so, try the following script: I get "Warning: shell_exec() [function.shell-exec]: Unable to execute" whenever I try this or any other shell_exec or back tick (`) shell function. I've tried running in IIS 5.0 isolation mode, and setting all kinds of execution permissions to no avail. Joseph P.S. Sorry for the cross post. Just want to get it in front of as many eyeballs as possible. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP + javascript
This is usually handled by the browser automatically. (Nobody likes to see out of date content when browsing the web). Users can set their browser settings to check for new things once per session, every time, or never (or some variation of these). Most users use once per session. Otherwise, a complete reload can be forced on many browsers (NS and IE at least) by holding shift and clicking reload. Joseph > -Original Message- > From: Ide, Jim [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 01, 2001 4:36 PM > To: '[EMAIL PROTECTED]' > Subject: [PHP] PHP + javascript > > > > Hi - > > I want to use javascript to validate some fields on a form. > The javascript code will take the value the user typed > into the form and search for it in an array. If the value > is found in the array, then the value is ok, otherwise > an alert() message will be displayed. > > The amount of data in the array is quite large. > > The data in the array rarely changes. > > I want to avoid transferring the array from the web server > to the client's web browser every time the user loads the > form. I put the array in a file called "myarray.js": > > $ cat myarray.js > var MyArray = new Array( > "value 1", > "value 2", > > "value 789", > "value 790" > ); > $ > > Then, I put the following line in the php script that generates the form: > > > > By examining Apache's access_log, I see that "myarray.js" is > transferred to the user's web browser once when the form is first > displayed, and for subsequent uses of the form, the web browser > uses the myarray.js that is cached, so that the array does not > have to be transferred from the web server to the client computer > every time the user uses the form. > > So, if the data in the array contained in myarray.js _does_ need > to be changed, I need some way of signaling the user's web browser > that it needs to transfer the updated myarray.js file from the web > server. How do I do this? > > The only way I know to do this is to instruct the users to clear their > web browser cache, which will force the web browser to transfer > the updated myarray.js from the web server to the web browser. > > Is there another way? Is there some kind of "expire" mechanism > that will tell the web browser that it needs to get the updated > myarray.js file? > > Thanks - > Jim Ide > > > > > -- > 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 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] Quoting an unknown string for database insert
Is there a function that I can call that is similar to perl's DBI::quote function that will take arbitrary text and quote it so that it is safe to insert into a database? I'm using PHP 4.0.4pl1 on Apache 1.3.14 with postgresql 7.0.2 Joseph -- 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]
RE: [PHP] php as cron
Have you tried 'php '? Now, I don't know how you would pass parameters to it... > -Original Message- > From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 21, 2001 8:09 AM > To: AJDIN BRANDIC > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] php as cron > > > try etc. > > 00,30 * * * * lynx -dump http://path.to.php.script > /dev/null > > Regards > > Johan > > > > > Hi > > > > I have PHP installed as Apache module but I want to run a cron job. I > > have .php script that works OK when executed through browser > but is there > > any way I could execute it through a cron job. > > > > Ajdin > > > > > > -- > > 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 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 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]