php-windows Digest 15 Aug 2001 21:04:10 -0000 Issue 704 Topics (messages 8863 through 8883): urgant 8863 by: ashok sundaram 8870 by: Hugh Bothwell .php opening as text document 8864 by: Craig 8869 by: Hugh Bothwell Income on the Net! 8865 by: Noel Hadfield Explode Your Business! 8866 by: Customer Service a bottle in the sea... 8867 by: rashkatsa mail function 8868 by: Camelia Moldovan 8871 by: Angie Tollerson 8874 by: Camelia Moldovan 8875 by: hassan el forkani 8876 by: Angie Tollerson Re: how to show image from mssql server 8872 by: Svensson, B.A.T. Re: win2000 8873 by: Angie Tollerson Retrieving "text" > 4K SQL Server 7.0 8877 by: Al 8883 by: Al problem with ereg_replace 8878 by: Elias Santiago 8879 by: Elias Santiago trying to code a simple hyperlink. Can anyone spot my error 8880 by: bryan 8881 by: Michael Rudel 8882 by: Hugh Bothwell Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
hi, i am facing problem while using the following code even the socket dosent work i am using php 4... web server xitami os min ME note :- what is GD . how to check it exist or not in the below code i am get fatel error(function imagecreate() not found) //************************************// <?php header("Content-type: image/gif"); $im = ImageCreate(100,20); $red=ImageColorAllocate($im,255,0,0); $white=ImageColorAllocate($im,255,255,255); ImageString($im,3,3,3,"Ashok",$white); ImageGif($red); ImageDestroy($im); ?> //************************************// reply soon _________________________________________________________ For Rs. 2,000,000 worth of Aptech scholarships click below http://clients.rediff.com/clients/aptechsch/index1.htm
"Ashok Sundaram" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i am facing problem while using the following code > PHP 4/Xitami/WinME > note :- what is GD . GD is a graphics library - it defines the graphics functions you are trying to use. > how to check it exist or not Edit your php.ini file (should be in \windows); delete the semicolon in front of the line ;extension=php_gd.dll and restart the web server.
Hi I'm trying to set up hlstats which users hlstats.php but every time I try run the file in IE the .php file opens as a text file and displays all the code. I'm using Win 98 Internet Explorer 5.5
"Craig" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > I'm trying to set up hlstats which users hlstats.php but every time I try > run the file in IE the .php file opens as a text file and displays all the > code. > > I'm using Win 98 > Internet Explorer 5.5 What web server are you running? ... you *are* pulling the document through a web server, right? ;-)
Here is an opportunity that you can take up FREE. If you join as an affiliate, we'll teach you how to build a profitable business on the Internet, using our system to create an income stream and earn income globally, 24 hours a day. Don't let this opportunity slip past you - our organization is already well over 2 million strong and growing at around 6,000 each day! Join us and let's work together to get a share of all those members. Just hit: mailto:[EMAIL PROTECTED]?Subject=Opportunity To be removed from this list, hit: mailto:[EMAIL PROTECTED]?Subject=Remove
Hello ! I've read a lot of web, news and archives for two days and i've not resolve my problem. Here it is : Configuration : Apache 1.3.20 (Win32) / PHP 4.0.5 / MySQL 3.23.39 / Windows 2000 Pro (SP2 and update ok). Services : Apache and MySQL runs as services under 'toto' account. Note : i use apache with php module As written in http://www.mysql.com/doc/A/c/Access_denied.html, i've checked all my mySQL configuration and it seems good. I can log on my database with >mysql -u toto -p12345 titi and it works fine. as they said : "If you are able to connect using the mysql client, there is a problem with your program and not with the access privileges." Note : * select host,user from mysql.user gives (localhost,root) and (localhost,toto) * select host,db,user from db gives (localhost,toto,titi) [I've removed anonymous users and hosts that are not 'localhost'] So look at the (very simple !) HTML/PHP : <html><head><title>try</title></head> <body> <?php $dbhost="localhost"; $dbuser="toto"; $dbpass="12345"; $dbname="titi"; $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die("bad Connection"); mysql_select_db($dbname,$conn) or die("titi database not found"); mysql_close($conn); ?> </body></html> and i have this message : "Warning: MySQL Connection Failed: Access denied for user: 'toto@localhost' (Using password: NO)" the only way to match this warning is to connect with mysql client without the password : >mysql -u toto titi "ERROR 1045: Access denied for user: 'dnd3e@localhost' (Using password: NO)" [If it was a password that doesn't match i should find at the end (Using password: YES), isn't it ? and with same parameters, the mysql client connect without problems] I conclude that PHP script connect without the password argument ! As it seems impossible, i ask on this list some help thanks for your help regards, rashkatsa
when I use mail() function in a script I receive 2 e-mails(??). I tried to use die() but it didn't help. any ideeas? __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Camelia, We'd really have to see the script itself. It is probably your code in some weird way because I use mail() all the time and don't get 2 emails. Show us your code :) Angie Tollerson Alliance Technologies Web Programmer (515)245-7628 [EMAIL PROTECTED] >>> Camelia Moldovan <[EMAIL PROTECTED]> 08/15/01 07:01AM >>> when I use mail() function in a script I receive 2 e-mails(??). I tried to use die() but it didn't help. any ideeas? __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- 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]
$sql1="insert into alegere(ClientId,OfertaId,DomId,DomNume) VALUES ('$id','$host','$tip_dom','$numedom')"; //$sql1="insert into alegere(ClientId) VALUES ('$id')"; $rez1=mysql_query($sql1,$dblnk); $text="A aparut un nou client cu urmatoarele date de identificare."."\n"."Nume : ".$nume."\n"."Prenume: ".$prenume."\n"."Firma: ".$firma."\n"."Cod Fiscal".$codfiscal."\n"."Adresa: ".$adresa1."\n"."Mail: ".$mail."\n"."Telefon: ".$telefon."\n"."Telefon mobil: ".$telefon_mobil."\n"."Nume Domeniu :" .$numedom.$tip; $test=mail("[EMAIL PROTECTED]","client nou ",$text, "From: [EMAIL PROTECTED]\n" ) $sql=" select cantitate, pret_web from oferta where ofertaid='$tip_h' "; $rez=mysql_query($sql,$dblnk); $row=mysql_fetch_array($rez); $cant=$row['cantitate']; $pret=$row['pret_web']; --- Angie Tollerson <[EMAIL PROTECTED]> wrote: > Camelia, We'd really have to see the script itself. > It is probably your code in some weird way because I > use mail() all the time and don't get 2 emails. > Show us your code :) > > Angie Tollerson > Alliance Technologies > Web Programmer > (515)245-7628 > [EMAIL PROTECTED] > > >>> Camelia Moldovan <[EMAIL PROTECTED]> > 08/15/01 07:01AM >>> > when I use mail() function in a script I receive 2 > e-mails(??). > I tried to use die() but it didn't help. > any ideeas? > > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute > with Yahoo! Messenger > http://phonecard.yahoo.com/ > > -- > 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] > > __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
hi what kind of email client are you using, could be a client issues, some of them do not properly delete emails after retrievals and end up downloading them twice; just a guess anyway post some code for a more interesting answers:)) regards At 15:16 15/08/01, Angie Tollerson wrote: >Camelia, We'd really have to see the script itself. It is probably your >code in some weird way because I use mail() all the time and don't get 2 >emails. >Show us your code :) > >Angie Tollerson >Alliance Technologies >Web Programmer >(515)245-7628 >[EMAIL PROTECTED] > > >>> Camelia Moldovan <[EMAIL PROTECTED]> 08/15/01 07:01AM >>> >when I use mail() function in a script I receive 2 >e-mails(??). >I tried to use die() but it didn't help. >any ideeas? > > >__________________________________________________ >Do You Yahoo!? >Make international calls for as low as $.04/minute with Yahoo! Messenger >http://phonecard.yahoo.com/ > >-- >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]
Camelia, I'm sure this has nothing to do with your problem, but I am curios: why are you setting a void function, mail() into the variable $test? what is the purpose of that? I don't even see in your code where you used $test again? Please explain... Angie Tollerson Alliance Technologies Web Programmer (515)245-7628 [EMAIL PROTECTED] >>> Camelia Moldovan <[EMAIL PROTECTED]> 08/15/01 08:34AM >>> $sql1="insert into alegere(ClientId,OfertaId,DomId,DomNume) VALUES ('$id','$host','$tip_dom','$numedom')"; //$sql1="insert into alegere(ClientId) VALUES ('$id')"; $rez1=mysql_query($sql1,$dblnk); $text="A aparut un nou client cu urmatoarele date de identificare."."\n"."Nume : ".$nume."\n"."Prenume: ".$prenume."\n"."Firma: ".$firma."\n"."Cod Fiscal".$codfiscal."\n"."Adresa: ".$adresa1."\n"."Mail: ".$mail."\n"."Telefon: ".$telefon."\n"."Telefon mobil: ".$telefon_mobil."\n"."Nume Domeniu :" .$numedom.$tip; $test=mail("[EMAIL PROTECTED]","client nou ",$text, "From: [EMAIL PROTECTED]\n" ) $sql=" select cantitate, pret_web from oferta where ofertaid='$tip_h' "; $rez=mysql_query($sql,$dblnk); $row=mysql_fetch_array($rez); $cant=$row['cantitate']; $pret=$row['pret_web']; --- Angie Tollerson <[EMAIL PROTECTED]> wrote: > Camelia, We'd really have to see the script itself. > It is probably your code in some weird way because I > use mail() all the time and don't get 2 emails. > Show us your code :) > > Angie Tollerson > Alliance Technologies > Web Programmer > (515)245-7628 > [EMAIL PROTECTED] > > >>> Camelia Moldovan <[EMAIL PROTECTED]> > 08/15/01 07:01AM >>> > when I use mail() function in a script I receive 2 > e-mails(??). > I tried to use die() but it didn't help. > any ideeas? > > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute > with Yahoo! Messenger > http://phonecard.yahoo.com/ > > -- > 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] > > __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- 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]
Long time I saw that, but I believe you should be able to give a reference on the IMG directivity to a script, and the script should then query the database for the image. Some thing like: <IMG src="MyImageScript.php" alt="Stupid bandwith wasting picture"> /Anders >-----Original Message----- >From: sur-php [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, August 15, 2001 7:05 AM >To: [EMAIL PROTECTED] >Subject: [PHP-WIN] how to show image from mssql server > > >Hello php-windows, > > This is my query: > > $query= " select Image from ImageTable where MainCode='040191' "; > > it returns data like this.. > >0x424d2e040000000000003e00000028000000770000003f000000010001000000 >0000f00300000000000000000000020000000000000000000000ffffff00ffffff >fff03fffffffffffffffffff00f03fffffe01ffffffffffcff8fffff00e00fffff >cfcfff7ffffff8ff07ffff00cfc3ffff9fe7ff3ffffff87f33ffff00 > >i know that this is BLOB data... >(which are actually small bmp files) >so how can i show it in web page.... > > > >-- >Best regards, > sur-php mailto:[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] >
The most common errors I see for set up are: 1. You need to right click on your website in IIS, choose properties, and on the home directory tab choose configure. Then add the extension .php to be run using C:\php\php.exe (or whereever you installed it) MAP IT! 2. On that same tab, you need to make sure your web is set to run Scripts, not executables, just scripts. 3. you need to go to the php scripts through explorer, not IIS, and make sure they have the security option for internet guest (or whatever account accessibility you prefer) to read/execute them. 4. Always test php execution with a document that has ONLY this in it: <?php phpinfo(); ?> to get the php stats out. I can't tell you how many times a person has sworn up and down their code is good, when it really isn't. With the code above, you cannot possibly mess it up but you get immediate results. Angie Tollerson Alliance Technologies Web Programmer (515)245-7628 [EMAIL PROTECTED] >>> Flint Doungchak <[EMAIL PROTECTED]> 08/14/01 05:15PM >>> Darren, At the risk of sounding a lot of Phill :p, you probably have a permission problem somewhere. Take a look at the install.txt file available in the PHP4.0.x directory. It's pretty helpful. I've included it just in case. -Flint -----Original Message----- From: Darren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 3:01 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] win2000 Hello all. At home i have a windows 95 machine with apache, pws mysql and mysql. I followed the installation instructions and it worked fine. I got a new job and at work everything was win2k. Before i got to my own machine at work i installed php on my bosses machine wich was running IIS and of corse personal web manager. I installed php there.. Again no problem. I got my own machine at work. I installed win2k and all the same stuff on my machine including IIS. then i installed php exactly the same as i had on other machines and all i get the expected headers error message. I followed the instructons to the letter as i had done every tme before. I even got fed up with iis and disabled it in favour of apache. I tried setting that up according to the instructions and guess what. Server errors. Any ideas? Yours going mad Darren -- 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]
Setup: PHP 4 and Apache on NT 4; SQL Server 7.0 on NT 4, Unified ODBC using SQL Server ODBC driver. How does one go about getting "text" data out of SQL Server 7.0 using PHP's Unified ODBC drivers? This is "text" data... not varchar()! I can PUT as much data as I want into a "text" column in a table, but I can only GET 4096 bytes in a SELECT. Reading the SQL 7.0 docs, it says 4K is the default amount of data that's allowed in a SELECT statement. However, the same docs say that when using ODBC, the driver sets it to return the max allowed for the machine (~2GB). I can whip up a Delphi app to use the same ODBC DSN and pull all the "text" data out of the column, but I just can't get it to work using PHP. I realize there's lots of hidden stuff in Delphi's BDE, so I know that's not a valid comparison. I've also tried using the PHP MSSQL drivers and I get the same results, so I'm sure there's something I'm missing on the SQL Server 7.0 end. Help?!?! -Al
I found my answer! The PHP.INI file sets "odbc.defaultrl = 4096". Setting this to 0 removes any size limitation (passthru). However, while SQL Server gladly accepted 710K from a form textarea, PHP did nasty things when it tried to put 710K into a string variable [$s_description = odbc_result ($resultset, "f_description");] I found that I can use 128K (odbc.defaultrl = 131072) without any problems, and for my purposes, that should be sufficient. -Al On Wed, 15 Aug 2001 15:26:45 GMT, [EMAIL PROTECTED] (Al) wrote: >Setup: PHP 4 and Apache on NT 4; SQL Server 7.0 on NT 4, Unified ODBC >using SQL Server ODBC driver. > >How does one go about getting "text" data out of SQL Server 7.0 using >PHP's Unified ODBC drivers? This is "text" data... not varchar()! > >I can PUT as much data as I want into a "text" column in a table, but >I can only GET 4096 bytes in a SELECT. > >Reading the SQL 7.0 docs, it says 4K is the default amount of data >that's allowed in a SELECT statement. However, the same docs say that >when using ODBC, the driver sets it to return the max allowed for the >machine (~2GB). > >I can whip up a Delphi app to use the same ODBC DSN and pull all the >"text" data out of the column, but I just can't get it to work using >PHP. I realize there's lots of hidden stuff in Delphi's BDE, so I know >that's not a valid comparison. > >I've also tried using the PHP MSSQL drivers and I get the same >results, so I'm sure there's something I'm missing on the SQL Server >7.0 end. > >Help?!?! > >-Al
I'm trying to replace all relative links in a string like: str$="<a href="jan_may2000/files.html">" to str$="<a href="http://myhost.com/jan_may2000/files.html">" I don't want to change any links that begining with http or mailto links. my code is: <? // change all relative links to include base url $url = "news/"; $fnd = "a href=\"[^http)(mailto)#]"; $str_new = ereg_replace($fnd, "a href=\"" . $url . "", $str_old); $news_body = $str_new; ?> $str_old has the complete html body of the page (all content between <BODY> tags), so none of the other html must be touched It works, EXCEPT that $str_new returns what I want but strips the first character after href. Using the example given above: IF str$="<a href="jan_may2000/files.html">" after using the ereg function it becomes : str$="<a href="http://myhost.com/an_may2000/files.html">" ^^ notice the missing character. What I'm doing wrong?
Sorry, on the previous post $fnd = "a href=\"[^http)(mailto)#]"; should be: $fnd = "a href=\"[^(http)(mailto)#]";
I am very new, and trying to get php to generate a hyperlink to the client. I am just trying to get an underlined link to an "accessgranted.htm" page. Can anyone spot my error? Return email will be greatly appreciated. Thanks :-)Bryan _______________________________________ <html> <head> </head> <body> <?php { echo "<A HREF= ""accessgranted.htm"" "; echo " >" ; echo"click here"; echo"</A>"; } ?> </body> </html>
Hi Brian, echo "<A HREF= \"accessgranted.htm\" "; or echo '<A HREF= "accessgranted.htm" '; Greetinx, Mike Michael Rudel - Web-Development, Systemadministration - Besuchen Sie uns am 20. und 21. August 2001 auf der online-marketing-düsseldorf in Halle 1 Stand E 16 _______________________________________________________________ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de _______________________________________________________________ > -----Original Message----- > From: bryan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 15, 2001 5:57 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] trying to code a simple hyperlink. Can > anyone spot my > error > > > I am very new, and trying to get php to generate a hyperlink > to the client. > I am just trying to get an underlined link to an > "accessgranted.htm" page. > > Can anyone spot my error? Return email will be greatly appreciated. > Thanks > :-)Bryan > _______________________________________ > > <html> > <head> > </head> > <body> > <?php > { > > echo "<A HREF= ""accessgranted.htm"" "; > echo " >" ; > echo"click here"; > > echo"</A>"; > } > ?> > > </body> > > </html> > > > > > -- > 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] >
"Michael Rudel" <[EMAIL PROTECTED]> wrote in message 005601c125a3$86f5fed0$[EMAIL PROTECTED]">news:005601c125a3$86f5fed0$[EMAIL PROTECTED]... > From: bryan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 15, 2001 5:57 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] trying to code a simple hyperlink. Can > > Can anyone spot my error? Return email will be greatly appreciated. > > echo "<A HREF= ""accessgranted.htm"" "; > > echo " >" ; > > echo"click here"; > > echo"</A>"; > echo "<A HREF= \"accessgranted.htm\" "; > echo '<A HREF= "accessgranted.htm" '; ... I find that using double-quotes for the string and single quotes within the string is the most flexible and readable, ie echo "<a href='accessgranted.htm'>click here</a>"; because that allows you to write variables inline, echo "<a href='access.php?var=$varlist'>with params</a>"; YMMV, of course.