php-general Digest 15 Feb 2004 10:11:54 -0000 Issue 2591

Topics (messages 177715 through 177725):

Re: phps and iis
        177715 by: Anders Gjermshus
        177722 by: John W. Holmes
        177725 by: Marek Kilimajer

include result from script in midle of other script
        177716 by: Boneripper
        177717 by: Adam Bregenzer
        177719 by: Marek Kilimajer

Apache crashes on windows XP / PHP & MySQL
        177718 by: Johan Kok
        177721 by: Manuel Vázquez Acosta

Re: Another preg question
        177720 by: Hans Juergen von Lengerke

Question about php "forwarding" to javascript
        177723 by: Peter Andersson
        177724 by: Ammar Ibrahim

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 ---
I have installed php on my iis server. What I'm looking for is how to get
php sources to work on IIS. Like phps files.

-----Opprinnelig melding-----
Fra: zerof [mailto:[EMAIL PROTECTED] 
Sendt: 14. februar 2004 21:41
Til: [EMAIL PROTECTED]
Emne: [PHP] Re: phps and iis

It is possible:
http://www.macromedia.com/devnet/mx/dreamweaver/articles/php_iis.html
-----
zerof
-----
"Anders Gjermshus" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Is it possible to get IIS 6 to show php sources. ( phps files )
-----------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message --- Anders Gjermshus wrote:

Is it possible to get IIS 6 to show php sources. ( phps files )

No. I've never seen any way to do this with IIS.


--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message --- Anders Gjermshus wrote:
Hi.



Is it possible to get IIS 6 to show php sources. ( phps files )

And how do I do that, I have not found anything about it on php.net or
www.google.com <http://www.google.com/>




Regards

anders


Is it possible to set a custom 404 handler in IIS? Than you can set it to a php page, in the php page parse the request URI and highlight_file().

--- End Message ---
--- Begin Message ---
hi,

im trying to do this:
...
<BR>
<? if ($_SESSION['valores_relativos']) echo '<img
src="./5_grafico_total.php">';
else include ("./5_grafico_total.php");?>
</FONT>
...

and it works perfectly, BUT

if i wanna send vars with GET like:
...
<BR>
<? if ($_SESSION['valores_relativos']) echo '<img
src="./5_grafico_total.php?aVar=aValue">';
else include ("./5_grafico_total.php?aVar=aValue");?>
</FONT>
...
it doesnt work!

someone has any ideas?

tkx in advance.

-- 

Herberto Graça.
_________________________________
E-mail : [EMAIL PROTECTED]
MSN : [EMAIL PROTECTED]
HomePage : http://herbertograca.no-ip.org

É devido à velocidade da luz ser mais rápida que a do som que
certas pessoas parecem inteligentes antes de abrirem a boca!

It's because the speed of light is greater than the speed of sound that
some people look intelligent before they open their mouth!

isik hizi ses hizindan fazla oldugundan, bazi insanlar
agizlarini acmadan once zekiymis gibi gorunuyorlar!



--- End Message ---
--- Begin Message ---
On Sat, 2004-02-14 at 15:46, Boneripper wrote:
> <? if ($_SESSION['valores_relativos']) echo '<img
> src="./5_grafico_total.php?aVar=aValue">';
> else include ("./5_grafico_total.php?aVar=aValue");?>

Using include literally inserts the contents of the file into your
code.  One way to achieve what you are looking for is to set the
variables you want to pass as a query string before including the
script:
if ($_SESSION['valores_relativos']) {
  echo '<img src="./5_grafico_total.php?aVar=aValue">';
} else {
  $_GET[aVar] = 'aValue';
  include ("./5_grafico_total.php");
}

If you rely on register globals you would want to set the variables
directly like so:
if ($_SESSION['valores_relativos']) {
  echo '<img src="./5_grafico_total.php?aVar=aValue">';
} else {
  $aVar = 'aValue';
  include ("./5_grafico_total.php");
}

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

--- End Message ---
--- Begin Message --- Boneripper wrote:
hi,

im trying to do this:
...
<BR>
<? if ($_SESSION['valores_relativos']) echo '<img
src="./5_grafico_total.php">';
else include ("./5_grafico_total.php");?>
</FONT>
...

and it works perfectly, BUT

if i wanna send vars with GET like:
...
<BR>
<? if ($_SESSION['valores_relativos']) echo '<img
src="./5_grafico_total.php?aVar=aValue">';
else include ("./5_grafico_total.php?aVar=aValue");?>
</FONT>

include cannot pass variables as in get request, set the variables first and then include the file:


<? if ($_SESSION['valores_relativos']) echo '<img
src="./5_grafico_total.php?aVar=aValue">';
else {
        $_GET['aVar'] = 'aValue';
        include ("./5_grafico_total.php");?>
}
?>

--- End Message ---
--- Begin Message --- I have the following software:

1. Apache 2.0.48 (tried with and without SSL)
2. PHP - Latest version
3. MySQL - latest version

Running on Microsoft XP

The problem that I have is that when accessing MySQL with PHP cause Apache to crash, restart, crash etc

Could anybody help me please?

Regards
Johan Kok

--- End Message ---
--- Begin Message ---
Does this happens *everytime* you try to connect to MySQL using PHP?
Does PHP is running as module or cgi?

I've been using WinXP, PHP and MySQL. Although, I'm now running Apache
1.3.28, I did try Apache 2 (php as a cgi)

Manu.


"Johan Kok" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have the following software:
>
> 1. Apache 2.0.48 (tried with and without SSL)
> 2. PHP - Latest version
> 3. MySQL - latest version
>
> Running on Microsoft XP
>
> The problem that I have is that when accessing MySQL with PHP cause
> Apache to crash, restart, crash etc
>
> Could anybody help me please?
>
> Regards
> Johan Kok

--- End Message ---
--- Begin Message ---
> From: Al <[EMAIL PROTECTED]>
>
> $text= preg_replace("/\n\n+/", "\n\n", $text);
>     // remove excess This doesn't seem to do anything.


Strange, your code works for me:

[EMAIL PROTECTED]:~ > cat foo.php
<?php
  $text = "foo\n\n\n\n\nbar";
  echo "before:\n===\n$text\n===\n\n";
  $text = preg_replace("/\n\n+/", "\n\n", $text);
  echo "after:\n===\n$text\n===\n\n";
?>
[EMAIL PROTECTED]:~ > php ./foo.php
before:
===
foo




bar
===

after:
===
foo

bar
===

[EMAIL PROTECTED]:~ > php -v
PHP 4.3.4 (cli) (built: Feb 12 2004 17:42:41)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend
Technologies
[EMAIL PROTECTED]:~ >

--- End Message ---
--- Begin Message ---
Hi!

I am using a web page that uses the following php code to display the
contents of a dynamically update webpage:

<?php
include("http://.../source.xls);
?>

Is it possible to "forward" the contents of the code to a javascript?
eg if the file "source.xls" contains the text "help me" is it possible to
send that text to a javascript? I am quite stuck here so any help would be
greatly appreciated.

regards

Peter

--- End Message ---
--- Begin Message ---
I'm not sure i completely understand what you need but you could write
dynamic Javascript using PHP
e.g;

$myString = 'hey dude, help me';

<script language = .......>
    <?php
        if( strstr('help me') )
            include('jsfunction.inc');
    ?>
</script>


The code i wrote is really dumb, but trying to give you an example.

hope this helps,
    Ammar

"Peter Andersson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi!
>
> I am using a web page that uses the following php code to display the
> contents of a dynamically update webpage:
>
> <?php
> include("http://.../source.xls);
> ?>
>
> Is it possible to "forward" the contents of the code to a javascript?
> eg if the file "source.xls" contains the text "help me" is it possible to
> send that text to a javascript? I am quite stuck here so any help would be
> greatly appreciated.
>
> regards
>
> Peter

--- End Message ---

Reply via email to