php-windows Digest 14 May 2004 19:44:37 -0000 Issue 2250

Topics (messages 23724 through 23734):

Re: Q on fopen (URL )
        23724 by: \[php\]Walter
        23725 by: \[php\]Walter

Re: Windows speed issue
        23726 by: Steven Sher

Re: Problems Configuring and I do all the manual        says...HELP!
        23727 by: Luis Moreira

Re: Replacing field values in MySQL - is there an easy way?
        23728 by: Jattie van der Linde

Re: Ping from  PHP with   shell_exec  comando in  IIS 5 and windows XP
        23729 by: Svensson, B.A.T. (HKG)
        23730 by: christian astrup bakke // chasm(.nu)
        23731 by: Svensson, B.A.T. (HKG)

Re: Photo gallery with description
        23732 by: Jattie van der Linde
        23733 by: Bobo Wieland

processor bottleneck in server03.
        23734 by: MJ

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 ---
"Dietrich Ayala" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

> even if the openssl extension is enabled, on windows ssl will still not
> be available in the streams code (fopen, fsockopen, ftp, etc).
>
> the only way to make this work is to statically link openssl when
> compiling on windows. there's a link on the streams documentation page
> to a patch that does this.

oh, my brain is leaking out my ear!

I read these pages 4 times.

I'm still no closer to this than I was when I started.

Sorry, can someone translate this into "English".

Thanks.

Walter

--- End Message ---
--- Begin Message ---
"Jason Barnett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > What I get back is this...
> >
> >     Unable to find wrapper "https"
> >     - did you forget to enable it when you configured PHP?
>
> You'll need to look at the openSSL for Windows.  Someone at PHP's site
> said they openSSL has a bug in it, you should try using this to support
> https:
>
> http://ftp.proventum.net/pub/php/win32/misc/openssl/
>
> The original manual / posting where I gleaned this information:
>
> http://www.php.net/manual/en/wrappers.php

Thanks.

Got the new DLL, replaced the old one, modified my ini.

Now I get this...

    Warning: fopen(): HTTP request failed! HTTP/1.1 500 Internal Server
Error
    in test_2.php on line 29

this is line 29...

     $dh = fopen("$url",'r');

well, another step closer!

This is hitting an IIS server, but I don't know which one.

Any ideas?

Walter

--- End Message ---
--- Begin Message ---
Not sure if this will help, but I have seen a significant improvement in
speed, by switching from using normal mysql_connect() to  mysql_pconnect()

Using a persistent connection helped me, you may need to adjust some setting
for it to work affectively



