php-windows Digest 28 Oct 2002 06:01:00 -0000 Issue 1410

Topics (messages 16579 through 16584):

iis 6.0 and php
        16579 by: Ali YUKSEL

Switching dbs in midstream
        16580 by: John Meyer
        16582 by: Cam Dunstan

Re: Best PHP clients out there
        16581 by: Cam Dunstan

Re: <Script language=php???
        16583 by: Cam Dunstan
        16584 by: Dash McElroy

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 found instructions from the group but i couldnt make php work under iis
6.0.
if someone knows please reply!

instructions that dont work:

Here is a description on how to install PHP under Windows .Net Server ( IIS
6.0 )
I answered to a post in the windows newsgroup, but the right place of this
should be \
here.  If there is someone  responsible for the file install.txt of the
installation, \
feel free to adpat this text and add it to the installation procedure
section.

First of all the installer doesn't work because an ActiveX object used to
configure \
IIS is not present or not available when you try to install PHP.

- So download the zip file instead.
- rename/modify/copy php.ini to your C:/WINDOWS directory.
- copy the file php4ts.dll to C:/WINDOWS/SYSTEM32 ( required, I don't know
why, it is \
supposed to be used only if you use extension...but even without extensions
it \
doesn't work without it )

IIS 6.0 disable by default all the ISAPI extensions:
- go to the IIS management console panel
- You have 4 subsections, FTP sites, Application Pools, Web Sites and Web
Service \
Extensions - Go to Web Service Extensions
- For the first try, Allow "All Unknown ISAPI extension" then you will be
able to \
create an entry for the PHP and juste allowing it, I didn't try it yet. - go
now in \
Web Sites, and do the classic extension mapping at the top level of your web
sites \
heirarchy  - in Home Directory, click on Configuration, and now add the
[your \
path]/php4isapi.dll file with the extension .php  - in Home Directory, allow
Script \
and Executable or only Scripts


--- End Message ---
--- Begin Message ---
Hi,
I have a situation where I may have to switch the database while I am
looping a resultset.  If I do a mysql_select_db within the middle of that,
will that change the initial resultset, e.g


while ($row = mysql_fetch_array($result)) {

        mysql_select_db($anotherdb);
        //do stuff
        mysql_select_db($formerdb);
}

--- End Message ---
--- Begin Message ---
John,
Theres nothing to stop you doing aother query within then loop of the first
provided that you don`t send the result to the same result handle  or the
same row array - in other words .....

$result =mysql_query($sqlstatement);
while ($row = mysql_fetch_array($result)) {
// do stuff

mysql_select_db($anotherdb);
$resultnew = mysql_query($sqlstatementnew);
$rownew =mysql_fetcharray($sqlstatementnew);
//do stuff with $rownew
//mysql_select_db($formerdb);  don`t need this - just keep using
//$result and $row  for continuing work with first query
// or add the two arrays - depending on what you are doing
}

Think of $result (which is just an integer) as a pointer or a handle to a
two dimensional array of real data.

If you use the original $result and $row for the inner query, the inner or
second query will "overwrite" the first entirely.

Hope I have understood what you are trying to do here.  There is also a
possibility that what you want can also be achieved with one "joined" query
statement incorporating a GROUP BY clause.

Cheers CD



----- Original Message -----
From: "John Meyer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 3:59 AM
Subject: [PHP-WIN] Switching dbs in midstream


> Hi,
> I have a situation where I may have to switch the database while I am
> looping a resultset.  If I do a mysql_select_db within the middle of that,
> will that change the initial resultset, e.g
>
>
> while ($row = mysql_fetch_array($result)) {
>
> mysql_select_db($anotherdb);
> //do stuff
> mysql_select_db($formerdb);
> }
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
John,

