php-windows Digest 3 May 2001 23:13:05 -0000 Issue 578 Topics (messages 7244 through 7269): R: [PHP-WIN] PHP4 and MS Access 7244 by: Ermanno Iannacci Re: php newbie seeks help! 7245 by: Johan Lundqvist 4.0.5 and crypt() 7246 by: Haagen Waade 7248 by: Daniel Beulshausen 7249 by: Haagen Waade 7253 by: Daniel Beulshausen crypt MySQL password 7247 by: fipo2001.libero.it Installation of Pear on Windows 7250 by: Haagen Waade Re: mysql dump 7251 by: Giro De Roover Don't swf_definebitmap show bitmap in swf? Why?? 7252 by: cecchini new IISConfig.exe, testers needed 7254 by: Cynic Re: Form & MySQL 7255 by: Johannes Janson 7256 by: Tom Mathews 7258 by: fipo2001.libero.it 7269 by: Ignatius Teo XML-RPC for Windows 7257 by: Paul Meagher Oracle fetch array 7259 by: Tom Mathews 7266 by: Joe Brown inserting quotes into a database... 7260 by: Kelvin Luck 7261 by: Andrian Pervazov 7264 by: Kelvin Luck Re: Required to Trim Variables with MSSQL Module 7262 by: Flint Doungchak 7263 by: Flint Doungchak Re: Javascript 7265 by: Dickerson, Monty MicroSoft Visual InterDev 7267 by: Steen RAbol 7268 by: Steen Rabøl 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] ----------------------------------------------------------------------
Use ODBC functions. http://www.php.net/manual/en/ref.odbc.php ----- Original Message ----- From: Net Citizen <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 03, 2001 10:02 AM Subject: [PHP-WIN] PHP4 and MS Access > Hello: > > I'm a newbie to PHP. > > I'm running PHP4 on IIS5 on a Win2K machine. I'd like to query an MS Access > table ("SELECT * FROM Member") from the PHP script. The ODBC DSN is already > set up properly. > > Which PHP functions should I use to do the job? > > Do you know of a tutorial site for this kind of data queries, or queries > from MS SQL Server? > > Thanks for your tips. > > > > > > -- > 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] > >
Not sure, but it sounds like php_crypt.dll would do the trick. Seth Cox wrote: > > Hey! I just installed PHP on my Sambar server. It works great but I have > one question. While reading a book to learn the PHP scripting language, > it talks about having the encrypt() and decrypt() options with an > extension that must be installed on my server to allow those commands. I > have search the php.net site and cannot find any info on it. Does anyone > know how to get the extension so i can install it? > > Thanks so much, > > Seth Cox > Owner - SC Developments > 256.704.7384 - Office > 877.647.6712 - Toll Free > www.scdevelopments.com
I just upgraded to 4.0.5 on the windows platform. When I now run our script's that uses crypt() function, I get: Warning: crypt() is not supported in this PHP build. I figure it's been removed since 4.0.4pl (cause it worked there!) Why? Is it only Windows specific? Haagen Waade.
At 10:34 03.05.2001 +0200, Haagen Waade wrote: >I just upgraded to 4.0.5 on the windows platform. >When I now run our script's that uses crypt() function, I get: >Warning: crypt() is not supported in this PHP build. > >I figure it's been removed since 4.0.4pl (cause it worked there!) Why? >Is it only Windows specific? i just forgot to compile it in :) daniel /*-- daniel beulshausen - [EMAIL PROTECTED] using php on windows? http://www.php4win.de
Ok, that's a good reason :) Any chance for an updated (compiled) one with that one in? Just found out about php4win.de. Great one! Hope you'll get it up back soon. Haagen Waade. > At 10:34 03.05.2001 +0200, Haagen Waade wrote: > >I just upgraded to 4.0.5 on the windows platform. > >When I now run our script's that uses crypt() function, I get: > >Warning: crypt() is not supported in this PHP build. > > > >I figure it's been removed since 4.0.4pl (cause it worked there!) Why? > >Is it only Windows specific? > > i just forgot to compile it in :) > > daniel > > /*-- > daniel beulshausen - [EMAIL PROTECTED] > using php on windows? http://www.php4win.de
At 12:44 03.05.2001 +0200, Haagen Waade wrote: >Ok, that's a good reason :) > >Any chance for an updated (compiled) one with that one in? i'll add it to the 4.0.5 version of php4win.de, tough i'm not sure when the site is going up again. >Just found out about php4win.de. Great one! >Hope you'll get it up back soon. me too :) daniel >Haagen Waade. > > > At 10:34 03.05.2001 +0200, Haagen Waade wrote: > > >I just upgraded to 4.0.5 on the windows platform. > > >When I now run our script's that uses crypt() function, I get: > > >Warning: crypt() is not supported in this PHP build. > > > > > >I figure it's been removed since 4.0.4pl (cause it worked there!) Why? > > >Is it only Windows specific? > > > > i just forgot to compile it in :) > > > > daniel > > > > /*-- > > daniel beulshausen - [EMAIL PROTECTED] > > using php on windows? http://www.php4win.de > > > > >-- >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] /*-- daniel beulshausen - [EMAIL PROTECTED] using php on windows? http://www.php4win.de
I have a form that I use for to collect the data in MySQL and I would to crypt my $DBpassword .. Could you help me with an example ? Thank you very much to all Paul
I'm using pear's db solution, and think it works great (except that oci8/oracle give's no useful error's through db/pear). In *nix it's easy to install pear (script), but I've found none. I solved it by: -renaming "PEAR.php.in" to "PEAR.php" -include pear directory path in the include_path Is this the way to do it, or is it supposed to be another install procedure? Just curiuos. I'm writing a installation guide, and it need's to work with future releases of PHP (on windows).
sorry to be so clueless, but i tried as you mentioned and the page reload itseld like i am doing a reset (form type) and nothing happen. let me give you more explanation where i am: I am using phpmyadmin, i go to the table i want to load the data, then i click on "insert textfile into data" There i use the browse button to identify where my file is, actually in c:\\My documents\\update.txt, then i submit. In first place i don't understand why mysql is referring to a .TMP file located in windows\temp since i tell him to load update.txt. Secondly the .TMP doesn't exist, I went there and did not find it. Every time i try , the .TMP change. I am trying hard to analyse this , and it seems to me that phpmyadmin create a temp file everytime but because he got an error did not get the change to create it or something. Anyway this is where I am, I hope this explanation will help you understand my problem. Thanks Giro "Johan Lundqvist" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Sorry if I was a bit fuzzy... > You have to escape out the "\" by typing "\\", so in your exaple it > would say: > > LOAD DATA LOCAL INFILE 'c:\\Windows\\Temp\\phpC021.TMP' INTO TABLE > my_contact > FIELDS TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES > TERMINATED > BY '\n' > > Since you get the error: > MySQL said: File 'c:windowstempphpc021.tmp' not found (Errcode: 2) > you might see that it took away the backslashes?? If you don't know why, > take a look at php manual Chapter 6. Types and the page about Strings. > > Happy hunting > > /Johan > > Giro De Roover wrote: > > > > How is that done and where ?? > > > > "Johan Lundqvist" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Hi Giro, > > > > > > You'll have to type c:\\Windows\\Temp\\phpC021.TMP > > > > > > /Johan > > > > > > Giro De Roover wrote: > > > > > > > > Hi everyone, > > > > > > > > I am experiencing problem with mysql trying to import a text file with > > data > > > > into a table, i am using phpmyadmin in order to do that, going to insert > > > > textfiles into table and after choosing the file I want to upload i got > > this > > > > error, any help will be appreciated. > > > > > > > > Giro > > > > > > > > Error > > > > SQL-query: > > > > > > > > LOAD DATA LOCAL INFILE 'c:\Windows\Temp\phpC021.TMP' INTO TABLE > > my_contact > > > > FIELDS TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES > > TERMINATED > > > > BY '\n' > > > > MySQL said: File 'c:windowstempphpc021.tmp' not found (Errcode: 2) > > > > > > > > -- > > > > 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] > > -- > 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 try to make a my dinamyc gallery of Jpg in swf format but the swf_definebitmap don't show nothing! Why? WWW.COLORWEBER.IT (the colour on web) :(
Hi there, there's a new version of the installer, if you were affected by the "required OCX not registered" problem, could you please help us testing it? If so, please follow the following instructions. And please, drop me or Phill a note. TIA >From: "Phil Driscoll" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]>, > "Cynic" <[EMAIL PROTECTED]> >Subject: Re: [PHP-QA] IISconfig > >How to test this IISConfig thingy: > >First, a few more words on what the problem is. Some users (and it seems to >be only a very small percentage) report that the php installer fails when >configuring IIS (or PWS) on NT4 or above because an OCX control is not >registered on the system. The OCX control is responsible for displaying the >treeviewer of the IIS scriptmap nodes so the user can select which ones to >map the various php file extensions into. > >The tree viewer is provided by either of two OCX controls, MSComCtl.ocx or >ComCtl32.ocx. These are almost always to be found in the WINNT/System32 >folder on real world machines, however they are not always registered. > >Cynic's modification to the software is to check whether one of the controls >is registered, and if not, to register on or the other. > >To test whether this mod works, first we really need to find a system on >which the original fails (and this can only sensibly be done on Win NT/2000 >running IIS or PWS). I have tried to unregister the controls using regsvr32 >/u comctl32.ocx and regsvr32 /u mscomctl.ocx however even with the things >reportedly unregistered IISConfig still works ok. > >How to do the test: > >Download the old version which I've put at >http://www.dialsolutions.com/phil/php/IISConfig.exe > >Then from the command line, run "IISConfig.exe <path to your php.exe> .php" > >so for example, on my system this would be: > >iisconfig.exe f:\php\php4\php.exe .php > >If one or other of the OCX controls is already registered on your machine >you should get a dialogue box showing a list of your IIS scriptmap nodes, >and you should cancel out of the dialogue box so it doesn't mess up your IIS >configuration. > >If however you get an error message to the effect that an OCX control is not >registered then good - you can help us! > >Run the IISConfig.exe that Cynic posted at >http://www.1st.cz/cynic/IISconfig.zip >with the same command line arguments. > >You should hopefully get a message box informing you that the control has >been registered, then the software should do it's stuff and display the >scriptmap nodes. Cancel out of the dbox and let us know it worked! NB the >software then unregisters the OCX again so that your system is left in the >same state as it was previously. > >If you are an experienced VB hacker and can see a better way of doing all >this stuff, please speak up as neither Cynic nor I are experts in the field >(this is my first - and hopefully only - VB prog). > >Cheers > >-- >Phil Driscoll >Dial Solutions >+44 (0)113 294 5112 >http://www.dialsolutions.com >http://www.dtonline.org [EMAIL PROTECTED] ------------- And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7
Hi, a simple INSERT would do the job. To encrypt password use md5(). Johannes ""fipo2001"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Please, help me. > I need to register the data that I collect with a simple form (FirstName, > SecondName, Email) on a MySQL database. > How I can do it ? > .. and how I can to encrypt the access-password to the MySQL db in the php > page ? > I hope you can help me. > Thx > Paul > > > -- > 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] >
Johannes is correct, but if you're woried about security remember that MD5 is a one way algorithm - you don't need a key to unscramble it. Tom Johannes Janson wrote: > Hi, > > a simple INSERT would do the job. > To encrypt password use md5(). > > Johannes > > ""fipo2001"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Please, help me. > > I need to register the data that I collect with a simple form (FirstName, > > SecondName, Email) on a MySQL database. > > How I can do it ? > > .. and how I can to encrypt the access-password to the MySQL db in the php > > page ? > > I hope you can help me. > > Thx > > Paul > > > > > > -- > > 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]
Could you send to me an example code ? Thx Paul > Johannes is correct, but if you're woried about security remember that MD5 is a > one way algorithm - you don't need a key to unscramble it. > > Tom > > Johannes Janson wrote: > > > Hi, > > > > a simple INSERT would do the job. > > To encrypt password use md5(). > > > > Johannes > > > > ""fipo2001"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Please, help me. > > > I need to register the data that I collect with a simple form (FirstName, > > > SecondName, Email) on a MySQL database. > > > How I can do it ? > > > .. and how I can to encrypt the access-password to the MySQL db in the php > > > page ? > > > I hope you can help me. > > > Thx > > > Paul > > > > > > > > > -- > > > 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: php-list- [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: php-list- [EMAIL PROTECTED] > >
Why not simply use MySQL's PASSWORD() function? Ignatius Teo Project Manager, Internet Access Services Information Technology Directorate Southern Cross University PO Box 157, Lismore NSW 2480 Email: iteo_at_scu_edu_au Phone: +61 2 6620-3221 Fax : +61 2 6620-3033 -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GB/IT$ d++(-)@ s++:++@ a>? C++++ UL !P$ L+ !E W+$ N- o? !K w O---- M- V PS PE++ Y+(--) PGP- t++@ 5-- X++@ R* tv- b+ DI++ D++@ G e++ h---- r+++ y++++** ------END GEEK CODE BLOCK------ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, 3 May 2001 23:47 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Form & MySQL Could you send to me an example code ? Thx Paul > Johannes is correct, but if you're woried about security remember that MD5 is a > one way algorithm - you don't need a key to unscramble it. > > Tom > > Johannes Janson wrote: > > > Hi, > > > > a simple INSERT would do the job. > > To encrypt password use md5(). > > > > Johannes > > > > ""fipo2001"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Please, help me. > > > I need to register the data that I collect with a simple form (FirstName, > > > SecondName, Email) on a MySQL database. > > > How I can do it ? > > > .. and how I can to encrypt the access-password to the MySQL db in the php > > > page ? > > > I hope you can help me. > > > Thx > > > Paul > > > > > > > > > -- > > > 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: php-list- [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: php-list- [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 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
In MySQL, you can run something like this: - while ($row1=mysql_fetch_array($result_set)){ $name=$row1[Column1]; $desc=$row1[Column3]; echo"<tr><td>$name</td><td>$desc</td></tr>"; Does anyone know a way of doing the same with oracle - by which I mean refering to the columns in the array by name rather than by index (ie not while (ora_fetch_into($curs, &$row1)){ $name=$row1[0]; $desc=$row1[2]; echo"<tr><td>$name</td><td>$desc</td></tr>"; ) Thanks Tom
while (ora_fetch_into($curs, &$row1)){ explode($row1); echo "$NAME now = ".$rowl[1]; (I think the function is explode, if not I'm sure it begins with an e, if that helps... ;-) "Tom Mathews" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In MySQL, you can run something like this: - > > while ($row1=mysql_fetch_array($result_set)){ > $name=$row1[Column1]; > $desc=$row1[Column3]; > echo"<tr><td>$name</td><td>$desc</td></tr>"; > > Does anyone know a way of doing the same with oracle - by which I mean > refering to the columns in the array by name rather than by index (ie > not > > while (ora_fetch_into($curs, &$row1)){ > $name=$row1[0]; > $desc=$row1[2]; > echo"<tr><td>$name</td><td>$desc</td></tr>"; > ) > > Thanks > > Tom > > ---------------------------------------------------------------------------- ---- > -- > 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, I am having trouble inserting single quotes into an mssql database... my queries are taking the form: mssql_query("update discussiontopics set comment = '$comment', title = '$title', zoneid = $zoneID where topicid = $topicID"); If $comment or $title contain any single quote characters I get an sql error. I thought that addSlashes() was meant to avoid these problems but it hasn't helped me... Neither has quotemeta()... Are there any other hint's for inserting single quotes into mssql databases? tia, Kelvin.
Turn on the magic_quotes_sybase setting in your php.ini file. Or, if you prefer to do it manually, replace all single quotes in the fields with two consecutive single quotes. Andrian Kelvin Luck wrote: > > Hi, > I am having trouble inserting single quotes into an mssql database... my > queries are taking the form: > > mssql_query("update discussiontopics set comment = '$comment', title = > '$title', zoneid = $zoneID where topicid = $topicID"); > > If $comment or $title contain any single quote characters I get an sql > error. I thought that addSlashes() was meant to avoid these problems but it > hasn't helped me... Neither has quotemeta()... Are there any other hint's > for inserting single quotes into mssql databases? > tia, > > Kelvin. > > -- > 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, Thanks for the responses. I'd tried inserting '' instead of ' but I was then addSlashes() afterwards which meant that it didn't work because this had become \'\' before it met the query... It all works fine now, and I have enabled magic_quotes_sybase so I don't have to add any string processing at all... Thanks for all the help, Kelvin. -----Original Message----- From: Dena Marchant [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 16:32 To: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] inserting quotes into a database... Kelvin, try replacing all of the ' with '' -----Original Message----- From: Tom Mathews [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 16:38 To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] inserting quotes into a database... In Oracle, you just doubl eup the characters. By this I mean change any occurances of ' to '' (use a string function!) before you try to insert the data. Tom
Frank, Here's some additional info. The following code snippet does the following: -----Original Message----- From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 9:56 PM To: Flint Doungchak Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Required to Trim Variables with MSSQL Module Hi Flint, Unless we have a bug in the MSSQL extension it is supposed to function in one of two ways depending on the setting of mssql.compatability_mode in php.ini: mssql.compatability_mode = off Columns are returned according to the type defined in the database. integers of anty size becomes a LONG, char, varchar and text becomes a STRING etc. mssql.compatability_mode = on All column are returned as strings no matter how they are defined in the database. No matter what mode you are using trailing spaces will be removed from any STRING values. Leading spaces will not be removed ! - Frank > Hi all, > > I've got a rather iritating problem. I recently moved a site from PHP 3.0.11 > to 4.0.5 RC1. It seems, and I have noticed this for a while in other > scripts, that variables returned from MSSQL sometimes need to be trimmed > with trim() in order to function correctly. > > Sometimes they won't evaluate as integers (i.e. they don't add right), other > times they don't evaluate right as strings (i.e. with if (!$row[crap]), and > other times if I have a header redirect (i.e. Header("Location: > ./index.php?crap=$row[crap]") ) I get the infamous CGI header problem. > > I generally retrieve with $row = mssql_fetch_array($result); > > In all cases adding trim will fix the problem. Anyone had similar problems. > Am I missing something. This seems to be odd behavior. I really don't want > to go through all my scripts and trip stuff. > > Thanks, > > -Flint > > > > -- > 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, Let's try that again... Don't know what happened... $row = mssql_fetch_row($result); $questionid=$row[0]; echo "$questionid<br>"; $length = strlen($questionid); echo "length: $length"; $row[0] is defined as an interger. - With compatibility mode on and off the length of the string is 20. - If I add trim($row[0]) I get the length of 4 (which is what i want). Any thoughts? -Flint -----Original Message----- From: Frank M. Kromann [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 02, 2001 9:56 PM To: Flint Doungchak Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Required to Trim Variables with MSSQL Module Hi Flint, Unless we have a bug in the MSSQL extension it is supposed to function in one of two ways depending on the setting of mssql.compatability_mode in php.ini: mssql.compatability_mode = off Columns are returned according to the type defined in the database. integers of anty size becomes a LONG, char, varchar and text becomes a STRING etc. mssql.compatability_mode = on All column are returned as strings no matter how they are defined in the database. No matter what mode you are using trailing spaces will be removed from any STRING values. Leading spaces will not be removed ! - Frank > Hi all, > > I've got a rather iritating problem. I recently moved a site from PHP 3.0.11 > to 4.0.5 RC1. It seems, and I have noticed this for a while in other > scripts, that variables returned from MSSQL sometimes need to be trimmed > with trim() in order to function correctly. > > Sometimes they won't evaluate as integers (i.e. they don't add right), other > times they don't evaluate right as strings (i.e. with if (!$row[crap]), and > other times if I have a header redirect (i.e. Header("Location: > ./index.php?crap=$row[crap]") ) I get the infamous CGI header problem. > > I generally retrieve with $row = mssql_fetch_array($result); > > In all cases adding trim will fix the problem. Anyone had similar problems. > Am I missing something. This seems to be odd behavior. I really don't want > to go through all my scripts and trip stuff. > > Thanks, > > -Flint > > > > -- > 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] > > >
John, ?: are you setting a Content-type header in your php script which outputs text/javascript > -----Original Message----- > From: Ignatius Teo [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 10:45 PM > To: 'John'; [EMAIL PROTECTED] > Subject: RE: [PHP-WIN] Javascript > > > This may seem like silly questions, but... > > 1. Have you configured your web server to handle php scripts? > 2. Are you able to run php scripts normally? > 3. Does your script return valid javascript code? > > Ignatius > > -----Original Message----- > From: John [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 3 May 2001 12:20 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Javascript > > Is there a way to use a JavaScript to call php: > > ie: > > <script language=javascript src="phpscript.php"></script> > > > I have tried this and it will not run the PHP... this works > in ASP... I'm a > PHP newbie.. > > Any help is appreciated... > > Thanks!!!
Hi Does anyone use Microsoft Visual Interdev to PHP coding/debugging, If yes, is there a FAQ on how to set it up ? Thanks in advance. Steen
Hi Does anyone use Microsoft Visual Interdev to PHP coding/debugging, If yes, is there a FAQ on how to set it up ? Thanks in advance. Steen