php-windows Digest 29 Aug 2001 23:04:06 -0000 Issue 727

Topics (messages 9107 through 9120):

Re: Installation Problems - PHP 4.0.6 / Win2k sp2 / IIS5 / MySQL 3.23.32 / PostNuke 
0.62
        9107 by: Jens Wabnitz
        9120 by: Bill J. Vallance

System cannot fork
        9108 by: Stephane Megy

Re: Embedding PHP in C
        9109 by: Bopolissimus Platypus

htmlspecialchars but allow text formatting?
        9110 by: Mike Flynn

Very slow response using php.exe under windows9x
        9111 by: Alessio Bernesco Lāvore
        9112 by: Erik H. Mathy
        9113 by: Alessio Bernesco Lāvore
        9114 by: Erik H. Mathy
        9115 by: Alessio Bernesco Lāvore

need some urgent help
        9116 by: Xytras

inserting into MS SQL database-  query failed
        9117 by: Joann Coffey
        9118 by: Andrian Pervazov

Dll version of PHP for MS IIS
        9119 by: Robert KNOTEK

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]


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


> I host my website on my friends’ server.  He and I were looking into PHP
> & PostNuke and we liked the features.  He installed everything, listed
> in the subject, on his site and came up with bunch of warnings: Use of
> undefined constant…  I have an almost exact same setup server at home so
> I tried installing everything myself with the same results.  I am almost
> certain it is my install of PHP, but I am open to any suggestions.

Looks like different error_reporting settings.
Search for error_reporting in php.ini.

Try to you change the line to   error_reporting  =  E_ALL & -E_NOTICE

The warnings you get are probably caused by arrays used like
$my_array[field] instead of $my_array['field'].

Hope that helps
Jens





Thanks for the response.  It does take away the warning msg's, but I'm
finding the webpage is loading slow.  I have even set the below settings
in php.ini, but it appears as no or very little difference.  Is there
something else I am missing?

output_handler = ob_gzhandler
zlib.output_compression = On

http://www.carshows-mi.com/beta

Thanks
Bill

-----Original Message-----
From: Jens Wabnitz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 29, 2001 6:31 AM
To: Bill J. Vallance; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Installation Problems - PHP 4.0.6 / Win2k sp2 /
IIS5 / MySQL 3.23.32 / PostNuke 0.62

> I host my website on my friends’ server.  He and I were looking into
PHP
> & PostNuke and we liked the features.  He installed everything, listed
> in the subject, on his site and came up with bunch of warnings: Use of
> undefined constant…  I have an almost exact same setup server at home
so
> I tried installing everything myself with the same results.  I am
almost
> certain it is my install of PHP, but I am open to any suggestions.

Looks like different error_reporting settings.
Search for error_reporting in php.ini.

Try to you change the line to   error_reporting  =  E_ALL & -E_NOTICE

The warnings you get are probably caused by arrays used like
$my_array[field] instead of $my_array['field'].

Hope that helps
Jens







I'm making intense use of system() but I have a message saying that "I
cannot fork". I know that it was a bug on the previous 4.0.5 version for the
Win32 distribution BUT that is supposed to be corrected in 4.0.6.

Does someone knows about this problem ?





On Tue, 28 Aug 2001 11:19:01 -0500, [EMAIL PROTECTED] (Chris Wilson)
wrote:

>I'm doing a project for which I want to have a C/C++ act as a process proxy
>for which can pass information and retrieve information from a called PHP
>script. I think that can be done in perl however perl I don't take is the
>best langauge. I've fell in love with PHP and would love use it and avoid
>have to call PHP from the commandline and parsing the outputs.
>
>Any suggestion on if this can be done or any other langauge that do the
>trick besides PERL..

