php-windows Digest 27 Jun 2001 14:28:57 -0000 Issue 630 Topics (messages 8065 through 8079): Re: Need help with variables 8065 by: Ruslan Ohitin Re: system(), Access is denied 8066 by: Frank M. Kromann 8069 by: Alessio Bernesco Làvore Re: Session varibles 8067 by: Johan Lundqvist 8075 by: Christian Sandfeld Re: preventing duplicate entries 8068 by: Johan Lundqvist 500 error 8070 by: Skjöldebrand Re: php scripts only work when connected to the internet. 8071 by: Phil Driscoll Re: gd/apache1.3/WinNT 8072 by: Phil Driscoll 8076 by: Edmund 8077 by: Christian Sandfeld Re: Need help with variables - SOLVED! 8073 by: Michel Laine PHP 4.0.6 compiled with DEAPI 8074 by: Thomas Hove Exec command still doesn't on Win2K and IIS 8078 by: BAMHA Mostafa Ftmms 8079 by: Johan Lundqvist 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] ----------------------------------------------------------------------
Hello Michel, I send you example that works with PHPLib template. This is a method I use in my scripts. Hope it helps you. ML> Ruslan Ohitin wrote: >> Hello Michel, >> >> You mixing php variables and Template variables. They are from >> different "namespaces". set_var() takes associative array with string >> keys - Template var names. Edit one line of your code: >> >> ML> $var = ${"DAY".$j}; >> $var = "DAY" . $j; // $var is a string "DAYn" >> >> -- >> Best regards, >> Ruslan Ohitin >> mailto:[EMAIL PROTECTED] >> ML> I am afraid that this suggestion didn't help me. ML> or am i missing something? ML> With the example above i get the (string) value of variable $var to be "DAYn" - ML> And not the variable name, which is what i want. But this is what Template::set_var() wants! PHP knows nothing about template variables. Assigning value to $DAY1 will not lead to change template var {DAY1} to this value. ML> In theory what i want to achieve is this: ML> $DAY1="Monday"; ML> $DAY2="Next day"; ML> $DAY4="Some other day"; ML> .... ML> .... ML> I have 54 Template variables named "DAYn". ML> I want to (in a for loop - 'cause there are 54 of them!) transfer all string ML> values from my $day[n] array to the Template variables namned "DAYn". ML> The array $day[n] is then supposed to hold the required strings. ML> $day[1]="Monday"; ML> $day[2]="Next day"; ML> $day[3]="Some other day"; ML> ... ML> ... ML> -- ML> Michel Laine -- Best regards, Ruslan mailto:[EMAIL PROTECTED]
Running jobs from the command line usally uses another userid, with different rights than when run fram the web server. the web server normaly installs an uses IUSER_<maschine name> to execute scripts. Further more a mapping made from a command line will not be available to other users on the same maschine. - Frank > Hi, > I am a Win NT4.0 user and just start to use PHP. I > don't have much web programming experience. Now I need > your help. > > I try to use system() to run a batch file which > sitting on a mapped network drive like > this : > system("e:\\tmp\file.bat") > but it gives me "Access is denied". > > I can run this batch file in "Command Prompt" window > successfully. When system() > works with the files sitting on server machine, no > problem at all. > > I will appreciate if you can help me this. > > Wen > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > -- > PHP Windows 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] > > >
I'm afraid you can't reach files on network mapped disks. They're impossible to reach also with commands like fopen and similars, so probably you cannot use system() or exec() and so on. I'm wrong? Alessio. "jong jong" <[EMAIL PROTECTED]> ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > I am a Win NT4.0 user and just start to use PHP. I > don't have much web programming experience. Now I need > your help. > > I try to use system() to run a batch file which > sitting on a mapped network drive like > this : > system("e:\\tmp\file.bat") > but it gives me "Access is denied". > > I can run this batch file in "Command Prompt" window > successfully. When system() > works with the files sitting on server machine, no > problem at all. > > I will appreciate if you can help me this. > > Wen > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > -- > PHP Windows 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] >
rtfm Hi, Jason Have a look at: http://www.php.net/manual/en/ref.session.php ("Session handling functions" from PHP manual) And some articles: http://www.phpbuilder.com/columns/ying20000602.php3 http://www.phpbuilder.com/columns/mattias20000312.php3 http://www.phpbuilder.com/columns/mattias20000105.php3 http://www.phpbuilder.com/columns/chad19990414.php3 /Johan Jason Belletty wrote: > > Hi Everybody, > > I'm a php newbie - (best to warn you straight away!!!) > > How do I use session variables? > > In asp its just: session("somevariable") > > Thanks in advance, > Jason.
Jason, In order to work with session vars, do like this: <?php session_start(); session_register("my_var_name"); // Registers the var as a session var $my_var_name = "foo"; ?> This all has to be done before sending output to the browser, just as is the case with cookies. Hope this helped :) /Christian -----Original Message----- From: Jason Belletty [mailto:[EMAIL PROTECTED]] Sent: 26. juni 2001 17:13 To: [EMAIL PROTECTED] Subject: [PHP-WIN] Session varibles Hi Everybody, I'm a php newbie - (best to warn you straight away!!!) How do I use session variables? In asp its just: session("somevariable") Thanks in advance, Jason. --------------------------------------------- Jason Belletty Software Development w: www.spinoffproducts.com e: [EMAIL PROTECTED] p: 01403 268299 f: 01403 268013 ---------------------------------------------
Pete, Look at UPDATE or REPLACE (chap. 7.22 & 7.24 in MySql manual). Then you might rewrite your SQL query to fit your needs. /Johan Pete Kuczynski wrote: > > I want to prevent duplicate entries into my mysql database which holds > invertory of all network eqpt at my site. Engineers access it thru > netscape and the query insert is done via pdp [below]. > > I will place the script into php, any pointers on this would be > appreciated. > > THX! > > Pete >
I've installed PHP and MySQL on my Win2K Pro box according to a doc I got (thanks). Accessing a php-doc results in The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. Any ideas? M.
On Tuesday 26 June 2001 14:20, Bryan wrote: > 2. Try working offline. > This one took me a while to figure out; > You'll have to pardon my ignorance here, but I thought there must have been > an option with the IIS, and couldn't find it, so as a last straw attempt, I > tried the browser work offline option and presto, when I tried > http://mylocalhostname/filename.php the php file processed OK when working > offline. Beware of this one. Certainly on NT4 if you do this, things appear to be working but in dact you are looking at a cached copy of the php generated page. Cheers -- Phil Driscoll
On Wednesday 27 June 2001 02:49, Edmund wrote: > > Nope. What I get is an "Abnormal program termination" without any > display or log as to what is making php choke. Just to check, are the php and the gd dll both from the same php distribution? If so is it 4.0.6? Cheers -- Phil Driscoll
Phil Driscoll wrote: > > On Wednesday 27 June 2001 02:49, Edmund wrote: > > > > Nope. What I get is an "Abnormal program termination" without any > > display or log as to what is making php choke. > > Just to check, are the php and the gd dll both from the same php distribution? > If so is it 4.0.6? > Yup. They are. Actually, even when I upgraded my previous php installation with 4.05, it still couldn't load the gd dll file, or at least, that dll file was making php choke. Edmund -- email: [EMAIL PROTECTED] | "boku wa ima mo, hashiri tsuzukeru."
I'm new to the list, so I didn't get the full story. But I fealt like throwing in my 2 cents anyway. I'm running IIS4 on NT4.0 SP6, and was experiencing great difficulties getting PHP 4.0.5 to work when loading the PDF and GD .DLL's. I never bothered to find out which of the modules where causing the problems, so it could be either. At the end of the day I downgraded to ver. 4.0.4pl1 which worked a charm (haven't had the currage to try with 4.0.6 yet). Cheers, Christian -----Original Message----- From: Phil Driscoll [mailto:[EMAIL PROTECTED]] Sent: 27. juni 2001 11:19 To: Edmund; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] gd/apache1.3/WinNT On Wednesday 27 June 2001 02:49, Edmund wrote: > > Nope. What I get is an "Abnormal program termination" without any > display or log as to what is making php choke. Just to check, are the php and the gd dll both from the same php distribution? If so is it 4.0.6? Cheers -- Phil Driscoll -- PHP Windows 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]
This is the code snippet from my original message: > > // Do it! > for ($i = 0; $i <= 34; $i++) { > > // Need help with this part > $j = $i + 1; > $var = ${"DAY".$j}; > $val = $day[$i]; > > // Set PHPLIB Template variable > $t->set_var( $var => $val ); > > } > > // Do the rest (like parse templates) > Well - what can i say? Thank you all for helping me out! The problem is pretty obvious (now that i know how to solve it) - It's a typo/type combination. I should use the line: $var = "DAY" . $j; // $var is a string "DAYn" As pointed out by Ruslan Ohitin. Then i should correct the typo i have in my original code snippet (included above): $t->set_var( $var => $val ); should be $t->set_var( $var , $val ); Funny thou, i got no replies about this error. Didn't anyone see it? The $t->set_var(array( $var => $val )); syntax is used when you have arrays of variables. I guess that this is a good pointer for that i shouldn't use cut'n'paste as often as i do ;-) Guess who looks like a fool? Thanks again! -- Michel Laine
Hello ! I'm running an ApacheWebserver 1.3.20 with mod_ssl/2.8.4, OpenSSL/0.9.6a and PHP 4.0.6. Everytime I start the Apache Server the following error message appear : [Wed Jun 27 12:35:00 2001] [warn] Loaded DSO F:/php/sapi/php4apache.dll uses plain Apache 1.3 API, this module might crash under EAPI! (please recompile it with -DEAPI) Can anyone please provide me with php4apache.dll compiled with -DEAPI or maybe tell me how to do it (very specific - as I have never compiled before..)
Hi all, I'm using the ISAPI version of PHP-4.0.6 on Win2K but the Exec command still doesn't work on Win2K and IIS. However, it has been mentionned in the ChangeLog of PHP-4.0.6 that popen and exec problems on Win2k were fixed in this version. Is there any change in the configuration? or What i'm missing !!! Thanks in advance for your help. M. Bamha
Your'e correct. When using PHP as ISAPI there's still problems with program execution (exec, system et.c.) in ver. 4.0.6 CGI version still works better... /Johan BAMHA Mostafa Ftmms wrote: > > Hi all, > I'm using the ISAPI version of PHP-4.0.6 on Win2K but the Exec command still > doesn't > work on Win2K and IIS. > > However, it has been mentionned in the ChangeLog of PHP-4.0.6 that popen > and exec > problems on Win2k were fixed in this version. > > Is there any change in the configuration? or What i'm missing !!! > > Thanks in advance for your help. > > M. Bamha >