-----Original Message-----
From: Andrew Staples [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 13, 2004 8:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Windows speed issue


I'm fairly new to php, hoping someone can help.  I have a webpage that
displays records from a table.  The problem is that viewing the page on via
any browser other than a browser directly on the server gives me a timeout
error.  When run on the server, it's extremely fast.  What am I doing wrong?
(I tried indexing the city fields).  This is on a win2003 server.

The code is below.

<?
// open database connection
db_connect();
// generate and execute query
$query = "SELECT * FROM milage ORDER BY city";
$result = mysql_query($query) or die ("Error in query: $query. " .
mysql_error());
// if records present
if (mysql_num_rows($result) > 0)
{
        // iterate through resultset
        // print title with links to edit and delete scripts
        while($row = mysql_fetch_object($result))
        {
        ?>
        <tr><td>
        <font size="2"><b><? echo $row->city; ?></b></font></td>
        <td>
        <font size="2"><b><? echo $row->miles; ?></b></font></td>
        <td><font size="2"><a href="edit.php?id=<? echo $row->cityid;
?>">Edit</a></td>
        <td><a href="delete.php?id=<? echo $row->cityid;
?>">Delete</a></font></td>
        </tr>
        <?
        }
}
// if no records present
// display message
else
{
?>
        <font size="-1">No Locations Listed</font><p>
<?
}
// close connection
?>

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

~~~~ Scanned by neroAntiVirus.com (19:28:11 SPITFIRE) ~~~~


--------------------------------------------------------------------
Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

--- End Message ---
--- Begin Message ---
Alejandro C�sar Garrammone wrote:

Yes, I'm sure, If I open a cmd window and go to c:\mysql\bin I execute mysql
and it's open well.
I'm running mysql as a service.
The type of server I use is mysqld-max-nt.
I've created a new php file that contains phpinfo(), and it's runs well, so
the php is well linked to the apache server. But, when I go to a page of
autentication of user and password, when I clik "ok" it do nothing.
An observation I made is that in phpinfo() the method that is shows is
GET...and I pass the User and Password with POST method. If that could be
the problem...how can I fix it?

Thxs again for your response,

Alex
----- Original Message -----
From: "Steve Douville" <[EMAIL PROTECTED]>
To: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 12:37 PM
Subject: Re: [PHP-WIN] Problems Configuring and I do all the manual
says...HELP!




Are you sure that MySQL is running? Are you able to connect to it with an
MySQL client? Are you running it as a service or standalone?

steve
----- Original Message -----
From: "Luis Moreira" <[EMAIL PROTECTED]>
To: "Alejandro C�sar Garrammone" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 13, 2004 11:30 AM
Subject: Re: [PHP-WIN] Problems Configuring and I do all the manual
says...HELP!




Alejandro C�sar Garrammone wrote:



Hi all, I've a problem configuring my php on a Windows XP OS.
I do all the manual says...the Apache Server has service start and it


seems it is working fine...but when the php try to connect to a mysql
databases it's do nothing.


Before the XP I have a W98 running perfectly with Apache, PHP and Mysql


and when I do not start mysql it notify that can't connect, but right now
with this new operating system don't tell nothing...so i think the problem
is in the configuration of the php.


Someone can help me?.
PHP ver 4.2.3
Apache ver 1.3.27
MySQL ver 3.23.53

Sorry for my english,

Thx in advance,

Alex







That problem you fix passing the parameters the right way.

On the URL you cal, type

http://www.destination.com/yourscript.php?param1=1&param2=2

You will then

$param1 = $_GET ['param1'];
$param2 = $_GET ['param2'];

on the PHP script

Luis
--- End Message ---
--- Begin Message ---
Update field, value where whatever

-----Original Message-----
From: Ross Honniball [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 11, 2004 11:40 AM
To: [EMAIL PROTECTED]
Subject: Replacing field values in MySQL - is there an easy way?

This is really a mySQL question, not a php question.

Say you just want to up-date (ie. REPLACE) the value of just one field 
within a mysql record with many fields.

Is there a way to do it without tediously re-setting all the existing field 
values?

eg.

You have a table with:

fld-name  fld-value
-------------------
fld1      abc (PRIMARY KEY)
fld2      def
fld3      xzy
fld4      whatever

and you just want to change say fld4 to 'something else'.

The only way I can see to do it is by tediously setting up a query like:

REPLACE INTO table SET fld1='abc', fld2='def', fld3='xyz', fld4='something 
else'

if you try and say :

REPLACE INTO table SET fld1='abc', fld4='something else'

it sets fld2 and fld3 to null :-(.

Anyone know an easy way to get mysql to retain non-key values not 
explicitly set in a replace call?

. Ross Honniball                  JCU Bookshop Cairns Supervisor
. James Cook Uni, McGreggor Rd, Smithfield, Qld. 4878, Australia
. Ph:07.4042.1157  Fx:07.4042.1158   Em:[EMAIL PROTECTED]
. There are no problems. Only solutions.

--- End Message ---
--- Begin Message ---
That function disabled in safe mode.

-----Original Message-----
From: hdl
To: [EMAIL PROTECTED]
Sent: 14-5-2004 3:44
Subject: [PHP-WIN] Ping from  PHP with   shell_exec  comando in  IIS 5 and
windows XP

Friends,

I have a dude, I can?t do make a  PING  to a server  using  PHP and
SHELL_EXEC command

--- End Message ---
--- Begin Message ---
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED] 
> Sent: 14. mai 2004 11:26
> To: '[EMAIL PROTECTED] '
> Subject: RE: [PHP-WIN] Ping from PHP with shell_exec comando 
> in IIS 5 and windows XP
> 
> That function disabled in safe mode.
> 
> -----Original Message-----
> From: hdl
> To: [EMAIL PROTECTED]
> Sent: 14-5-2004 3:44
> Subject: [PHP-WIN] Ping from  PHP with   shell_exec  comando 
> in  IIS 5 and
> windows XP
> 
> Friends,
> 
> I have a dude, I can?t do make a  PING  to a server  using  
> PHP and SHELL_EXEC command
>

this is probably a shot in the dark, but i've been able to use ping,
nslookup etc. through php by changing/giving the right permissions on the
file cmd.exe ... on iis 6.0 (windows 2003 server). give the iusr_<machine>
(or something similar) the appropriate/suitable permissions.

my best guess at this stage. :)

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

- --
with regards,
christian astrup bakke // chasm.
http://chasm.nu/ - chasm at chasm dot nu

(scanned with norton antivirus 2004)

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQKSZSlhOU3zw+3u3EQIfoACg14pwUKZ5cL9wn2olmdN1teJ2cMcAoPO2
ii73uZMGZiNOThK9ivIctPk7
=Bwl/
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message ---
>From a security point of view, that is /not/ recommended to do - then you
have no controll about who is executing or when execution is done.

A more controlled way to grant execute access to cmd.exe is to let IIS
execute the script as a certain user, and then let that user have the right
to execute whatever command is needed.

When it comes to security, allways think in terms
of restricting access on "need to know" basis.

-----Original Message-----
From: christian astrup bakke // chasm(.nu)
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 14-5-2004 12:02
Subject: RE: [PHP-WIN] Ping from  PHP with   shell_exec  comando in  IIS 5
and windows XP


this is probably a shot in the dark, but i've been able to use ping,
nslookup etc. through php by changing/giving the right permissions on
the file cmd.exe ... on iis 6.0 (windows 2003 server). give the
iusr_<machine> (or something similar) the appropriate/suitable permissions.

my best guess at this stage. :)

