php-windows Digest 22 Jun 2001 11:32:57 -0000 Issue 622

Topics (messages 7967 through 7980):

Why php4isapi.dll doesn't load as ISAPI filter ???
        7967 by: Ziggi
        7975 by: Flint Doungchak

Get the contents of the textarea "as is"
        7968 by: Ben Gillam
        7976 by: Flint Doungchak
        7977 by: samsom, debra
        7978 by: Paul Meagher

page won't stop running
        7969 by: Andrew Dellinger

Security Alert! PHP CGI cannot be accessed directly
        7970 by: Marnix Ottens
        7971 by: ADSL Online.Net

Re: db performance
        7972 by: Frank M. Kromann
        7973 by: Scott

php_pgsql.dll "Procedure could not be found"
        7974 by: Paul Lalli

MySQL -> PHP problem...
        7979 by: Inger-Johanne Holmboe

ImageCreate()
        7980 by: Arash Dejkam

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]


----------------------------------------------------------------------


Hi !

I am brand new in PHP and I have just managed to setup PHP4 on my Win2000
machine. The hyperprocessor is working fine but for whatever reason I was
unable to have php4isapi.dll sucessfully loaded as ISAPI filter (the
Internet Services Manager shows red arrow and "not loaded" message under
ISAPI section concerning PHP. Anyway - there are some other filters loaded
(green arrow). Can you guide me what might be a source of the problem,
please...

Sincerely,
Ziggi






Ziggi,

Even if you get it to work, which is hard, the module isn't stable anyhow
which might explain the behavior you are experiencing. The ISAPI module is
not stable on Windows.

-Flint

-----Original Message-----
From: Ziggi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 8:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Why php4isapi.dll doesn't load as ISAPI filter ???


Hi !

I am brand new in PHP and I have just managed to setup PHP4 on my Win2000
machine. The hyperprocessor is working fine but for whatever reason I was
unable to have php4isapi.dll sucessfully loaded as ISAPI filter (the
Internet Services Manager shows red arrow and "not loaded" message under
ISAPI section concerning PHP. Anyway - there are some other filters loaded
(green arrow). Can you guide me what might be a source of the problem,
please...

Sincerely,
Ziggi



-- 
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]




For example, if someone puts the following into a textbox..

"Hi my name is bob smith

and im talking to you now

and hitting enter every now and then"

and the name of the textbox is $message

how could i get it to take the contents of the text box and put it in
$message as is, with blank lines and carrige returns that the user has put
in, becuase as you know that would just come out as

"Hi my name is bob smith and im talking to you now and hitting enter every
now and then"

Any help would be great.
[EMAIL PROTECTED]






Ben,

When you receive it, try using the nl2br function in PHP. See the manual.

-Flint

-----Original Message-----
From: Ben Gillam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 8:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Get the contents of the textarea "as is"


For example, if someone puts the following into a textbox..

"Hi my name is bob smith

and im talking to you now

and hitting enter every now and then"

and the name of the textbox is $message

how could i get it to take the contents of the text box and put it in
$message as is, with blank lines and carrige returns that the user has put
in, becuase as you know that would just come out as

"Hi my name is bob smith and im talking to you now and hitting enter every
now and then"

Any help would be great.
[EMAIL PROTECTED]



-- 
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 recently had the same problem.  I found my solution here
http://phpbuilder.com/columns/ying20000718.php3?page=1 
download and unzip ying20000718.zip

You include outputlib.php at the beginning of your php program and wrap
$message
like this 

print_output($message)

it works great!!

Debra Samsom
Bristol Aerospace Ltd.
(204) 775-8331 3402
[EMAIL PROTECTED] 


-----Original Message-----
From: Ben Gillam [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 10:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Get the contents of the textarea "as is"


For example, if someone puts the following into a textbox..

"Hi my name is bob smith

and im talking to you now

and hitting enter every now and then"

and the name of the textbox is $message

how could i get it to take the contents of the text box and put it in
$message as is, with blank lines and carrige returns that the user has put
in, becuase as you know that would just come out as

"Hi my name is bob smith and im talking to you now and hitting enter every
now and then"

Any help would be great.
[EMAIL PROTECTED]



-- 
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 might work.  Untested.

$tokens = explode(" ", $message);

$num_tokens = count($tokens);

for ($i = 0; $i < $num_tokens; $i++) {
    $new_message .= $token . " ";
}

$new_message = rtrim($new_message);

echo $new_message;

Regards,
Paul Meagher

----- Original Message -----
From: "Ben Gillam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 12:52 PM
Subject: [PHP-WIN] Get the contents of the textarea "as is"


> For example, if someone puts the following into a textbox..
>
> "Hi my name is bob smith
>
> and im talking to you now
>
> and hitting enter every now and then"
>
> and the name of the textbox is $message
>
> how could i get it to take the contents of the text box and put it in
> $message as is, with blank lines and carrige returns that the user has
put
> in, becuase as you know that would just come out as
>
> "Hi my name is bob smith and im talking to you now and hitting enter
every
> now and then"
>
> Any help would be great.
> [EMAIL PROTECTED]
>
>
>
> --
> 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 am using IIS5/win2k/php4 and any php page, even "hello world" won't stop
running. Any ideas?

Also, I need to find out how to call a function from a submit onClick event.
My script looks like <?php
function displayMe () {
...
}
?>
and call to function is:   <input type="submit" name="Submit" value="Submit"
onClick="displayMe()">

Thanks,
Andrew







Hi,

I have a tricky situation. I had PHP4.05, MySQL 3.23.38 installed on Win2000
pro using IIS5.0.

But then I wanted to use the portal program phpWebsite, unfortunately this
uses the crypt() function which was not compiled in PHP 4.05 (win32).
Therefore I installed PHP 4.07 CGI (dev) with crypt() support. However when
using PHP pages I get the following error message:
-------------------------------------------------------------------
Security Alert! PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means
that a page will only be served up if the REDIRECT_STATUS CGI variable is
set. This variable is set, for example, by Apache's Action directive
redirect.

You may disable this restriction by recompiling the PHP binary with
the --disable-force-cgi-redirect switch. If you do this and you have your
PHP CGI binary accessible somewhere in your web tree, people will be able to
circumvent .htaccess security by loading files through the PHP parser. A
good way around this is to define doc_root in your php.ini file to something
other than your top-level DOCUMENT_ROOT. This way you can separate the part
of your web space which uses PHP from the normal part using .htaccess
security. If you do not have any .htaccess restrictions anywhere on your
site you can leave doc_root undefined

------------------------------------------------------------------- Is there
a workaround for IIS, or does this compiled PHP version requires Apache
webserver?

Best regards,

Marnix






Hi,

I have a tricky situation. I had PHP4.05, MySQL 3.23.38 installed on Win2000
pro using IIS5.0.

But then I wanted to use the portal program phpWebsite, unfortunately this
uses the crypt() function which was not compiled in PHP 4.05 (win32).
Therefore I installed PHP 4.07 CGI (dev) with crypt() support. However when
using PHP pages I get the following error message:
-------------------------------------------------------------------
Security Alert! PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means
that a page will only be served up if the REDIRECT_STATUS CGI variable is
set. This variable is set, for example, by Apache's Action directive
redirect.

You may disable this restriction by recompiling the PHP binary with
the --disable-force-cgi-redirect switch. If you do this and you have your
PHP CGI binary accessible somewhere in your web tree, people will be able to
circumvent .htaccess security by loading files through the PHP parser. A
good way around this is to define doc_root in your php.ini file to something
other than your top-level DOCUMENT_ROOT. This way you can separate the part
of your web space which uses PHP from the normal part using .htaccess
security. If you do not have any .htaccess restrictions anywhere on your
site you can leave doc_root undefined.

------------------------------------------------------------------- Is there
a workaround for IIS, or does this compiled PHP version requires Apache
webserver?

Best regards,

Marnix





Hi Scott,

This could be an networking issue.

Is the SQL server and the Web server on the same computer ?

Are you using tcp/ip or netbeui to communicate from web server (php) to the database 
server ?

If web and database is on the same platform I would recommend using netbeui and 
connect to a server named local. This gives a direct connection to the server.

If you are using two different boxes I would use tcp/ip. This uses you approx. 8 times 
less bandwidth. You have to configure the client (the MSSQL Client tools on the web 
server) to either use the protocol you prefer as default or by adding a client network 
configuration.

mssql_connect() calls a MSSQL function to connect to the database. It first looks for 
a client configuration that matches the name you are specifying as first parameter. If 
that fails it tries to connect using the default protocol (doing a DNS lookup for 
tcp/ip or a netbeu broadcast). These can take some time depending on network settings.

When you create a client network configuration using tcp/ip, you can connect directly 
to an ip address so you wount have to do DNS lookups.

- Frank

> Hi-
> 
> I have a Microsoft SQL 2000 server that I am running a simple query 
> from.  It is
> taking up to a minute to call.  Running IIS 5.0, IE 5.5.
> 
> Any thoughts?  I checked the following:
> 
> 1-A similar ASP script is fine.
> 2-I can ping the server
> 3-In MS Query analyzer it takes milliseconds to finish
> 
> Here is the code:
> 
> <select name="RESORT_ID">
> <option value="All">Search All Resorts</option>
> <?
>       $connection = mssql_connect("scott", "blah", "blah!!") or die ("Can't 
> connect to db server");
>       $db = mssql_select_db("webdb", $connection) or die ("Can't select db!");
>       $sql = "select resort_id,resort_name from resort order by resort_name";
>       $sql_result = mssql_query($sql,$connection) or die ("Can't run query!");
>       while ($row = mssql_fetch_array($sql_result)){
>               $resort_id = $row["resort_id"];
>               $resort_name = $row["resort_name"];
>               echo "<option value=\"$resort_id\">$resort_name</option>";
>               }
>               mssql_free_result($sql_result);
>               mssql_close($connection);
>               ?>
>       </select>               
> 
> 
> -- 
> 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]
> 
> 
> 







Frank-

Thanks for the thoughts.  The db Server is not on the same machine as the 
web server.
They are connecting via tcp/ip.  I used the IP address to rule out DNS 
trouble.

One interesting note.  For fun I downloaded Apache for Win32, installed it 
and the php
modules in it.  Used the same exact page to connect to a SQL 2000 db 
server--in other
words I did not change any of the source code and it connects and returns 
instantly!  We
are talking about a 20 to 1 difference in speed from IIS 5.




At 11:10 AM 6/21/2001 -0700, Frank M. Kromann wrote:
>This could be an networking issue.
>Is the SQL server and the Web server on the same computer ?
>Are you using tcp/ip or netbeui to communicate from web server (php) to 
>the database server ?
>If web and database is on the same platform I would recommend using 
>netbeui and connect to a server named local. This gives a direct 
>connection to the server.
>If you are using two different boxes I would use tcp/ip. This uses you 
>approx. 8 times less bandwidth. You have to configure the client (the 
>MSSQL Client tools on the web server) to either use the protocol you 
>prefer as default or by adding a client network configuration.
>mssql_connect() calls a MSSQL function to connect to the database. It 
>first looks for a client configuration that matches the name you are 
>specifying as first parameter. If that fails it tries to connect using the 
>default protocol (doing a DNS lookup for tcp/ip or a netbeu broadcast). 
>These can take some time depending on network settings.
>When you create a client network configuration using tcp/ip, you can 
>connect directly to an ip address so you wount have to do DNS lookups.
>
>- Frank





Hi there.

I'm running IIS version 4.0 and PHP verion 4.0 under WinNT 4.0.  I am
attempting to use the php_pgsql.dll extention library.  This file is located
in the same directory as all the other php_*.dll files, and the
extention=php_pgsql.dll line in php.ini has been un-commented.  When I load
a php script into my browser, I'm greeted with a pop-up box which says
"Unable to load dynamic library 'php_pgsql.dll' - The specified procedure
could not be found"

Note that if I remove a different library I'm also using from that
directory, the error message I receive says "... specified *module* could
not be found" rather than procedure.  I frankly have no idea what this
means, or why I'm having any difficulty loading this library with my php
script.

Any help is thoroughly appreciated.
Thank you,
Paul Lalli






Hello!

I have installed MySQL and PHP on windows 2000. Everything is working exept
from som mysql stuff.

When i try to use the mysql_fetch_array() function in a PHP script it
doesn't support it! It supports mysql_connect() and mysql_close().

Do I have to install some new PHP extensions or what have I done wrong?






Hi,

I want to use image functions in PHP but each time I use functions like
ImageCreate() or ImageCreateFromJPEG() ... I receive an error saying
undefined function, I'm using PHP version 4.0.5 on Apache and I use W2K.
what's the problem ?

Thanks
Arash Dejkam





Reply via email to