i can think of several:

  1. write an extension.  it'd probably have to be C though, or you'd
      have to figure out the name-mangling if you wanted C++ in there.
         *while this is powerful, i would avoid it, myself because i

          prefer to work in C++ and the linking problems would take
          too much effort and time to deal with.

  2. use pipes (popen) on the C/C++ process.  
        A.  this is an easy way to do things if the C/C++ thing is 
             a one-shot deal (set command line params, read 
             answer in stdout or return value).  

        B.  it's also a reasonable solution if you have half-duplex
             pipes and you only need to send data once (on command
             line) and read many lines of answer (use read mode, so
             "r").  or you need to send a lot of data to the program
             and you only need it to return a status code (use "w"
             mode and encode reply in return value from main(...)).

       C.  this can be a general solution if your system supports
            full-duplex pipes (popen mode is "rw") since you can
            then set up as much interactivity as you want between
            PHP and your external program.

      using pipes and exec can be expensive.  think about usage
      patterns before committing to this approach.  it's a nice 
      thing for quick and dirty solutions though.

  3.  write an application server.  there are two types, both
       types have some common features.  in general, you ask
       the application server to perform a service for you, you
       give it parameters, and it returns the answer.

       A.  socket based server.  the server sits on a socket,
            PHP opens connections to that socket and the
            server returns the answer back through the socket.

      B.  exec or CGI based server.  if the server is an external
           program that conforms to CGI, it could just be
           invoked via something like fopen("http://....","r";);
           you pass it parameters through GET (urlencoded 
           on the command line) and you read lines from the
           program.

a socket based server (either fork-style, like apache, or
using select so single-daemon style, or perhaps using
threads, on OSs that support them) is probably the least
CPU intensive, but it's also harder to write.

i've done all of the above, but with another language and
C/C++, not PHP.  with PHP i've used the popen thing
with good success (it's the most convenient solution),
but you really need to think about usage patterns there
because spawning off processes like that is expensive
and will affect server responsiveness when you start
getting a lot of hits.  my applications were only hit
once every 15 to 30 minutes or so, so efficiency of
resource use wasn't a big deal :).
      
hth,

tiger   





Hey all,

Here's something I've wanted to do in the past, but being unable to figure 
it out just worked around it.

Does anyone know of a good, secure solution to strip html characters like 
htmlspecialchars() does, for security sake and proper page viewing, but 
allow text formatting tags, like <b>, <i>, <u>, <big>, <small>, <font>, etc?

I'd like to allow people to input large text articles via web forms 
(textareas), but still allow some level of attractiveness to the output -- 
by allowing them to format the text with HTML tags.

Any ideas?

-Mike






Hi,
i'm using php.exe directly to parse some php files, under windows2k and
windowsNT the procedure is very fast, otherwise under windows95/98 it's very
slow...
Why? i really need to obtain some performances under win9x too...

Thanks a lot.

Alessio.






Hi!

> i'm using php.exe directly to parse some php files, under windows2k and
> windowsNT the procedure is very fast, otherwise under windows95/98 it's
very slow...

Imagine my suprise. ;)

> Why? i really need to obtain some performances under win9x too...

Win85/98 is a consumer OS. It's not made to be fast or even to be stable.
It's made to do a whole lot of stuff (useless and otherwise) and look
pretty. Though the pretty part is all in the eye of the beholder.

How to get it faster? Kill every single unused process you can. I mean
everything. Make sure the five million startup processes are gone. Do the
standard MSoft thing and toss as much RAM into the box as possible. Get a
faster hard drive. Get a faster processor. Pray. Alot. Oh...and reboot,
alot.

Sorry to sound so pessimistic, but methinks you can make a pig as pretty as
possible and you'll still have...a pig. :/

- Erik





i'll explain better the problem,
i'm using ScriptView to process some very simple php pages that will
disposed on a distribution cd.

The cd work very well on win2k but on win9x it's many times slower.
The problem is that all our customer use win9x and on their machine, so i'm
looking for a solution.

Thanks

Alessio.

"Erik H. Mathy" <[EMAIL PROTECTED]> ha scritto nel messaggio
002301c13099$a1d2a270$1300020a@erik_laptop">news:002301c13099$a1d2a270$1300020a@erik_laptop...
> Hi!
>
> > i'm using php.exe directly to parse some php files, under windows2k and
> > windowsNT the procedure is very fast, otherwise under windows95/98 it's
> very slow...
>
> Imagine my suprise. ;)
>
> > Why? i really need to obtain some performances under win9x too...
>
> Win85/98 is a consumer OS. It's not made to be fast or even to be stable.
> It's made to do a whole lot of stuff (useless and otherwise) and look
> pretty. Though the pretty part is all in the eye of the beholder.
>
> How to get it faster? Kill every single unused process you can. I mean
> everything. Make sure the five million startup processes are gone. Do the
> standard MSoft thing and toss as much RAM into the box as possible. Get a
> faster hard drive. Get a faster processor. Pray. Alot. Oh...and reboot,
> alot.
>
> Sorry to sound so pessimistic, but methinks you can make a pig as pretty
as
> possible and you'll still have...a pig. :/
>
> - Erik
>






