php-windows Digest 18 Apr 2001 22:04:19 -0000 Issue 551 Topics (messages 6815 through 6844): Re: PHP4 won't display page 6815 by: Phil Driscoll Re: PDF_open_memory_image() 6816 by: Wenz Christian Re: Can you please help me! 6817 by: Johannes Janson 6818 by: Giro De Roover Re: eregi in an IF statement.... 6819 by: Asendorf, John 6821 by: Yasuo Ohgaki LDAP 6820 by: Leplanois Emmanuel MSSQL varchar fields truncation revisited 6822 by: Andrian Pervazov 6826 by: Kelvin Luck 6827 by: Dan Cleveland 6831 by: Frank M. Kromann Re: mssql and php4 6823 by: joel.intwebservices.com 6824 by: joel.intwebservices.com 6825 by: Kelvin Luck 6832 by: Frank M. Kromann Best non-tackified grip enhancer for golfers, 6828 by: 2hWQtSqND.excite.com Re: imap_headers($mbox) 6829 by: Dan Re: Xitami Config 6830 by: PHPWIN Newbie seeks help with PHP database connection problems 6833 by: r.gelstharp Newbie seeks help with PHP and MySQL 6834 by: r.gelstharp 6836 by: Johannes Janson 6844 by: Plutarck file .htaccess 6835 by: fipo2001 Re: Text area 6837 by: Rasna Baruah 6838 by: Tomasz Abramowicz 6839 by: Rasna Baruah 6840 by: Rasna Baruah help with php4 installation 6841 by: RJ 6843 by: Frank M. Kromann newbie needs help setting up PHP4 with win98 SE and PWS 6842 by: RJ 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] ----------------------------------------------------------------------
Your httpd.conf file has a mixture of cgi abd module configuration for php. For the apache module, you don't need the script alias line or the action line. Get rid of them and put your script directly in the htdocs folder for starters. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
ok, thanks for the info; I only tried PHP 4.0.5 RC1 and no newer build. Since it works just fine under Unix/Linux, that's no real problem :-) Regards Christian -----Original Message----- That function was not in PHP 4.0.4pl1. You need a recent build. -Rasmus On Tue, 17 Apr 2001, Christian Wenz wrote: > Hello there, > > just before I file this as a bug: Can someone reproduce that calling > PDF_open_memory_image w/ PHP 4.0.4pl1 always results in "call to > undefined function"? I have GD and PDF library loaded, and other GD and > PDF functions work just fine. > > Regards > Christian >
Hi, I'd be delighted to help you if I can but I can't if you don't describe what do you want to DO? Installing PHP, configuring it? Setting up MySQL? Johannes ""Manesh"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK.. i have win2k and i have some tutorials can you tell me exactly what to > do? i have frontpages 2k PLEASE PLEASE PLEASE > > > -- > 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 strongly recommend the book "PHP Fast&Easy" from Julie Meloni follow exactly all the chapter and you will got everything basic working. Also you can go to her web site at www.thickbook.com and get the toturial and all the code. The book got also a cd rom with apache, php4 and mysql alll for $24. the best deal in town!! Serously it's worth the try i was in the same situation than you a month ago. Giro ""Manesh"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK.. i have win2k and i have some tutorials can you tell me exactly what to > do? i have frontpages 2k PLEASE PLEASE PLEASE > > > -- > 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 stared at that for an hour and never saw it... Thanks Brad. --------------------- John Asendorf - [EMAIL PROTECTED] Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Aliquando et insanire iucundum est > -----Original Message----- > From: Brad S. Jackson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 17, 2001 5:42 PM > To: Asendorf, John > Subject: Re: [PHP-WIN] eregi in an IF statement.... > > > > > Why do you have two )) at the end of the eregi calls? > > > "Asendorf, John" <[EMAIL PROTECTED]> wrote: > I'm attempting to fix a little flaw that I have. > > I have a legacy database which has a mix of 10 and 7 digit > phone numbers in > it. > > I first designed the function format_phone with this (under > the assumption > of 10 digit phone numbers): > > function format_phone ( $phone ) { > > $phone = eregi_replace ( > "([0-9]{3,3})([0-9]{3,3})([0-9]{4,4})", "(\\1) > \\2-\\3" , $phone ); > return $phone; > } > > > It worked just fine... > > But when I switched to the code below, it doesn't work with any of the > numbers, they all come back as not recognized. > > > if ( eregi ( "([0-9]{3,3})([0-9]{3,3})([0-9]{4,4}))" , $phone > , $edit ) ) { > //10 digits > $phone = "(" . $edit[1] . ") " . $edit[2] . "-" . $edit[3]; > } > > elseif ( eregi ( "([0-9]{3,3})([0-9]{4,4}))" , $phone , $edit ) ) { > //7 digits > $phone = $edit[1] . "-" . $edit[2]; > } > > else { echo "phone not recognized"; } > > > Any suggestions? > > John > >
You have additional ")" and this makes you regex invalid. > > if ( eregi ( "([0-9]{3,3})([0-9]{3,3})([0-9]{4,4}))" , $phone > > elseif ( eregi ( "([0-9]{3,3})([0-9]{4,4}))" , $phone , $edit ) ) { I guess you are not displaying all errors. Try error_reporting = E_ALL (PHP4) or 15 (PHP3). You should see warnings. Regards, -- Yasuo Ohgaki ""Asendorf, John"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I stared at that for an hour and never saw it... > > Thanks Brad. > > --------------------- > John Asendorf - [EMAIL PROTECTED] > Web Applications Developer > http://www.lcounty.com - NEW FEATURES ADDED DAILY! > Licking County, Ohio, USA > 740-349-3631 > Aliquando et insanire iucundum est > > > > -----Original Message----- > > From: Brad S. Jackson [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, April 17, 2001 5:42 PM > > To: Asendorf, John > > Subject: Re: [PHP-WIN] eregi in an IF statement.... > > > > > > > > > > Why do you have two )) at the end of the eregi calls? > > > > > > "Asendorf, John" <[EMAIL PROTECTED]> wrote: > > I'm attempting to fix a little flaw that I have. > > > > I have a legacy database which has a mix of 10 and 7 digit > > phone numbers in > > it. > > > > I first designed the function format_phone with this (under > > the assumption > > of 10 digit phone numbers): > > > > function format_phone ( $phone ) { > > > > $phone = eregi_replace ( > > "([0-9]{3,3})([0-9]{3,3})([0-9]{4,4})", "(\\1) > > \\2-\\3" , $phone ); > > return $phone; > > } > > > > > > It worked just fine... > > > > But when I switched to the code below, it doesn't work with any of the > > numbers, they all come back as not recognized. > > > > > > if ( eregi ( "([0-9]{3,3})([0-9]{3,3})([0-9]{4,4}))" , $phone > > , $edit ) ) { > > //10 digits > > $phone = "(" . $edit[1] . ") " . $edit[2] . "-" . $edit[3]; > > } > > > > elseif ( eregi ( "([0-9]{3,3})([0-9]{4,4}))" , $phone , $edit ) ) { > > //7 digits > > $phone = $edit[1] . "-" . $edit[2]; > > } > > > > else { echo "phone not recognized"; } > > > > > > Any suggestions? > > > > John > > > > > > -- > 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 use LDAP with PHP. I am able to connect but not to bind ??? extrait du code source : echo "<h3>LDAP query test</h3>"; echo "Connexion ..."; $ds=ldap_connect("xx.yy.zz.tt"); echo "Résultat de la connexion : ".$ds."</p>"; if ($ds) { $r=ldap_bind($ds); echo "Erreur ".ldap_error($ds)."</p>"; echo "Lien résultat est ".$r."</p>"; } resultat : LDAP query test Connexion ...Résultat de la connexion : 1 Warning: LDAP: Unable to bind to server: Can't contact LDAP server in d:\intranet\temp\el\network\ldap2.php on line 17 Erreur Can't contact LDAP server Can someone helpme ??
I'm still using 3.0.16 and when you have to display a varchar field in a MSSQL table everything over 255 characters gets truncated (this affects only selects, not inserts). I know that a workaround would be to transform the fieldtype from varchar to text, but this isn't very practical in the particular case. So, does anybody know if the problem still exists in later versions of PHP or has been fixed? Other suggestions and workarounds will be appreciated as well. Andrian
I had the same problem with a cold fusion page a while ago. It turned out that it was nothing to do with cold fusion but actually because I didn't have the latest version of the MDAC components installed onto my cold fusion server. There was a bug in previous versions which meant only the first 255 characters of a vchar field were returned from a query. This could be your problem if you are working on windows (and especially if your database is MS SQL 7)... hth, Kelvin. -----Original Message----- From: Andrian Pervazov [mailto:[EMAIL PROTECTED]] Sent: 18 April 2001 14:46 To: Dan Cleveland Cc: Josh Seward; Daniel Furse; [EMAIL PROTECTED] Subject: [PHP-WIN] MSSQL varchar fields truncation revisited I'm still using 3.0.16 and when you have to display a varchar field in a MSSQL table everything over 255 characters gets truncated (this affects only selects, not inserts). I know that a workaround would be to transform the fieldtype from varchar to text, but this isn't very practical in the particular case. So, does anybody know if the problem still exists in later versions of PHP or has been fixed? Other suggestions and workarounds will be appreciated as well. Andrian
i was under the impression that varchar fields in mysql had a limit of 255 characters. if this is true, then there is no bug and the only real workaround is to change the field type. i could be wrong, check the mysql manual. good luck... Dan +-------------------------------------------------------------------+ | | | If Yoda so strong in force is, | | why words in proper order he cannot put? | | | +-------------------------------------------------------------------+ | | +-------------------------------------------------------------------+ | Daniel J. Cleveland | | e-mail: [EMAIL PROTECTED]| +-------------------------------------------------------------------+
MySQL and MSSQL is two different databases ! MSSQL 7.0 can handle varchar columns larger than 255, but the C-API used to fetch the data does not support this feature and therefore PHP is limited to fetch only the first 255 characters. The only solution (so far) is to convert to TEXT. - Frank > i was under the impression that varchar fields in mysql had a limit of 255 > characters. if this is true, then there is no bug and the only real > workaround is to change the field type. i could be wrong, check the mysql > manual. good luck... > > Dan > > +-------------------------------------------------------------------+ > | | > | If Yoda so strong in force is, | > | why words in proper order he cannot put? | > | | > +-------------------------------------------------------------------+ > | | > +-------------------------------------------------------------------+ > | Daniel J. Cleveland | > | 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] > > >
>Any other ideas? Maybe you could install mysql and/or interbase on the same server as mssql. Then you could do comparison tests.
>Any other ideas? Other factors that could affect performance would be: Is your table indexed? How big the database is. How complex is the query in "mssql_query($getArticlesSQL)" Server cpu load.
Hi, Thanks for the suggestions. I've tried installing PHP and Apache on a collegues machine and running the same code and it runs much much much faster! Their processor is only a little faster than mine so I think that something must just have gone wrong with my installation. I have tried reinstalling both PHP and Apache on my machine, replacing all the dll's etc but it still runs slowly from my machine. It's not too much of a problem though because I now know the code will be fast enough in a production environment and I can deal with the slowness while I develop or use someone elses machine... Thanks for all the help, Kelvin. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 18 April 2001 15:18 To: Kelvin Luck Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] mssql and php4 >Any other ideas? Other factors that could affect performance would be: Is your table indexed? How big the database is. How complex is the query in "mssql_query($getArticlesSQL)" Server cpu load. -- 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 Kelvin, Check the connection from your computer to the server using Query Analyzer if the connection is still slow it is some kind of network problem. If not it must be the PHP installation. Have you checked your php.ini for loading extensions you are not using ? This would affect the CGI version as extensions are loaded on each request. You could also add som debug information like this: $ts = time(); mssql_function(); $ts1 = time(); exho "execution time = " . ($ts1 - $ts) . "<br>"; This way you can find out what function is responsible for the long respose time. With small tables MySQL and MSSQL gives the same performece but with large tables and complex SQL statements MSSQL is the fastes, so it will not help switching database (unless proce is an issue) - Frank > Hi, > Thanks for the suggestions. I've tried installing PHP and Apache on a > collegues machine and running the same code and it runs much much much > faster! Their processor is only a little faster than mine so I think that > something must just have gone wrong with my installation. I have tried > reinstalling both PHP and Apache on my machine, replacing all the dll's etc > but it still runs slowly from my machine. It's not too much of a problem > though because I now know the code will be fast enough in a production > environment and I can deal with the slowness while I develop or use someone > elses machine... > Thanks for all the help, > Kelvin. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 18 April 2001 15:18 > To: Kelvin Luck > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] mssql and php4 > > > >Any other ideas? > > Other factors that could affect performance would be: > Is your table indexed? > How big the database is. > How complex is the query in "mssql_query($getArticlesSQL)" > Server cpu load. > > > > > > > -- > 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] > > >
NO SALES PITCH, NO PRESSURE, NO NOTHING. Just the best non-tackified grip enhancer you'll ever use for your golf game, GUARANTEED, or your money back. From football's #1 specialty product company, SUPAGRIP25 is now available to golf enthusiasts everywhere. Click here http://www.creativefootball.com to see the product that is taking all sports (where a good grip is essential) by storm! While you're there be sure to check out our "who uses our products" page, what you see just might surprise you. You really didn't think they make those great catches on talent alone, did you? Transmissions to you by the sender of 'this' email will be stopped promptly by sending an e-mail with "unsubscribe" in the subject line. Simply hit reply and send and we will remove you from our database. Please Note-This is a one time mailing.Thank you.
It seems that some of the IMAP properties are undefined try this script to see what I mean. Also there is a problem when calling IMAP properties when within a function. LAter DAn <?php $msg_no = 1; $mbox = imap_open ("{your.server.name/POP3:110}", "USER NAME", "PASSWORD"); echo "<p><h1>Mailboxes</h1>\n"; $folders = imap_listmailbox ($mbox, "{your.server.name/POP3:110}", "*"); if ($folders == false) { echo "Call failed<br>\n"; } else { while (list ($key, $val) = each ($folders)) { echo $val."<br>\n"; } } echo "<p><h1>Headers in INBOX</h1>\n"; $headers = imap_headers ($mbox); if ($headers == false) { echo "Call failed<br>\n"; } else { while (list ($key,$val) = each ($headers)) { echo $val."<br>\n"; } } echo "<p><h1>Structures</h1>\n"; $the_structure=imap_fetchstructure ($mbox,$msg_no); echo "type - Primary body type - " . $the_structure->type; echo"<br>\n"; echo "encoding - Body transfer encoding - " . $the_structure->encoding; echo"<br>\n"; if($the_structure->ifsubtype) { echo "subtype - MIME subtype - " . $the_structure->subtype; echo"<br>\n"; } else { echo"NO subtype"; echo"<br>\n"; } if($the_structure->ifdescription) { echo "subtype - Content description string - " . $the_structure->description; echo"<br>\n"; } else { echo"NO description"; echo"<br>\n"; } if($the_structure->ifid) { echo "id - Identification string - " . $the_structure->id; echo"<br>\n"; } else { echo"NO id"; echo"<br>\n"; } echo "lines - Number of lines - " . $the_structure->lines; echo"<br>\n"; echo "bytes - Number of bytes - " . $the_structure->bytes; echo"<br>\n"; if($the_structure->ifdisposition) { echo "Disposition - " . $the_structure->disposition; echo"<br>\n"; } else { echo"NO Disposition"; echo"<br>\n"; } // ifdparameters True if the dparameters array exists // dparameters Disposition parameter array if($the_structure->ifdparameters) { echo "dparameters Disposition parameter array - " . $the_structure->dparameters; echo"<br>\n"; } else { echo"NO dparameters"; echo"<br>\n"; } // ifparameters True if the parameters array exists // parameters MIME parameters array if($the_structure->ifparameters) { echo "parameters MIME parameters array - " . $the_structure->parameters; echo"<br>\n"; } else { echo"NO dparameters"; echo"<br>\n"; } echo "parts - Array of objects describing each message part - " . $the_structure->parts; echo"<br>\n"; echo"<br>\n"; /* dparameters is an array of objects where each object has an "attribute" and a "value" property. Parameter is an array of objects where each object has an "attributte" and a "value" property. Parts is an array of objects identical in structure to the top-level object, with the limitation that it cannot contain further 'parts' objects */ echo "<p><h1>IMAP STATUS</h1>\n"; $status = imap_status($mbox,"{your.server.name/POP3:110}INBOX",SA_ALL); if($status) { print("Messages: ". $status->messages )."<br>\n"; print("Recent: ". $status->recent )."<br>\n"; print("Unseen: ". $status->unseen )."<br>\n"; print("UIDnext: ". $status->uidnext )."<br>\n"; print("UIDvalidity:". $status->uidvalidity)."<br>\n"; } else print "imap_status failed: ".imap_lasterror()."\n"; imap_close($mbox); ?> "Jan Walter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Hi all, > > does anyone have any idea, why the imap_headers($mbox) function from > php_imap.dll from php4win.de's last 4.0.4fixed release does not work? > > Browser seems to work, but anytime time-out comes. > > However imap_open() seems to work OK. > > Thanx for any hint > -- > ____________________________________________________________________________ ______________ > > ============================================================================ ============== > > Jan Walter, called John > LERACH, s.r.o. > phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61 > on emergency call cell phone: +420-602-385 760 > work e-mail mailto:[EMAIL PROTECTED] > private e-mail mailto:[EMAIL PROTECTED] > ICQ#: 28353428 > ____________________________________________________________________________ ______________ > > ============================================================================ ============== > > -- > 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] >
Same version on win98 machine. If I remove the .php=c:\..... in the Xitami.cfg it returns a blank page if it is a php page, even if its just a phpinfo() page that would work on the same machine with apache. Html pages are ok. With the .php=c:\... in the Xitami.cfg, it seems to have a problem, returning a msg that the page is empty or something. Hope to find the reason I even reinstalled the program Cheers ----- Original Message ----- From: "Byrne, Gerald [euler:eti-lon]" <[EMAIL PROTECTED]> To: "'PHPWIN'" <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 5:26 PM Subject: RE: [PHP-WIN] Xitami Config > Configuration is all set up right. I've tested and the duplication in the > two files doesn't cause a problem. > > I'm using Xitami version 2.4d6, the Win 95/NT standard version (not the > console) and I'm having no problems. Which version are you using? > > Ged. > > > > -----Original Message----- > > From: PHPWIN [SMTP:[EMAIL PROTECTED]] > > Sent: Tuesday, April 17, 2001 7:01 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP-WIN] Xitami Config > > > > C:\Inetpub\scripts\PHP > > > > C:\Xitami > > > > [Filter] > > .php=c:\Inetpub\scripts\Php\php.exe > > > > [Filter] > > .php=c:\Inetpub\scripts\PHP\php.exe > > .ssi=perlssi # Pass *.ssi to PerlSSI > > .shtm=perlssi # Pass *.shtm to PerlSSI > > .shtml=perlssi # Pass *.shtml to PerlSSI > > > > > > > > ----- Original Message ----- > > From: "Byrne, Gerald [euler:eti-lon]" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, April 18, 2001 12:36 AM > > Subject: RE: [PHP-WIN] Xitami Config > > > > > > > Could you answer me some questions: > > > > > > what folder is PHP.exe installed in? > > > What folder is xitami installed in? > > > How does the [filter] section in default.cfg read? > > > How does the [filter] section in xitami.cfg read? > > > > > > I'm the problem should be discernable from these questions. > > > > > > Ged. > > > > > > > > > > -----Original Message----- > > > > From: PHPWIN [SMTP:[EMAIL PROTECTED]] > > > > Sent: Tuesday, April 17, 2001 9:36 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: Fw: [PHP-WIN] Xitami Config > > > > > > > > > > > > > > > > > CHeers guys , Idone that already but it doesn't seem to work, I use > > some > > > > > othe directory and php4, it couldn't be the reason? I've got php > > running > > > > on > > > > > other servers, just want to see how easy is easy... > > > > > > > > > >It hasn't got anything to do with changing the way scripts are called > > now > > > > > issit? > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Byrne, Gerald [euler:eti-lon]" <[EMAIL PROTECTED]> > > > > > To: <[EMAIL PROTECTED]> > > > > > Sent: Tuesday, April 17, 2001 9:32 PM > > > > > Subject: RE: [PHP-WIN] Xitami Config > > > > > > > > > > > > > > > > Sean, > > > > > > > > > > > > This is nice and easy. Here's the instructions copied from the > > Xitami > > > > > FAQ. > > > > > > > > > > > > 20: How do I add support for PHP3? > > > > > > To install PHP3 support, add an entry to the [Filter] section of > > the > > > > > config > > > > > > files, e.g. > > > > > > [Filter] > > > > > > .php=c:\php3\php3.exe > > > > > > > > > > > > > > > > > > The config file is defaults.cfg found in your Xitami folder (eg. > > > > > > C:Xitami\defaults.cfg). > > > > > > > > > > > > Further info can be found in the xitam.cfg folder. > > > > > > > > > > > > So much easier than Micorsot PWS. > > > > > > > > > > > > Ged. > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Sean [SMTP:[EMAIL PROTECTED]] > > > > > > > Sent: Tuesday, April 17, 2001 6:32 AM > > > > > > > To: [EMAIL PROTECTED] > > > > > > > Subject: [PHP-WIN] Xitami Config > > > > > > > > > > > > > > Hiya > > > > > > > anyone know how to configure php with Xitami on win98? > > > > > > > Cheers > > > > > > > > > > > > > > > > > > > -- > > > > 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 have installed PHP4 on my Windows 98 machine and have downloaded the latest MySQL server too. I can finally get my PHP scripts to run, but I'm now having problems when trying to connect to my database. I have followed the steps in the book by Julie Meloni PHP Essentials, and have, as far as I can tell, created a blank database in MySQL. I tried running some simple code from this book to create tables in this database, but it won't connect. When I added the code "or die(mysql_error())" to the line that tries to connect to the databse it throws up an error that says that I don't have access privileges to it or something like that. How do you create user access priviliges in MySQL and where would you put a username and password in the mysql_select_db() statement? Thanks.
I'm new to the game of PHP and MySQL but have the latest versions of both installed along with Apache on my Win 98 machine. I'm having problems connecting to a database I know is there, an empty one that I'm trying to use PHP to add tables to. In the "die()" statement to the "mysql_select_db()" function I put mysql_error and it came out with the message that I had no priviliges to the database. How in MySQL do I get user access priviliges and how/where in the mysql_select_db() statement would you put a username and password? Thanks.
Hi, did you set up a user? If not did you connect as "root"? Have you set a password for your root? Questions, questions. Some hints though: If you haven't set a pswd for root do so. Go to msdos, tpye the path of the mysql\bin directory and then "mysql -u root". You should now be in the mysql-shell. By typing "\s" you can see which DB you are using.To switch to the mysql DB type \u mysql. A "database changed" comes up. To set a pswd: "UPDATE user SET password=PASSWORD('YourNewPassword') WHERE user='root'; Think about getting phpMyAdmin for local administration. You can set up a new user. For the mysql-priviledge-system check the manual (your best friend ;). To give the user the priviledges type as root: GRANT select, insert, delete, priv, priv... ON YourDB.* TO YourUser; If user doesn't exist you can add "IDENTIFIED BY 'Password'. This creates a new user with the specified priviledges. You don't put username or pswd in mysql_select_db. The identification is done in mysql_conncet or mysql_pconnect. hope it helps, cheers johannes ""r.gelstharp"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 9bkmub$9bn$[EMAIL PROTECTED]">news:9bkmub$9bn$[EMAIL PROTECTED]... > I'm new to the game of PHP and MySQL but have the latest versions of both > installed along with Apache on my Win 98 machine. > > I'm having problems connecting to a database I know is there, an empty one > that I'm trying to use PHP to add tables to. > In the "die()" statement to the "mysql_select_db()" function I put > mysql_error and it came out with the message that I had no priviliges to the > database. > > How in MySQL do I get user access priviliges and how/where in the > mysql_select_db() statement would you put a username and password? > > Thanks. > > > > -- > 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] >
Read the MySQL manual, chapter 6.12 entitled "Setting up the intitial MySQL privileges". You'll want to create a username and password, and then GRANT it the proper privileges. Then just alter your mysql_connect to reflect your username and password, and it should all work fine again. -- Plutarck Should be working on something... ...but forgot what it was. ""r.gelstharp"" <[EMAIL PROTECTED]> wrote in message 9bkmub$9bn$[EMAIL PROTECTED]">news:9bkmub$9bn$[EMAIL PROTECTED]... > I'm new to the game of PHP and MySQL but have the latest versions of both > installed along with Apache on my Win 98 machine. > > I'm having problems connecting to a database I know is there, an empty one > that I'm trying to use PHP to add tables to. > In the "die()" statement to the "mysql_select_db()" function I put > mysql_error and it came out with the message that I had no priviliges to the > database. > > How in MySQL do I get user access priviliges and how/where in the > mysql_select_db() statement would you put a username and password? > > Thanks. > > > > -- > 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] >
My site in on Unix server with PHP4. I need to insert in file .htaccess in the root this command for an include path: php_include_path /directory Why this command don't work ? I've an internal server error .. Bye I
I haven't been able to find any clear answer to the question regarding "textarea". Can anybody help? I am not being able to bring data from a database into a textarea, it works fine if is is just <input type=text>. Thanks RB
<TEXTAREA rows="10" cols="10"> <? echo $row["textarea_db"]; ?> </TEXTAREA> ----- Original Message ----- From: "Rasna Baruah" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 10:05 PM Subject: RE: [PHP-WIN] Text area > I haven't been able to find any clear answer to the question regarding > "textarea". Can anybody help? I am not being able to bring data from a > database into a textarea, it works fine if is is just <input type=text>. > > Thanks > RB > > > > > ---------------------------------------------------------------------------- ---- > -- > 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]
Thanks but I'm afraid it didn't work, I a get parse error (expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' ). My line of code is printf("<tr><td><textarea cols=50 rows=5 name=status><? echo $row["status"]; ?></textarea></td></tr>\n", ($formValues) ? $formValues["status"] :""); RB -----Original Message----- From: Tomasz Abramowicz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 1:10 PM To: Rasna Baruah; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Text area <TEXTAREA rows="10" cols="10"> <? echo $row["textarea_db"]; ?> </TEXTAREA> ----- Original Message ----- From: "Rasna Baruah" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 10:05 PM Subject: RE: [PHP-WIN] Text area > I haven't been able to find any clear answer to the question regarding > "textarea". Can anybody help? I am not being able to bring data from a > database into a textarea, it works fine if is is just <input type=text>. > > Thanks > RB > > > > > ---------------------------------------------------------------------------- ---- > -- > 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]
Thanks, it worked with a slight tweak. printf("<tr><td><textarea cols=50 rows=5 name=status >%s</textarea></td></tr>\n", ($formValues) ? $formValues["status"] :""); RB -----Original Message----- From: afan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 4:34 PM To: Rasna Baruah Subject: Re: [PHP-WIN] Text area Try this: printf("<tr><td><textarea cols=50 rows=5 name=status>%s</textarea></td></tr>\n", $row["status"]); afan ----- Original Message ----- From: "Rasna Baruah" <[EMAIL PROTECTED]> To: "Tomasz Abramowicz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 1:29 PM Subject: RE: [PHP-WIN] Text area > Thanks but I'm afraid it didn't work, I a get parse error (expecting > `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' ). My line of code is > printf("<tr><td><textarea cols=50 rows=5 name=status><? echo $row["status"]; > ?></textarea></td></tr>\n", ($formValues) ? $formValues["status"] :""); > > RB > > -----Original Message----- > From: Tomasz Abramowicz [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 18, 2001 1:10 PM > To: Rasna Baruah; [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] Text area > > > <TEXTAREA rows="10" cols="10"> > <? > > echo $row["textarea_db"]; > > ?> > </TEXTAREA> > > ----- Original Message ----- > From: "Rasna Baruah" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, April 18, 2001 10:05 PM > Subject: RE: [PHP-WIN] Text area > > > > I haven't been able to find any clear answer to the question regarding > > "textarea". Can anybody help? I am not being able to bring data from a > > database into a textarea, it works fine if is is just <input type=text>. > > > > Thanks > > RB > > > > > > > > > > > > > -------------------------------------------------------------------------- -- > ---- > > > > -- > > 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] >
Hi, The reason I'm mailing is because I can't get PHP to work! Here are the specifics, AFAIK, of my situation. - OS is win98 SE - PHP version 4 - installed MS PWS via the NT 4 option pack steps followed 1. Unpacked the PHP4 distribution successfully to e:\php4 2. copied the proper ini file to c:\windows and renamed to php.ini 3. edited php.ini as follows include_path = f:\phpstuff ; where i'll store my php scripts! doc_root = user_dir = f:\phpstuff extension_dir = e:\php4\ enable_dl = On 4. checked the windows\system directory and found "mscvrt.dll", so I just copied "php4ts.dll" to c:\windows\system 5. edited the appropriate .reg file in \php4\sapi. Since I intend to use php.exe with pws the line is [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Sc ript Map] ".php"="E:\\PHP4\\php.exe" 6.THIS I'm not sure of. I ran regedit.exe and navigated to the above location, I.e. "hkey_local_macine...\script Map" and then created a string value ".php"="E:\\PHP4\\php.exe" 7. finally loaded PWS manager and in the 'advanced' section selected "f:\phpstuff" and set execute permission on. By all aacounts I must have php support via PWS right? So I created 2 copies of the same file in f:\phpstuff ===== <html> <?php echo("hello world"); ?> </html> ===== files are "1.htm" and "1.php" (contents are same) - made sure PWS was running - Loaded internet explorer 5.5 loaded "1.htm" and got a blank page with the exact same source code! - tried "1.php" and got a dialog asking what APP to associate with .php extension? Where have I gone wrong? Your help would be greatly appreciated. Regards RJ
After changing anything in the regestry database (regarding PWS) you need to stop and start all PWS servises. it is not enough to stop and start the web server. The easiest way on Win 98 would be to reboot the system. The regestry database is only read when the service starts. You dont need to edit the registry manually. You should be able to double-click on the reg file you edited to match yor system and it willl be installed in the database. You dont need to copy any php files to windows\system32. It is ok to keep all php files in e:\php4, execpt for php.ini. This way it is easier to update. - Frank > Hi, > The reason I'm mailing is because I can't get PHP to work! > > Here are the specifics, AFAIK, of my situation. > > - OS is win98 SE > - PHP version 4 > - installed MS PWS via the NT 4 option pack > > steps followed > 1. Unpacked the PHP4 distribution successfully to e:\php4 > 2. copied the proper ini file to c:\windows and renamed to php.ini > 3. edited php.ini as follows > include_path = f:\phpstuff ; where i'll store my php scripts! > doc_root = > user_dir = f:\phpstuff > extension_dir = e:\php4 enable_dl = On > 4. checked the windows\system directory and found "mscvrt.dll", so I just > copied "php4ts.dll" to c:\windows\system > 5. > edited the appropriate .reg file in \php4\sapi. Since I intend to use > php.exe with pws the line is > [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Sc > ript Map] ".php"="E:\\PHP4\\php.exe" > > 6.THIS I'm not sure of. I ran regedit.exe and navigated to the above > location, I.e. "hkey_local_macine...\script Map" and then created a > string value > ".php"="E:\\PHP4\\php.exe" > > 7. finally loaded PWS manager and in the 'advanced' section selected > "f:\phpstuff" and set execute permission on. > > By all aacounts I must have php support via PWS right? > > So I created 2 copies of the same file in f:\phpstuff > ===== > <html> > <?php > echo("hello world"); > ?> > </html> > ===== > files are "1.htm" and "1.php" (contents are same) > > - made sure PWS was running > - Loaded internet explorer 5.5 loaded "1.htm" and got a blank page with > the exact same source code! > - tried "1.php" and got a dialog asking what APP to associate with .php > extension? > > Where have I gone wrong? Your help would be greatly appreciated. > > Regards > RJ > > > > > > > > > -- > 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, The reason I'm mailing is because I can't get PHP4 to work! Here are the specifics, AFAIK, of my situation. - OS is win98 SE - PHP version 4 - installed MS PWS via the NT 4 option pack steps followed 1. Unpacked the PHP4 distribution successfully to e:\php4 2. copied the proper ini file to c:\windows and renamed to php.ini 3. edited php.ini as follows include_path = f:\phpstuff ; where i'll store my php scripts! doc_root = user_dir = f:\phpstuff extension_dir = e:\php4\ enable_dl = On 4. checked the windows\system directory and found "mscvrt.dll", so I just copied "php4ts.dll" to c:\windows\system 5. edited the appropriate .reg file in \php4\sapi. Since I intend to use php.exe with pws the line is [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Sc ript Map] ".php"="E:\\PHP4\\php.exe" 6.THIS I'm not sure of. I ran regedit.exe and navigated to the above location, I.e. "hkey_local_macine...\script Map" and then created a string value ".php"="E:\\PHP4\\php.exe" 7. finally loaded PWS manager and in the 'advanced' section selected "f:\phpstuff" and set execute permission on. By all aacounts I must have php support via PWS right? So I created 2 copies of the same file in f:\phpstuff ===== <html> <?php echo("hello world"); ?> </html> ===== files are "1.htm" and "1.php" (contents are same) - made sure PWS was running - Loaded internet explorer 5.5 loaded "1.htm" and got a blank page with the exact same source code! - tried "1.php" and got a dialog asking what APP to associate with .php extension? Where have I gone wrong? Your help would be greatly appreciated. Regards RJ