--- End Message ---
--- Begin Message ---
I've build some simple code to display thumbnails on a basic album page and then 
reading the directories and automatically putting the images and the comments on the 
images in a file. The downside is that you will have to manually create the thumbnails 
and the displayed images. I suppose the next step of really making the product useful 
is to automate the process. Will work on that.

I use easy thumbnails (http://www.fookes.com/ezthumbs/) to create the thumbnails and 
ACDSee Classic 
(http://www.acdsystems.com/English/Products/ACDSeeClassic/index?LAN=englishX24)to 
comment the images with.

Is there some code sharing section on this forum?

The files can be downloaded from:

http://jattie.co.uk/software/index.htm 

Please drop me a note when you find this useful and also let me know what enhancements 
you'd like to see.



-----Original Message-----
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 12, 2004 4:31 PM
To: Paul Menard
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Photo gallery with description

> So are you going to offer your gallery code for use by 
> others? Just curious. I'm also working on
> my own version of gallery software. I am using Gallery
> (http://gallery.menalto.com/modules.php?op=modload&name=News&f
> ile=index) currently, but hate that
> it does not easily integrate into my site. Would prefer to 
> have components that I can just plug in
> instead of having a stand alone gallery system. By the way 
> Gallery does not use/require a database
> to store photo information. It uses flat files. Though your 
> point is valid about less server load
> there is some I/O load 
> in opening and reading these files to build the page

Yes, I will be offering my various scripts up, probably on
http://www.gryffyndevelopment.com when I get a chance to get them
updated to where I want them to be ('finished' in a sense) and have a
chance to set up a page for people to access.   I wrote a pretty slick
(if I do say so myself) duplicate file scanner and a calendar app (yeah,
everyone has a calendar.. But everyone has a photo gallery too. Hah)
that I'd like to show off and share sometime.

Maybe I'll spam the PHP lists with a link when I get my humble code
gallery up.  I'm very proud of some of the scripts I've written and some
I have really big plans for at some point, but just need to find the
time.

As for the I/O load and all that, I'm not really sure what puts more
stress on a server, but if I find evidence one way or another, I'll lean
toward the side that has as little impact as possible.  Maybe you can
load the photo descriptions into an array and store it as a session
variable.  But file I/O isn't too bad on a small file that's probably
going to end up in the server's file cache anyway.   Lots of options, I
just don't know EXACTLY which method has the smallest impact.

> Also, as just a suggestion I would discourage you from using 
> table in your HTML. Check out the new
> book from Eric Meyer http://more.ericmeyeroncss.com In one of 
> these chapters he actually build a
> photo gallery. Note that he is presenting CSS instruction so 
> there is no mention about the
> dynamics of your backend language. It's more on how to 
> display the photos using CSS instead of
> HTML tables.
> 
> Don't want to start a whole wholly war discussion. Besides 
> this is not a CSS list.

Haha..  CSS is some really great stuff, I'm just slowly learning it and
still have faint twinges of "Is it going to be fully compatible with 99%
of the browsers that are going to hit it".   I started doing HTML on
Netscape 2.0 and really started doing a lot of HTML back in the late
90's when the Browser Wars were in full swing.  Tables work fine for
now.  They may be deprecated at some point (are they already?) but in
the meantime they're something I understand and know how to use so I
stick with what I know.

But thanks for the link.  I'll have to take a serious look at it
sometime soon.  I really do want to learn more CSS.  I'm just using it
for some basic formatting stuff right now but know it's great for
positioning things too.



Good luck!

-TG

--- End Message ---
--- Begin Message ---
>The downside is that you will have to manually create the thumbnails and
the displayed images.

I've made a Macromedia Flash MX application that loads a newly uploaded
image (uploaded by a php script) where the user can select an area of the
image. The coordinates of the selected area is then passed to a php script
that creates a thumbnail based on these values...

Right now it's made exclusivly for a client of mine and works only in the
way they need it to work so I need to tweak it a bit for it to work for
everyone... It also requieres MySQL to work...

I can let you know when it's done if you're intrested...


.bobo [EMAIL PROTECTED]




----- Original Message ----- 
From: "Jattie van der Linde" <[EMAIL PROTECTED]>
To: "Gryffyn, Trevor" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, May 14, 2004 12:26 PM
Subject: RE: [PHP-WIN] Photo gallery with description


I've build some simple code to display thumbnails on a basic album page and
then reading the directories and automatically putting the images and the
comments on the images in a file. The downside is that you will have to
manually create the thumbnails and the displayed images. I suppose the next
step of really making the product useful is to automate the process. Will
work on that.

I use easy thumbnails (http://www.fookes.com/ezthumbs/) to create the
thumbnails and ACDSee Classic
(http://www.acdsystems.com/English/Products/ACDSeeClassic/index?LAN=englishX
24)to comment the images with.

Is there some code sharing section on this forum?

The files can be downloaded from:

http://jattie.co.uk/software/index.htm

Please drop me a note when you find this useful and also let me know what
enhancements you'd like to see.



-----Original Message-----
From: Gryffyn, Trevor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 4:31 PM
To: Paul Menard
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Photo gallery with description

> So are you going to offer your gallery code for use by
> others? Just curious. I'm also working on
> my own version of gallery software. I am using Gallery
> (http://gallery.menalto.com/modules.php?op=modload&name=News&f
> ile=index) currently, but hate that
> it does not easily integrate into my site. Would prefer to
> have components that I can just plug in
> instead of having a stand alone gallery system. By the way
> Gallery does not use/require a database
> to store photo information. It uses flat files. Though your
> point is valid about less server load
> there is some I/O load
> in opening and reading these files to build the page

Yes, I will be offering my various scripts up, probably on
http://www.gryffyndevelopment.com when I get a chance to get them
updated to where I want them to be ('finished' in a sense) and have a
chance to set up a page for people to access.   I wrote a pretty slick
(if I do say so myself) duplicate file scanner and a calendar app (yeah,
everyone has a calendar.. But everyone has a photo gallery too. Hah)
that I'd like to show off and share sometime.

Maybe I'll spam the PHP lists with a link when I get my humble code
gallery up.  I'm very proud of some of the scripts I've written and some
I have really big plans for at some point, but just need to find the
time.

As for the I/O load and all that, I'm not really sure what puts more
stress on a server, but if I find evidence one way or another, I'll lean
toward the side that has as little impact as possible.  Maybe you can
load the photo descriptions into an array and store it as a session
variable.  But file I/O isn't too bad on a small file that's probably
going to end up in the server's file cache anyway.   Lots of options, I
just don't know EXACTLY which method has the smallest impact.

> Also, as just a suggestion I would discourage you from using
> table in your HTML. Check out the new
> book from Eric Meyer http://more.ericmeyeroncss.com In one of
> these chapters he actually build a
> photo gallery. Note that he is presenting CSS instruction so
> there is no mention about the
> dynamics of your backend language. It's more on how to
> display the photos using CSS instead of
> HTML tables.
>
> Don't want to start a whole wholly war discussion. Besides
> this is not a CSS list.

Haha..  CSS is some really great stuff, I'm just slowly learning it and
still have faint twinges of "Is it going to be fully compatible with 99%
of the browsers that are going to hit it".   I started doing HTML on
Netscape 2.0 and really started doing a lot of HTML back in the late
90's when the Browser Wars were in full swing.  Tables work fine for
now.  They may be deprecated at some point (are they already?) but in
the meantime they're something I understand and know how to use so I
stick with what I know.

But thanks for the link.  I'll have to take a serious look at it
sometime soon.  I really do want to learn more CSS.  I'm just using it
for some basic formatting stuff right now but know it's great for
positioning things too.



Good luck!

-TG

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

--- End Message ---
--- Begin Message ---
php.exe keeps hitting 100% processor usage when the scripts are called.  I
have two clients that use vbulletin and when people click on the threads,
that is when php.exe jumps.

This problem started happening when we made the move from server2000 to
2003.

Before it was running on a Server 2000 Adv., IIS 5, 1.5 AMD, 1 gig ddr.  We
didn't have them problem when it was on this machine.

Now it is running on Server 2003 Web Edition, IIS 6, 1.9 P4, 512 Rambus.

Is there any known issues with Web Edition?  Oh yeah, I'm running php 4.3.6

--- End Message ---

Reply via email to