php-windows Digest 5 May 2001 02:25:17 -0000 Issue 580 Topics (messages 7277 through 7303): Problems with php 3.0.17 and multipart/data enctype with the post method 7277 by: Karsten Spies Re: how to create a PHP4 library 7278 by: John Lim Cannot upload file with POST method. IIS4 PHP 4.0.5 7279 by: Alessio Bernesco Lāvore 7280 by: Alessio Bernesco Lāvore PHP 4.05, IIS5 and session... 7281 by: Shawn Anderson 7282 by: Svensson, B.A.T. 7283 by: Flint Doungchak 7284 by: Shawn Anderson 7285 by: Svensson, B.A.T. 7286 by: Shawn Anderson 7287 by: Svensson, B.A.T. 7291 by: Joe Brown 7292 by: Joe Brown 7293 by: OoCobra97.aol.com 7295 by: OoCobra97.aol.com 7296 by: Shawn Anderson 7297 by: Shawn Anderson 7300 by: Shawn Anderson 7301 by: Shawn Anderson trouble with MySQL 'LIKE' command 7288 by: r.gelstharp 7289 by: PHPWIN 7290 by: PHPWIN 7294 by: r.gelstharp Re: XML-RPC for Windows 7298 by: John Lim 7303 by: Paul Meagher Path error session.save_path at php.ini. 7299 by: Chris Boothe 7302 by: Joe Brown 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 there, I'm running php 3.0.17 and mysql 3.23.37 on a windows 95 platform for local demonstration purposes. When I use the enctype "multipart/data" with the post method instead of "text" php crashes. The same script using "multipart/data" works fine on a linux and a unix platform. Thanx for help Karsten
Add dollars in front of every variable, remove all type declarations and add dollars into my pocket :-) I just realised you probably mean you want to create a php extension. Visit zend.com for docs, or read the tutorial in PHP Cookbook by Sterling Hughes, Sams Publishing. ""Andre Steffens"" <[EMAIL PROTECTED]> wrote in message 9ctnu1$cei$[EMAIL PROTECTED]">news:9ctnu1$cei$[EMAIL PROTECTED]... > I use PHP with windows and want create a php4 library from a C sourcecode... > > How to do this ? > > thanx > > > > -- > 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] >
Hello, Using the same script used under Windows2000 IIS 5.0 (where it works) cannot upload file to the server under NT 4.0 IIS4.0 The php ini file, the (tried) uploaded file and modality (cgi) are identical on both platforms. Ideas? thanks Alessio.
Ok, solved. Don't know why but in php.ini on non-functional machine the register_globals var was turned off, so the parameters where not passed with the post command. Thanks all for the answers. Bye, Alessio. ""Alessio Bernesco Lāvore"" <[EMAIL PROTECTED]> ha scritto nel messaggio 9cugcd$7kn$[EMAIL PROTECTED]">news:9cugcd$7kn$[EMAIL PROTECTED]... > Hello, > Using the same script used under Windows2000 IIS 5.0 (where it works) cannot > upload file to the server under NT 4.0 IIS4.0 > The php ini file, the (tried) uploaded file and modality (cgi) are identical > on both platforms. > > Ideas? > > thanks Alessio. > > > > -- > 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] >
Hi there, I am a little new to the whole PHP world and have started playing with it recently. I am trying to get the session thing working but I keep getting the following error: Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, O_RDWR) failed: m (2) in and I don't know why. I have set read/write permissions on the directory that the sessions are stored in, and I have even tried changing this directory (which does not seem to work). Can anyone suggest anything? Shawn
>-----Original Message----- >From: Shawn Anderson >Sent: Friday, May 04, 2001 6:49 PM >but I keep getting the following error: > >Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, . ^ ??? >Can anyone suggest anything?
Shawn, You php.ini file should have something like: ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. session.save_path = C:\temp where C:\temp exists and I_USER_machinename has read/write permissions. It looks like you may have defined the directory as: C:/temp which I don't think works. -Flint -----Original Message----- From: Shawn Anderson [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] PHP 4.05, IIS5 and session... Hi there, I am a little new to the whole PHP world and have started playing with it recently. I am trying to get the session thing working but I keep getting the following error: Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, O_RDWR) failed: m (2) in and I don't know why. I have set read/write permissions on the directory that the sessions are stored in, and I have even tried changing this directory (which does not seem to work). Can anyone suggest anything? Shawn -- 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]
Hmm, I have actually tried both and neither seems to have any effect at all. No matter what I set session.save_path to, it always creates the files in c:\tmp -- very strange :) -Shawn -----Original Message----- From: Flint Doungchak [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 1:04 PM To: 'Shawn Anderson'; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... Shawn, You php.ini file should have something like: ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. session.save_path = C:\temp where C:\temp exists and I_USER_machinename has read/write permissions. It looks like you may have defined the directory as: C:/temp which I don't think works. -Flint -----Original Message----- From: Shawn Anderson [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] PHP 4.05, IIS5 and session... Hi there, I am a little new to the whole PHP world and have started playing with it recently. I am trying to get the session thing working but I keep getting the following error: Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, O_RDWR) failed: m (2) in and I don't know why. I have set read/write permissions on the directory that the sessions are stored in, and I have even tried changing this directory (which does not seem to work). Can anyone suggest anything? Shawn -- 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]
Well if you set session.save_path to "<some-lunatic-path>" I can wildly imagine php will use a kind of default value to save your files.... BUT on the other hand your first statement was about that you could not do an open() on your file... So I can't see the relevance in your comment... /Anders >-----Original Message----- >From: Shawn Anderson [mailto:[EMAIL PROTECTED]] >Sent: Friday, May 04, 2001 7:05 PM >To: Flint Doungchak; [EMAIL PROTECTED] >Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > >Hmm, I have actually tried both and neither seems to have any effect at all. >No matter what I set session.save_path to, it always creates the files in >c:\tmp -- very strange :) > >-Shawn > >-----Original Message----- >From: Flint Doungchak [mailto:[EMAIL PROTECTED]] >Sent: Friday, May 04, 2001 1:04 PM >To: 'Shawn Anderson'; [EMAIL PROTECTED] >Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > >Shawn, > >You php.ini file should have something like: > >; Argument passed to save_handler. In the case of files, this is the path >; where data files are stored. session.save_path = C:\temp > >where C:\temp exists and I_USER_machinename has read/write permissions. It >looks like you may have defined the directory as: > >C:/temp > >which I don't think works. > >-Flint > > >-----Original Message----- >From: Shawn Anderson [mailto:[EMAIL PROTECTED]] >Sent: Friday, May 04, 2001 9:49 AM >To: [EMAIL PROTECTED] >Subject: [PHP-WIN] PHP 4.05, IIS5 and session... > > >Hi there, I am a little new to the whole PHP world and have started playing >with it recently. I am trying to get the session thing working but I keep >getting the following error: > >Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, O_RDWR) failed: m(2) in > >and I don't know why. I have set read/write permissions on the directory >that the sessions are stored in, and I have even tried changing this >directory (which does not seem to work). Can anyone suggest anything? > >Shawn > > > >-- >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] > > >-- >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 have tried c:\temp, c:\php\temp, c:\inetpub\wwwroot\cgi-temp all with the same result and same error code. It would appear that no matter what I set the session save dir to, it does not take effect. BTW, all of those directories have read/write/create permissions set. Shawn -----Original Message----- From: Flint Doungchak [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 1:09 PM To: 'Shawn Anderson' Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... Shawn, Have your tried define something like: C:\stupiddir to see if the ini file is being read correctly? -Flint -----Original Message----- From: Shawn Anderson [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 10:05 AM To: Flint Doungchak; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... Hmm, I have actually tried both and neither seems to have any effect at all. No matter what I set session.save_path to, it always creates the files in c:\tmp -- very strange :) -Shawn -----Original Message----- From: Flint Doungchak [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 1:04 PM To: 'Shawn Anderson'; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... Shawn, You php.ini file should have something like: ; Argument passed to save_handler. In the case of files, this is the path ; where data files are stored. session.save_path = C:\temp where C:\temp exists and I_USER_machinename has read/write permissions. It looks like you may have defined the directory as: C:/temp which I don't think works. -Flint -----Original Message----- From: Shawn Anderson [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] PHP 4.05, IIS5 and session... Hi there, I am a little new to the whole PHP world and have started playing with it recently. I am trying to get the session thing working but I keep getting the following error: Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, O_RDWR) failed: m (2) in and I don't know why. I have set read/write permissions on the directory that the sessions are stored in, and I have even tried changing this directory (which does not seem to work). Can anyone suggest anything? Shawn -- 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]
What about "c:\\temp" ? >-----Original Message----- >From: Shawn Anderson [mailto:[EMAIL PROTECTED]] >Sent: Friday, May 04, 2001 7:37 PM >To: Flint Doungchak >Cc: [EMAIL PROTECTED] >Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > >I have tried c:\temp, c:\php\temp, c:\inetpub\wwwroot\cgi-temp all with the >same result and same error code. It would appear that no matter what I set >the session save dir to, it does not take effect. > >BTW, all of those directories have read/write/create permissions set. > >Shawn
Do you really have a \tmp directory? is it c:\tmp or c:\temp? Which does your php.ini specify? ""Svensson, B.A.T. "" <[EMAIL PROTECTED]> wrote in message 27E647E5629ED211BF78009027289C6302E73927@mail1">news:27E647E5629ED211BF78009027289C6302E73927@mail1... > > > >-----Original Message----- > >From: Shawn Anderson > >Sent: Friday, May 04, 2001 6:49 PM > > >but I keep getting the following error: > > > >Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, > . ^ ??? > > >Can anyone suggest anything? > > -- > 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] >
Where is the php.ini file your editing? c:\windows\php.ini? ""Shawn Anderson"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have tried c:\temp, c:\php\temp, c:\inetpub\wwwroot\cgi-temp all with the > same result and same error code. It would appear that no matter what I set > the session save dir to, it does not take effect. > > BTW, all of those directories have read/write/create permissions set. > > Shawn > > -----Original Message----- > From: Flint Doungchak [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 04, 2001 1:09 PM > To: 'Shawn Anderson' > Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > > Shawn, > > Have your tried define something like: > > C:\stupiddir > > to see if the ini file is being read correctly? > > -Flint > > -----Original Message----- > From: Shawn Anderson [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 04, 2001 10:05 AM > To: Flint Doungchak; [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > > Hmm, I have actually tried both and neither seems to have any effect at all. > No matter what I set session.save_path to, it always creates the files in > c:\tmp -- very strange :) > > -Shawn > > -----Original Message----- > From: Flint Doungchak [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 04, 2001 1:04 PM > To: 'Shawn Anderson'; [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > > Shawn, > > You php.ini file should have something like: > > ; Argument passed to save_handler. In the case of files, this is the path > ; where data files are stored. > session.save_path = C:\temp > > where C:\temp exists and I_USER_machinename has read/write permissions. It > looks like you may have defined the directory as: > > C:/temp > > which I don't think works. > > -Flint > > > -----Original Message----- > From: Shawn Anderson [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 04, 2001 9:49 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] PHP 4.05, IIS5 and session... > > > Hi there, I am a little new to the whole PHP world and have started playing > with it recently. I am trying to get the session thing working but I keep > getting the following error: > > Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, O_RDWR) failed: m > (2) in > > and I don't know why. I have set read/write permissions on the directory > that the sessions are stored in, and I have even tried changing this > directory (which does not seem to work). Can anyone suggest anything? > > Shawn > > > > -- > 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] > > > -- > 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] >
Hello, Im running win2k with iis5, heres what i have in php.ini: /tmp My files are created in my server root, eg. my server files are located in g:\server, and my web docs in g:\server\www and my session files in g:\server\tmp it seems to work fine for me. Let me know if it works or not. ~Jeff In a message dated 5/4/2001 1:07:28 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: > Hmm, I have actually tried both and neither seems to have any effect at all. > No matter what I set session.save_path to, it always creates the files in > c:\tmp -- very strange :) > > -Shawn > >
I better clarify that, hehe, but in my php.ini I have: session.save_path = /tmp Hello, Im running win2k with iis5, heres what i have in php.ini: /tmp My files are created in my server root, eg. my server files are located in g:\server, and my web docs in g:\server\www and my session files in g:\server\tmp it seems to work fine for me. Let me know if it works or not. ~Jeff In a message dated 5/4/2001 1:07:28 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: > Hmm, I have actually tried both and neither seems to have any effect at all. > No matter what I set session.save_path to, it always creates the files in > c:\tmp -- very strange :) > > -Shawn > >
I tried that and it has no effect at all :( -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 2:25 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] PHP 4.05, IIS5 and session... I better clarify that, hehe, but in my php.ini I have: session.save_path = /tmp Hello, Im running win2k with iis5, heres what i have in php.ini: /tmp My files are created in my server root, eg. my server files are located in g:\server, and my web docs in g:\server\www and my session files in g:\server\tmp it seems to work fine for me. Let me know if it works or not. ~Jeff In a message dated 5/4/2001 1:07:28 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: > Hmm, I have actually tried both and neither seems to have any effect at all. > No matter what I set session.save_path to, it always creates the files in > c:\tmp -- very strange :) > > -Shawn > >
The other piece of info that may be helpful is that the session file does get created, I just still get the warning: Warning: open(/tmp\sess_7b79cf61fc29e3b9654ca2bb21251b87, O_RDWR) failed: m (2) in c:\inetpub\wwwroot\interface.php on line 28 and line 28 - start_session(); Shawn -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 2:25 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] PHP 4.05, IIS5 and session... I better clarify that, hehe, but in my php.ini I have: session.save_path = /tmp Hello, Im running win2k with iis5, heres what i have in php.ini: /tmp My files are created in my server root, eg. my server files are located in g:\server, and my web docs in g:\server\www and my session files in g:\server\tmp it seems to work fine for me. Let me know if it works or not. ~Jeff In a message dated 5/4/2001 1:07:28 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: > Hmm, I have actually tried both and neither seems to have any effect at all. > No matter what I set session.save_path to, it always creates the files in > c:\tmp -- very strange :) > > -Shawn > >
I have both, but the php.ini file say session.save_path = c:\tmp ""Joe Brown"" <[EMAIL PROTECTED]> wrote in message 9curi9$294$[EMAIL PROTECTED]">news:9curi9$294$[EMAIL PROTECTED]... > Do you really have a \tmp directory? > is it c:\tmp or c:\temp? > Which does your php.ini specify? > > ""Svensson, B.A.T. "" <[EMAIL PROTECTED]> wrote in message > 27E647E5629ED211BF78009027289C6302E73927@mail1">news:27E647E5629ED211BF78009027289C6302E73927@mail1... > > > > > > >-----Original Message----- > > >From: Shawn Anderson > > >Sent: Friday, May 04, 2001 6:49 PM > > > > >but I keep getting the following error: > > > > > >Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, > > . ^ ??? > > > > >Can anyone suggest anything? > > > > -- > > 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] > > > > > > -- > 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] >
It is currently in c:\winnt\php.ini ""Joe Brown"" <[EMAIL PROTECTED]> wrote in message 9curkt$34g$[EMAIL PROTECTED]">news:9curkt$34g$[EMAIL PROTECTED]... > Where is the php.ini file your editing? > > c:\windows\php.ini? > > ""Shawn Anderson"" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have tried c:\temp, c:\php\temp, c:\inetpub\wwwroot\cgi-temp all with > the > > same result and same error code. It would appear that no matter what I set > > the session save dir to, it does not take effect. > > > > BTW, all of those directories have read/write/create permissions set. > > > > Shawn > > > > -----Original Message----- > > From: Flint Doungchak [mailto:[EMAIL PROTECTED]] > > Sent: Friday, May 04, 2001 1:09 PM > > To: 'Shawn Anderson' > > Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > > > > > Shawn, > > > > Have your tried define something like: > > > > C:\stupiddir > > > > to see if the ini file is being read correctly? > > > > -Flint > > > > -----Original Message----- > > From: Shawn Anderson [mailto:[EMAIL PROTECTED]] > > Sent: Friday, May 04, 2001 10:05 AM > > To: Flint Doungchak; [EMAIL PROTECTED] > > Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > > > > > Hmm, I have actually tried both and neither seems to have any effect at > all. > > No matter what I set session.save_path to, it always creates the files in > > c:\tmp -- very strange :) > > > > -Shawn > > > > -----Original Message----- > > From: Flint Doungchak [mailto:[EMAIL PROTECTED]] > > Sent: Friday, May 04, 2001 1:04 PM > > To: 'Shawn Anderson'; [EMAIL PROTECTED] > > Subject: RE: [PHP-WIN] PHP 4.05, IIS5 and session... > > > > > > Shawn, > > > > You php.ini file should have something like: > > > > ; Argument passed to save_handler. In the case of files, this is the path > > ; where data files are stored. > > session.save_path = C:\temp > > > > where C:\temp exists and I_USER_machinename has read/write permissions. It > > looks like you may have defined the directory as: > > > > C:/temp > > > > which I don't think works. > > > > -Flint > > > > > > -----Original Message----- > > From: Shawn Anderson [mailto:[EMAIL PROTECTED]] > > Sent: Friday, May 04, 2001 9:49 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP-WIN] PHP 4.05, IIS5 and session... > > > > > > Hi there, I am a little new to the whole PHP world and have started > playing > > with it recently. I am trying to get the session thing working but I keep > > getting the following error: > > > > Warning: open(/tmp\sess_2cd53ab5183707a5629c02a5ad9da129, O_RDWR) failed: > m > > (2) in > > > > and I don't know why. I have set read/write permissions on the directory > > that the sessions are stored in, and I have even tried changing this > > directory (which does not seem to work). Can anyone suggest anything? > > > > Shawn > > > > > > > > -- > > 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] > > > > > > -- > > 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] > > > > > > -- > 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'm trying to implement a search on my site. When the user enters a search string and pressed the Search button it sends the search string into a cariable I call searchfor, and I then construct a query that goes something like : "SELECT <whatever> FROM <a table> WHERE product_name LIKE $searchfor..... now I know there are things you can do with LIKE such as '%' to search for an arbitrary number of characters before or after the search string. 'WHERE product_name LIKE '%$searchfor%'....' this has been causing me problems by outputting mostly rubbish, and then I find out that the '$' is used in the LIKE command for matching characters too. How do I construct a SELECT statement that uses a PHP variable in the LIKE clause?
$sql=" .... name like '%".$name."%' "; ----- Original Message ----- From: "r.gelstharp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 05, 2001 2:00 AM Subject: [PHP-WIN] trouble with MySQL 'LIKE' command > I'm trying to implement a search on my site. When the user enters a search > string and pressed the Search button it sends the search string into a > cariable I call searchfor, and I then construct a query that goes something > like : > > "SELECT <whatever> FROM <a table> WHERE product_name LIKE $searchfor..... > > now I know there are things you can do with LIKE such as '%' to search for > an arbitrary number of characters before or after the search string. > > 'WHERE product_name LIKE '%$searchfor%'....' > > this has been causing me problems by outputting mostly rubbish, and then I > find out that the '$' is used in the LIKE command for matching characters > too. > > How do I construct a SELECT statement that uses a PHP variable in the LIKE > clause? > > > > -- > 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] > >
or..... $sql=" ...like '%$name%' "; note $sql="....."; and not '......'; double not single in double quotes your $name is evaluated otherwise you close the string append your variable then apend the rest of the string.... get wat I mean? Xon ----- Original Message ----- From: "r.gelstharp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 05, 2001 2:00 AM Subject: [PHP-WIN] trouble with MySQL 'LIKE' command > I'm trying to implement a search on my site. When the user enters a search > string and pressed the Search button it sends the search string into a > cariable I call searchfor, and I then construct a query that goes something > like : > > "SELECT <whatever> FROM <a table> WHERE product_name LIKE $searchfor..... > > now I know there are things you can do with LIKE such as '%' to search for > an arbitrary number of characters before or after the search string. > > 'WHERE product_name LIKE '%$searchfor%'....' > > this has been causing me problems by outputting mostly rubbish, and then I > find out that the '$' is used in the LIKE command for matching characters > too. > > How do I construct a SELECT statement that uses a PHP variable in the LIKE > clause? > > > > -- > 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] > >
Done like you recommended with the select....like '%".$var."%' but it still gives me empty rows of data. Everytime I try and search for something it returns with 7 rows of data, all of which are blank. I'm using the basic mysql_num_rows to get the number of rows of data it retrieves, and I'm using a WHILE($data = mysql_fetch_array($sql_result)) to output the rows of data. If it's not the SQL statement, what could be doing this? I ask in case you've heard this problem mentioned by some thick newbie like meself before.
I also had the same problem when i tried a couple of months ago on Windows (on IIS). It appears to only work under Unix. -John ""Paul Meagher"" <[EMAIL PROTECTED]> wrote in message 01a801c0d3d6$4adaf6e0$6c35de18@datavore">news:01a801c0d3d6$4adaf6e0$6c35de18@datavore... > I have haven't been able to get Userfulinc's XML-RPC client or server > working on windows. It crashes my Apache web server when I try to. It > could be because I am running PHP as an Apache module which some have > recommeded not doing on windows? Has anybody gotten this piece of software > to work? > > See: http://www.phpbuilder.com/columns/luis20010329.php3?print_mode=1 > > I noticed that there is a PHP extension for Dan Libby's XML-RPC c libary. > > http://sourceforge.net/forum/forum.php?forum_id=77942 > > Is there any plans to add this extension to PHP? Looks like a nice API. > > Regards, > Paul Meagher > > > -- > 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 the last couple of days, I have been evaluating the PHP-based XML-RPC server from Codepunk. I was able to get it to run on my Windows ME platform. The XML-RPC server is called Hailstone and is available for download here: http://www.codepunk.com It looks quite promising. The XML-RPC server has some nice debugging and logging features and the API for constructing message responses is simple and easy to use. I didn't have much success getting the desktop GUI working. Let me know if you are successful in that regard. Regards, Paul Meagher "John Lim" <[EMAIL PROTECTED]> wrote in message news:<9cuti2$2mc$[EMAIL PROTECTED]>... > I also had the same problem when i tried a couple of months ago on Windows > (on IIS). It appears to only work under Unix. > -John > > ""Paul Meagher"" <[EMAIL PROTECTED]> wrote in message > 01a801c0d3d6$4adaf6e0$6c35de18@datavore">news:01a801c0d3d6$4adaf6e0$6c35de18@datavore... > > I have haven't been able to get Userfulinc's XML-RPC client or server > > working on windows. It crashes my Apache web server when I try to. It > > could be because I am running PHP as an Apache module which some have > > recommeded not doing on windows? Has anybody gotten this piece of > software > > to work? > > > > See: http://www.phpbuilder.com/columns/luis20010329.php3?print_mode=1 > > > > I noticed that there is a PHP extension for Dan Libby's XML-RPC c libary. > > > > http://sourceforge.net/forum/forum.php?forum_id=77942 > > > > Is there any plans to add this extension to PHP? Looks like a nice API. > > > > Regards, > > Paul Meagher > > > > > > -- > > 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] > > > > > > -- > 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] > >
Has anyone seen this before or know how to fix it? I am trying to run setup.php from phpProjeckt. Session error! please set the correct temp path in the variable session.save_path at php.ini. The ini file has a value of /tmp does this work on IIS5? Thanks, Chris Boothe [EMAIL PROTECTED]
It works if you have a c:\tmp directory and you run php from the c: drive. However, instead of creating a tmp directory, you may want to alter your php.ini to point it to a directory of your choice. -Joe ""Chris Boothe"" <[EMAIL PROTECTED]> wrote in message 001501c0d4cc$8c78d580$4c347218@fw1">news:001501c0d4cc$8c78d580$4c347218@fw1... Has anyone seen this before or know how to fix it? I am trying to run setup.php from phpProjeckt. Session error! please set the correct temp path in the variable session.save_path at php.ini. The ini file has a value of /tmp does this work on IIS5? Thanks, Chris Boothe [EMAIL PROTECTED]