By clients do you mean source code editors??
If so, there are plenty of good ones, I like Plaven Parvenov`s CR-Edit
myself - has line numbering and PHP syntax awareness (optionally), loads
reasonably quickly.

goto http://www.praven3.com/credit/

CD




----- Original Message -----
From: "John Meyer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 2:53 AM
Subject: [PHP-WIN] Best PHP clients out there


> Can somebody send me the names and URLs of the best PHP clients out there.
> Auto-completion is a big feature that I'd like to have.
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Jason,
I know there is no restriction on using <script language=php>  (I used to do
that all the time) but can ASP break out of script into plain html like php
can??  If so, is that the way?  Break out of asp %> - then start php  <?php
do something  ?>  - then back into asp  <%

I know very little about asp so I might be talking through my hat here.
Imagine php and asp working together -  a bit like the big bad wolf and
little red riding hood having an affair!

CD


----- Original Message -----
From: "Jason Porembski" <[EMAIL PROTECTED]>
To: "'Dash McElroy'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, October 27, 2002 12:56 PM
Subject: RE: [PHP-WIN] <Script language=php???


> No definetly not in the same file.  But this is the current problem that
> I am facing. We are in the midst of putting ads on our sites. (I know I
> know no popups thankfully =) ) Fortunetly those ads use PHP and most of
> our sites are run with PHP very tightly except ONE. The admin of that
> page refuses to use PHP and is in love with ASP. I need to run some PHP
> code from within ASP. How can this be done? My first idea was to use
> <!--#exec cgi="filename.php" --> but I noticed that ASP doesn't parse
> that. Any ideas?
>
>
> -----Original Message-----
> From: Dash McElroy [mailto:php@;l1te.net]
> Sent: Saturday, October 26, 2002 9:46 PM
> To: Jason Porembski
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] <Script language=php???
>
>
> I just took a look in my php.ini file and I didn't see any restrictions
> about the <script language="php"> syntax. Is this syntax in a .php (or
> php
> parsed) file?
>
> Also, as to executing PHP code in an ASP page, I'm not sure how possible
> that is - unless all you need to do is to do an 'include' (if that
> works). I'm hoping you don't want PHP and ASP code in the same file...
>
> Good luck.
>
> -Dash
>
> Bureaucrats cut red tape -- lengthwise.
>
> On Fri, 25 Oct 2002, Jason Porembski wrote:
>
> > Hey folks.  I am attempting to run PHP code with <script
> > language="php"> and it doesn't work.  Any ideas as to why and how I
> > can fix that?  Also what is the best way to run a snippet of PHP code
> > in an ASP page?  Thanks in advance.
> >
> > Jason "Gluten Mifflin" Porembski
> > http://www.world-gaming.com
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Considering I'm not an ASP user (phew!), I really won't have an idea on
how to do that directly in ASP.

Here's an interesting idea that would require a bit of extra work:

Make a php script that all it does is pass through a random ad (or however
that works), then all you have to do in the ASP source code (or HTML,
basically) would be this:

<img src=http://yoursite/yourpath/adfile.php?x=480&y=60> (the x and y
could be used if you have more than one ad size).

The script would then grab an ad file, print out a header line with a
content type of img/gif or whatever applicable, then pass the image file
through (with readfile).

Your thoughts?

-Dash

"Let me assure you that to us here at First National, you're not just a
number.  You're two numbers, a dash, three more numbers, another dash
and another number."
                -- James Estes

On Sat, 26 Oct 2002, Jason Porembski wrote:

> No definetly not in the same file.  But this is the current problem that
> I am facing. We are in the midst of putting ads on our sites. (I know I
> know no popups thankfully =) ) Fortunetly those ads use PHP and most of
> our sites are run with PHP very tightly except ONE. The admin of that
> page refuses to use PHP and is in love with ASP. I need to run some PHP
> code from within ASP. How can this be done? My first idea was to use
> <!--#exec cgi="filename.php" --> but I noticed that ASP doesn't parse
> that. Any ideas?
>
>
> -----Original Message-----
> From: Dash McElroy [mailto:php@;l1te.net]
> Sent: Saturday, October 26, 2002 9:46 PM
> To: Jason Porembski
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] <Script language=php???
>
>
> I just took a look in my php.ini file and I didn't see any restrictions
> about the <script language="php"> syntax. Is this syntax in a .php (or
> php
> parsed) file?
>
> Also, as to executing PHP code in an ASP page, I'm not sure how possible
> that is - unless all you need to do is to do an 'include' (if that
> works). I'm hoping you don't want PHP and ASP code in the same file...
>
> Good luck.
>
> -Dash
>
> Bureaucrats cut red tape -- lengthwise.
>
> On Fri, 25 Oct 2002, Jason Porembski wrote:
>
> > Hey folks.  I am attempting to run PHP code with <script
> > language="php"> and it doesn't work.  Any ideas as to why and how I
> > can fix that?  Also what is the best way to run a snippet of PHP code
> > in an ASP page?  Thanks in advance.
> >
> > Jason "Gluten Mifflin" Porembski
> > http://www.world-gaming.com
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---

Reply via email to