> i'll explain better the problem,
> i'm using ScriptView to process some very simple php pages that will
> disposed on a distribution cd.

Ahhhhh! OK. I thought you were using it as a server in some situations. Not
an unheard of thing. My apologies for the assumption.

> The cd work very well on win2k but on win9x it's many times slower.
> The problem is that all our customer use win9x and on their
> machine, so i'm looking for a solution.

Out of curiousity, do you have a URL for the ScriptView product? I'd be
interested in taking a look at it.

- Erik









www.angorasoftware.com, it works well (win95 excluse...)

Ale.

"Erik H. Mathy" <[EMAIL PROTECTED]> ha scritto nel messaggio
002401c1309c$7b4b5310$1300020a@erik_laptop">news:002401c1309c$7b4b5310$1300020a@erik_laptop...
> > i'll explain better the problem,
> > i'm using ScriptView to process some very simple php pages that will
> > disposed on a distribution cd.
>
> Ahhhhh! OK. I thought you were using it as a server in some situations.
Not
> an unheard of thing. My apologies for the assumption.
>
> > The cd work very well on win2k but on win9x it's many times slower.
> > The problem is that all our customer use win9x and on their
> > machine, so i'm looking for a solution.
>
> Out of curiousity, do you have a URL for the ScriptView product? I'd be
> interested in taking a look at it.
>
> - Erik
>
>
>
>
>






Hi all
i have installed PWs, PHP and MySQL it works great, i can see my scripts running in my 
browser typing localhost, i belioeve that if i have my PWS running the just typing my 
ip in the browser should work, well it doesn't, i signed up with dns2go.com there you 
have a first level domain or secondary levele domain directed to your dynamic ip, so i 
sent a ping to my domain and my ip responded, but the webserver didn't show anything 
on the browser, so i changed to apache and the story is the same, i'm conected through 
cable conecion, if anyone can help me that would be great
Thanks
Xytras




I am trying to insert some data from an html form to a php script (using MS
SQL, PWS on Win 98, PHP 4.0.5 cgi)  - but I keep getting the following
error:

Warning: MS SQL: Query failed in C:\Inetpub\wwwroot\php\do_adduser.php on
line 24

When I executed the query using Query analyzer the record was added to the
dbase but when trying to submit the info through the form it is not
successful - I would appreciate any help as I am not sure how to find out
what the problem is.

Here is the insert statement from do_adduser.php

$SQL = "
INSERT INTO $table_name
(f_name, l_name, username, password)
VALUES
(\"$f_name\", \"$l_name\", \"$username\", \"$password\")
";

Thank you.

Joann







Try using single quotes for the columns in your query: 

 $SQL = "
 INSERT INTO $table_name
 (f_name, l_name, username, password)
 VALUES
 ('$f_name', '$l_name', '$username', '$password')
 ";
 
SQL SERVER doesn't accept double quotes - I wonder how you were able to
run the query in Query Analyzer witrh double quotes

Andrian

Joann Coffey wrote:
> 
> I am trying to insert some data from an html form to a php script (using MS
> SQL, PWS on Win 98, PHP 4.0.5 cgi)  - but I keep getting the following
> error:
> 
> Warning: MS SQL: Query failed in C:\Inetpub\wwwroot\php\do_adduser.php on
> line 24
> 
> When I executed the query using Query analyzer the record was added to the
> dbase but when trying to submit the info through the form it is not
> successful - I would appreciate any help as I am not sure how to find out
> what the problem is.
> 
> Here is the insert statement from do_adduser.php
> 
> $SQL = "
> INSERT INTO $table_name
> (f_name, l_name, username, password)
> VALUES
> (\"$f_name\", \"$l_name\", \"$username\", \"$password\")
> ";
> 
> Thank you.
> 
> Joann
> 
> --
> 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 heared of an dll version of PHP4 for IIS. This version should have the
advantage of an faster execution because ther is no image activation of
php.exe.

how far ist this away from production.

best regards
robert




Reply via email to