[PHP-WIN] PHP with IIS
Hi all How I know my IIS is supporting PHP? And what have to do so that I can deploy my PHP pages at IIS? Regards, Kashif -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] PHP with IIS
Hi all How I know my IIS is supporting PHP? And what have to do so that I can deploy my PHP pages at IIS? Regards, Kashif -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: fopen(http:...) problems
Why don't you try chmoding the file 777. Next use readfile: http://www.php.net/manual/en/function.readfile.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] resolution?
If you really want to use it. I'd say use a CSS file to make your margins to 0 -- save this as css.css --- Body { margin:0; } img { height:100%; width:100%; } - in the html file put this something have the user press F11 to make it fullscreen. That is how I would do it. Use it if that would help out. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] text/string parsing question
Hello, I'm writing a program that parses out data contained in one large text file, each page separated by a control char. I explode() the data by the control char into an array, then I'm inserting them in MySQL by a client number and a page number. As of now, I've just been counting down characters by substr ($page, startchar, length to grab) and it seems to work for most of the pages. The problem is that it the data I index by does not always occur the same number of characters down the $page variable. I.e., the name line2 on the right is not always filled out or is a different length: -=-=-=- yada yada yadayada yada yada name line 1 blankline name line 2 blankline blankline my name client numberpage no my address my address my city my state my zip and so forth... -=-=-=- I'd like to be able to do something more like this: in $page, on line 5 chars 40-95 is $indexme I tried explode()ing the $page by "\n" and it wouldn't work. Any suggestions? Thanks in advance. -shad "You are old," said the youth, "as I mentioned before, And make errors few people could bear; You complain about everyone's English but yours -- Do you really think this is quite fair?" "I make lots of mistakes," Father William declared, "But my stature these days is so great That no critic can hurt me -- I've got them all scared, And to stop me it's now far too late." -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: accessing the regisry with php
I don't think you can. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Windows + mySQL + PHP4 question
Nope. MySQL support is built in. Give it a try. -Dash If you think last Tuesday was a drag, wait till you see what happens tomorrow! On Sun, 8 Sep 2002, Kerry Kobashi wrote: > If I recall, PHP4 has built in mySQL function calls. > > On a Windows NT 4.0/2000 server system: >Is myODBC required to access mySQL with PHP? > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Intermittent Parse Error
Are you serious about using Apache 1.3.6? Yowser that's old!!! I'd update to Apache 2 and PHP 4.2.3 right away! I've had no problems on my Win2k (workstation) using Apache 2.0.39 and PHP 4.2.2. What are the specs on the hardware? And why'd you move from slackware? -Dash When I was a boy I was told that anybody could become President. Now I'm beginning to believe it. -- Clarence Darrow On Mon, 9 Sep 2002, Michael Baron wrote: > I am running Apache 1.3.6 PHP 4.2.2 in Module mode on windows 2000. I > just migrated this particular site from Slackware (Same Apache and php). > I now get intermittent parse errors in random include files. It is as > if during some of my user's requests, either the machine is not fast > enough to parse the file or there is some lock on the file or something. > Has anyone seen this before? > > Thanks. > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Intermittent Parse Error
I figured there had to be a good reason. At least you're still using Apache :) Forgive me for suggesting you rip out Apache 1.3.x and replace it with Apache2. Just out of curiosity, how busy is this website? -Dash 186,282 miles per second: It isn't just a good idea, it's the law! On Tue, 10 Sep 2002, Michael Baron wrote: > I moved from Slack to W2000 because my linux admin team has had a hard > time maintaining db2 connect which is a core component for this > particular site. The product for w2000 installs and configures easier > and seems to be more stable. There are very few other db2400 ODBC > drivers out there that are easy to run and configure on Linux. I am > currently researching other drivers and as soon as one is found, I will > probably move the site back to slack. > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Intermittent Parse Error
Hmm. What's the horsepower in the machine? It seems as if it should be enough. Is the database running on that machine or a separate one? What about the disk interface? I'm running out of suggestions... -Dash On Tue, 10 Sep 2002, Michael Baron wrote: > This server is running two of our lowest volumne applications. > > The main one only sees about 150 logins a day and each one lasts about > 20-30 minutes of page viewing(it is only released to our largest customers). > > The other one sees about 1500 hits a day. > > It is running on a little dell desktop with only about 280mb of ram. I > am thinking the low power might be my problem and will be getting a quad > P2 with 1gb of ram hopefully by the end of the week (one of our former > PDCs). I am hoping this solves the problem. If now, the next move will > be an upgrade to Apache2. > > Thanks for your help. > > [EMAIL PROTECTED] wrote: > > I figured there had to be a good reason. At least you're still using > > Apache :) Forgive me for suggesting you rip out Apache 1.3.x and replace > > it with Apache2. > > > > Just out of curiosity, how busy is this website? > > > > -Dash > > > > 186,282 miles per second: > > > > It isn't just a good idea, it's the law! > > > > On Tue, 10 Sep 2002, Michael Baron wrote: > > > > > >>I moved from Slack to W2000 because my linux admin team has had a hard > >>time maintaining db2 connect which is a core component for this > >>particular site. The product for w2000 installs and configures easier > >>and seems to be more stable. There are very few other db2400 ODBC > >>drivers out there that are easy to run and configure on Linux. I am > >>currently researching other drivers and as soon as one is found, I will > >>probably move the site back to slack. > >> > >> > >>-- > >>PHP Windows Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] win2000
"Angie Tollerson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[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: 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 ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou it works now -- 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]
Re: [PHP-WIN] win2000
"Angie Tollerson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... LOL, Glad to see you got it working Darren, What was the problem? Angie Tollerson Alliance Technologies Web Programmer (515)245-7628 [EMAIL PROTECTED] >>> "PHP" <[EMAIL PROTECTED]> 08/16/01 09:32AM >>> "Angie Tollerson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[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: 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 ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou ThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThankyouThan kyou ThankyouThankyouThankyouThankyouThankyou it works now -- 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 re-installed IIS -- 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-WIN] IIS Virtual Directories
I have been searching all over for a solution with no help... I got some virtual folder under the root of my website.. when i tried to read the contents of the folder and its subdirectories...it returned and error...because its a virtual folder and not physically under the root of the website.. i need a solution so that i can read and access contents of Virtual Directories created by IIS 5.. DJ XLoRd [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-WIN] Getting HTML Content as a variable
Hi, I've been directed to use file() or implode() to get the html content of a web page, like this: $html = implode ('', file ('http://192.168.1.100/PHP/index.php')); 1 ) How do I pass authentication to websites that require username & password? In Cold Fusion the CFHTTP tag allows you to pass USERNAME="myusername" PASSWORD="mypassword", there must be an equivalent parameter in PHP. 2) When I output the content of $html, which is the web page stored as a variable, the images are not there. Again, in Cold Fusion the CFHTTP tag takes care of this when you specify RESOLVEURL="YES", and I'm guessing there is a way in PHP to store the web page WITH images intact? thanks! ph_Greg -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Warning: mail(): SMTP server response: 550 Unable to relay
I'm fairly new to php and I'm trying to setup mail functionality from php on IIS 4.0. I keep getting this error. I have tried ever combination for the SMTP settings in the php.ini file, but nothing seems to work. I can send mail using CDONTS on this server, but using php I cannot thanks for any help -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Pipe problem on php4.0.4...
Hi, I found that php4.0.4 or later version on Windows IIS can't use pipe function any more, and I don't know whether it is a bug because I can still use pipe function to run a program under php 4.0.3pl1. Do I make any mistake in configuration ?? Sam Kuo. -- 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]
Re: [PHP-WIN] PHP + Win32 + FreeTDS + MSSQL
Hi, I'm using Microsoft Visual C++ to compile php adding IngresII Database support and after download the source code what file should I put "--with-ingres=DIR" ? Is it "configure" file or this one is used only to compile the unix source. Should I have php_ingres.dll ? Where ? Does anyone has a php binary with IngresII built in ? Cheers, Mauro - Original Message - From: "Frank M. Kromann" <[EMAIL PROTECTED]> To: "Miha Nedok" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 17, 2004 6:02 PM Subject: Re: [PHP-WIN] PHP + Win32 + FreeTDS + MSSQL > Hi Mike, > > Not yet. The DBLIB version of FreeTDS does not work on Win32. I'm working > on proting it but my time has been limited lately. > > - Frank > > > > > Hi ! > > > > Is there any way on Win32 to use FreeTDS with php_mssql extension ? > > > > -Mike > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Help !!! PHP + IngresII Database
> Hi, > > I'm using Microsoft Visual C++ to compile php adding IngresII Database > support and after download the source code what file should I put > "--with-ingres=DIR" ? Is it "configure" file or this one is used only to > compile the unix source. Should I have php_ingres.dll ? Where ? > Does anyone has a php binary with IngresII built in ? > > Cheers, > Mauro -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] PHP + Ingres - Unable to load module 'ingres_ii'
Hi, I compiled PHP with Ingres support using VC++. First, I compiled php_ingres.dll and add it to php.ini. When I try to use php in command line it gaves me the message: "unable to load module 'ingres_ii', trashed c:\ingresii\ingres\files\symbol.tbl". But ingres works fine. The source code looks for iiapi.lib, iiapi.h and my ingres files just have oiapi.lib and oiapi.h, so I just renamed these last two files. Do I have to change the sources codes replacing iiapi.lib, iiapi.h to oiapi.lib and oiapi.h ? Where can I do it ? I did the same procedure for sockets support (php_sockets.dll) and had sucess. Thanks, Mauro - Original Message - From: "William CANDILLON" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 05, 2004 1:53 PM Subject: [PHP-WIN] Password input in cli > fwrite(STDOUT, "\nPlease enter your password : "); > $pass = fgets(STDIN); > ?> > How the password could output ** on screen ? > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] RE: [SUM] (sic) Changing/checking php.ini, and yet still the 'wrong' include_path
I ran into this as well when I recently set up PHP on IIS. Adding the PHPRC environment variable as per this page is what solved it for me. http://www.php.net/manual/en/faq.installation.php#faq.installation.phprc Reboot afterward -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Apache+ PHP + Netscape 7.0
Isn't there somewhere in Netscape 7.0 to change the "browser announce" version thing? (I use mozilla 1.0 and there's a way - it's a little deep). Doubt that will change anything, why would PHP magically not work if the browser = Netscape 7.0?!? Here's another thing to try. Do this: AddType application/x-httpd-php .htm .html then put some php code in one and see if those execute properly in Netscape. I'm not sure where this will take you... but it's a diagnostic step. -Dash (.php) -Original Message- From: Brian Huff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 8:22 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Apache+ PHP + Netscape 7.0 This may still be a netscape-ism... try using your DNS name instead of localhost... also, try this with JSP or Perl pages to see if its an Apache2-Netscape thing, or an Apache2-Netscape-PHP thing -- Brian 'Bex' Huff [EMAIL PROTECTED] Phone: 952-903-2023 Fax: 952-829-5424 > Yes, http://localhost/test/test.php. Netscape keeps thinking that I want to download the php file. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] addslashes
Put \"'s around the value=$nome like this: echo ""; -Dash -Original Message- From: Waldemar Brand Neto [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 2002 12:29 PM To: PHP Windows Subject: [PHP-WIN] addslashes Hey I'm a newbie and have a question about addslashes. In the databse the field is complete like: Waldemar Brand Neto, but when I get the field from it the return is trunved like Waldemar. How cam I fix that? Thank´s. "; ?> Result : Waldemar and the correct is: Waldemar Brand Neto -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] PHP & "POST"
Another reason for GET is the ease of emailing someone else a link, as if I need you to go here: http://www.site.example.com/scripts/getinfo.php?youneedthisinfo=12345 the person on the other side doesn't have to put in 12345 for youneedthisinfo :) -Dash -Original Message- From: Scott Carr [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 9:18 AM To: PHP Windows Subject: Re: [PHP-WIN] PHP & "POST" Therein lies the difference. With POST, you cannot see the variables that are being passed, because they are passed as a header directly to the server. With GET, you see the variables, because they are part of the URL that is passed to the Server. The other difference is in that URL's tend to have a limit on how long they can be, a post does not. So if you are planning on using a bunch of Form Variables you need to use post. ( OF Course I think the URL limit is somewhere around 32000. ;-) ) I use POST if I don't want to worry about directly calling the page through a link, or if I am passing sensitive information. (It's not a good idea to hide a password with * if you are going to just send the form with a GET.) If I would want to call the page differently via a Link, I use GET. Say you want to call a page in multiple ways via an ActionID. The ActionID would be best used as a GET variable, because you could call it from a FORM or a Direct Link very easily. (EXAMPLE: "form.php?ActionID=1") -- Scott Carr OpenOffice.org Documentation Maintainer http://documentation.openoffice.org/ Quoting Samura1 <[EMAIL PROTECTED]>: > One more thing, > I found that POST is better than GET as user won't see the variables > But there must be a disadvantage of POST, otherwise, no one use GET... > do you know what are the disadvantages of POST? > > Thank you. > > p.s and I'm looking for a very good website which talk about when you should > use this or when you shouldn't use this on PHP (including reasons) ... if u > know, pls let me know... as I'm a DIY learner, just trying everything out > but dunno it's a good way to do or not... > > > "Samura1" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D > :[EMAIL PROTECTED] > > Hey man, your post is very helpful ... > > > > But actually, I just found out the solution on the web... > > You know what, most web sites are just telling you what does it do (submit > > to the server, header...$#&Q*^$@#) , but doesn't give u an example... > > > > Until I just found an example on the web, make my mind much clearer... > > > > And your example is exactly what I need before... > > > > Thanks anyway.. > > > > > > > > "B.A.T. Svensson" <[EMAIL PROTECTED]> > > ???:000601c243a6$fb3b12e0$[EMAIL PROTECTED] > > > Well lest go trough the basic steps then (but I still recomend you to > > visist the www.w3.org > > > and realy spend some time trying to understand the specifications - it > > will save you lots > > > of headache in the future...): > > > > > > First you start with the FORM tag: > > > > > > > > > > > > Here we see two attributes METHOD and ACTION. > > > > > > METHOD should be POST in our case, and the ACTION is a pointer to a page > > that should > > > be handling the FORM request. In this case that page is called > START.ASP, > > in your > > > case it should probably be with the file extension .PHP. > > > > > > > > > What we then need is some interactive input fields: > > > > > > > > > Unspecified > > > Brain > > > Eye > > > Liver > > > Heart > > > Muscel > > > Splein > > > > > > > > > We choice to display a drop down menu with some various items found > > > in the OPTION-tag. The SELECT as to be refereed with a NAME so we can > > > refer to it once the START.ASP page is loaded. The name of the variable > > > that START.ASP will be able to figure out which option we select will > > > hence be "Tissue". > > > > > > Finally we need a button to be able to submit the selected data: > > > > > > > > > > > > And then we ends the form: > > > > > > > > > > > > Once we press the "Go Now" button, the form data will be posted to the > > > webserver, but the handlig page (START.ASP) need a script to extract > > > the data. This is done like this is VB
RE: [PHP-WIN] PHP / MySQL Guestbook
It is probably storing the data like that, but the display page isn't displaying it like that. You'll need either to nl2br() it or put tags around it. You can check the page source and see if it looks like that. Either of the above solutions should work. -Dash -Original Message- From: Andreas Esser [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 10:52 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] PHP / MySQL Guestbook hi, i have written a php guestbook using a mysql database to store and recall the entries that where typed in by the visitor. there is a formular with several fields like "name", "email" and "message". here´s the problem: the visitor types some message into the message field, i.e.: " hello, how are you today? yours michael " the typed message should now be written into the database and when the visitor click on the button "see all entries" the message should be displayed exactly the same than typed in. it works, except the wordwrap. i´ve edited my - tag and added the expression " wrap=physical ". but this doesn´t work. how can i manage that the wordwrap information is displayed correctly in my database request?? i hope that some of you guys can help me with this greetz andreas -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Help on new install please ..
Try the following: Apache as SAPI: a) copied php4ts.dll to windows/system32 directory b) added following lines to httpd.conf LoadModule php4_module "c:/php/sapi/php4apache.dll" # try it w/o this line AddModule mod_php4.c AddType applicaton/x-httpd-php .php Your phpinfo.php file should look like this: No or . That's how it works for me. I'm not sure if that's an issue or not though. You're on the right track. -Dash -Original Message- From: David Tod Sigafoos [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 1:27 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Help on new install please .. I am having problems on a new install of PHP and Apache Win2k, Php 4.2.2, apache 1.3.26 1) Install apache. Then browse to 127.0.0.1 and get the apache screen 2) unzip php and copy to c:/php 3) install.txt a) dlls are all in the /php directory with php.exe (did not copy to windows/system32 b) copied ini to windows director c) modified ini file extension_dir = c:\php d) modified ini file document_root = "c:\program files\apache group\apache\htdocs\" e) no extensions Web Server Config: First try SAPI a) copied php4ts.dll to windows/system32 directory b) added following lines to httpd.conf LoadModule php4_module "c:/php/sapi/php4apache.dll" AddModule mod_php4.c AddType applicaton/x-httpd-php .php Start Server .. get message [Fri Aug 30 11:43:16 2002] [warn] module mod_php4.c is already added, skipping Apache/1.3.26 (Win32) running... Then bring up browse and try for phpinfo.php script in htdocs I get the 'download' screen from my netscape browser. It doesnt recognize php Web Server Config: Now try php.exe (cgi) a) shut down server b) modify http.conf. # out the lines mentioned above and add the following ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" c) start up server (no message as noted above) d) bring up browser and try for phpinfo.php script in htdocs I get a blank page. upon viewing the source it is My phpinfo.php record is This works well from my other server ... So .. what have I missed .. -- DSig ` David Tod Sigafoos ( O O ) mailto:[EMAIL PROTECTED] ___oOOo__( )__oOOo___ Using 'The Bat' 1.61 Using 'OS' Windows 2000 Service Pack 2 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP-WIN] Help on new install please ..
Odd... I'm assuming that you're using Win2k installed in c:\windows. Also, try undoing the changes you made to your windows\php.ini file. It may be a simple little error there. I don't have those set on my machine. Good luck, -Dash -Original Message- From: David Tod Sigafoos [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 5:31 PM To: dash php Cc: [EMAIL PROTECTED] Subject: Re[2]: [PHP-WIN] Help on new install please .. Hello dash, Sorry .. but it does the same that I had noted. The browser trys to download .. This is so odd as I am simply trying to install to a local pc for testing. my server works just great .. I must be missing something simple Friday, August 30, 2002, 3:33:44 PM, you wrote: dp> Try the following: dp> Apache as SAPI: dp>a) copied php4ts.dll to windows/system32 directory dp>b) added following lines to httpd.conf dp> LoadModule php4_module "c:/php/sapi/php4apache.dll" dp> # try it w/o this line AddModule mod_php4.c dp> AddType applicaton/x-httpd-php .php dp> Your phpinfo.php file should look like this: dp> dp> No or . That's how it works for me. I'm not sure if that's an dp> issue or not though. dp> You're on the right track. -- DSig ` David Tod Sigafoos ( O O ) mailto:[EMAIL PROTECTED] ___oOOo__( )__oOOo___ Using 'The Bat' 1.61 Using 'OS' Windows 2000 Service Pack 2 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] IIS 3 Install
I once installed PHP on IIS3. From what I recall, it was not a pretty excersize. I had to go registry hunting! It is so much easier on Apache. -Dash -Original Message- From: David Hollister [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 9:40 AM To: 'Kerry Kobashi'; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] IIS 3 Install My suggestion would be to upgrade IIS. Is there a reason you need IIS3? All is not the same between web server versions. Check this out http://www.php.net/manual/sv/printwn/install.iis.php#install.iis.iis4 -Original Message- From: Kerry Kobashi [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 5:41 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] IIS 3 Install Ok so I downloaded the windows PHP version onto my IIS3 NT4 Server system... Ran the installation program created a simple hello world program... then did a localhost/hello.php and nothing came up except a HTTP 404 error... Any thoughts/suggestions? -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Scheduling Help
You'd have to execute the PHP script somehow via cron or AT (assuming windows). That'd be the only way to have it run without keeping a web browser open to a page set to refresh every 15 minutes... -Dash -Original Message- From: Nicole Amashta [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 1:55 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Scheduling Help Hello, I have a question regarding schedulings scripts. The server runs on a linux machine. But the user does not have ability to use crons for scheduling. Is there another way to schedule a php script to run, say, every 15 minutes without any human intervention? I am working on a maling script that currently sends out emails in real time. However, since the numbers of members are growing, the time it takes to complete is prolonged. So, I want to back up mailings in a "queue" and have them sent out every XX number of minutes instead of real time. Your suggesions are greatly appreciated! TIA! Nicole www.aeontrek.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] mysql_query() & mail() - something weird is going on !
Just a thought: How long does that SQL query take? Have you tried setting the timeout period to be longer than 30 seconds? Take a look at this: http://www.php.net/manual/en/function.set-time-limit.php Another thought: From my experience, sending mail from a Windows host takes longer than from a *nix host. That could be an issue right there. -Dash -Original Message- From: Chris Knipe [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 8:25 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-WIN] mysql_query() & mail() - something weird is going on ! Lo all, I get a timeout on line 523 of my code (posted and marked below). However, I fail to see where the timeout is occurring, and even debugging (mysql_error()) doesn't report anything wrong! I'm baffled as to what exactly is causing this timeout The code is currently on Apache (Win32) with PHP 4.2.3. When I move the code over to a *nix system, it works perfectly via sendmail_path in php.ini, but when it calls the SMTP server via a remote address, it fails. The mail server's exim-3.36, receiver and sender verification has been turned off. The mail does go through the mail server. I also tried bouncing the messages through a local Exchange server, and the result of this, is that the email get's additional headers that becomes part of the body! Line 523 is indicated with a ** // Insert the Technical Administrator's details into the Database as the Company // Administrator. $MakePassword = new GeneratePassword(16,5); $Password = $MakePassword->makePassword(); $SQL = "INSERT INTO CompanyContacts (ContactActive, CompanyID, "; $SQL .= "ContactName, IDNumber, EMailAddress, CellNumber, Password) VALUES ('1', '"; $SQL .= mysql_escape_string($CompanyID) . "', '" . mysql_escape_string($_POST['TechName']) . "', '"; $SQL .= mysql_escape_string($_POST['TechID']) . "', '" . mysql_escape_string($_POST['TechEMail']) . "', '"; $SQL .= mysql_escape_string($_POST['TechCell']) . "', PASSWORD('" . mysql_escape_string($Password) . "'));"; $TechRegisterSQL = mysql_query($SQL) or die(mysql_error()); // Mail the login details for the Company Administrator, Redirect him to the login // page, and we're done!. $msg = ""; $msg .= "Dear " . $_POST['TechName'] . ",\n"; $msg .= "\n"; $msg .= "Below follows your login details for MegaMonitor. As the registrar of\n"; $msg .= "" . $_POST['CompanyName'] . ",\n"; $msg .= " you have been given the rights of Company Administrator.\n"; $msg .= "\n"; $msg .= "This allows you to log in at the MegaMonitor web site, and add further\n"; $msg .= "configurations for your company. These may include account contacts, \n"; $msg .= "technical contacts, time periods, service checks, and everything else \n"; $msg .= "needed to setup monitoring for your company.\n"; $msg .= "\n"; $msg .= "You also may request for any number of additional services from MegaLAN\n"; $msg .= "Corporate Networking Services, including access to a wider spectrum of\n"; $msg .= "monitoring by purchasing more licenses for IP addresses.\n"; $msg .= "\n"; $msg .= "MegaLAN Corporate Networking Services also will be offering other\n"; $msg .= "excellent value added services over the not to distant future. We are\n"; $msg .= "hard at work to get these up and running, and as a client, we will notify\n"; $msg .= "you when they become available. Some of these services include:\n"; $msg .= "\n"; $msg .= " - MegaMAIL, a e-mail virus scanning service for corporates. We scan all\n"; $msg .= " in and outgoing e-mails on your behalf to ensure your company\n"; $msg .= " does not get infected with viruses via e-mail.\n"; $msg .= " - MegaDNS, a DNS hosting and administrating service for corporates,\n"; $msg .= " where we will provide access to DNS administrative tools, as\n"; $msg .= " well as secondary domain hosting - free of charge.\n"; $msg .= "\n"; $msg .= "To log in to MegaMonitor and configure your company's profile, please visit\n"; $msg .= "http://www.imadethis.co.za/login.php\n";; $msg .= "\n"; $msg .= "Your Username: " . $_POST['TechEMail'] . "\n"; $msg .= "Your Password: " . $Password . &
RE: [PHP-WIN] Newbie to the news!
I see what you're saying - it is hard to post just via the newsgroup. Would it work if you set up some rules in Outlook Express to filter out the messages? Or, you could subscribe to the digest version of the list and only have one email to deal with... then post via the newsgroup. -Dash -Original Message- From: Constantin Baciu [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 1:48 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Newbie to the news! All I want to do is connect to the lists with Outlook Express... I want to be able to read the posts and to post my own messages on the server, but I DO NOT want to receive the messages in my mailbox. I hope that you understand now.. "David Hollister" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > That depends if you would rather subscribe to posts, post to subscribes, or > just post-subscribe. > > Ok, ok Newsgroups and mailing lists are not the same thing. If might > be easier for you to simply access the php.windows postings from: > http://groups.google.com/groups?group=php.windows . That way you can deal > with it when you want to and the messages won't come to your mailbox (at > least not when you don't want them to). > > -Original Message- > From: Constantin Baciu [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 3:21 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] Newbie to the news! > > But if I am not subscribed, I cannot post > > "David Hollister" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > unsubscribe from the mailing list @ php.net > > > > -Original Message- > > From: Constantin Baciu [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 12, 2002 3:00 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP-WIN] Newbie to the news! > > > > Hello... > > > > Do I really have to get ALL the messages in the mailbox? Isn't it enough > to > > subscribe to the NNTP server?.. > > > > > > THX! > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] SESSIONS- clustered environment
That's what I was thinking. Do you have a few machines you could try it with? You could also try something like that using a bunch of VMWare (or similar virtual machine) systems... -Dash -Original Message- From: Matt Babineau [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 7:29 AM To: 'Luis Ferro'; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] SESSIONS- clustered environment What if I made a network share and all the sessions were stored in a shared space? Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Luis Ferro [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 5:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] SESSIONS- clustered environment You have two solutions (IMHO): a) Database storage Replacement of the session_init and session_save/register functions with others that will save/load the sessions from a database storage. Pros: easy to implement Cons: dependency of the database storage reliability, scalability problems b) Distributed sessions Replace the same functions with some that will propagate the session values to all the servers in the cluster, so that the next request can be served by any and the session won't be corrupted. [this would mandate the existence of a "cluster" layer in the servers configuration] Pros: high availability, redundancy and scalability Cons: very dificult to implement The first method can perform better in low trafic environments... but will scale worst as the trafic will rise... the second method is much more granular, with the performance cost more stable in all trafic conditions, The first method will have is performance dependent on the performance of the database storage... the second method will have performance dependent on how many servers exist to syncronize the sessions... The non-cluster solution would be to have all the sessions register in only one server, and get all the content in a second line of web servers... that way, the main server would only handle connections and sessions, with all the content and data communications bellonging to the second line servers... Cheers, Luis Ferro TelaDigital Matt Babineau wrote: >What would be the best way to handle sessions in a clustered >environment without making the load-balancing persistant? > >Matt Babineau >MCWD / CCFD >- >e: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] >p: 603.943.4237 >w: <http://www.criticalcode.com/> http://www.criticalcode.com PO BOX >601 Manchester, NH 03105 > > > > --- [This E-mail scanned for viruses by Declude Virus] -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Inserting text with single quotes into database
I use addslashes() frequently, although urlencode works too. I find addslashes to be cleaner. -Dash -Original Message- From: Lanham Rattan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 2:40 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Inserting text with single quotes into database I am trying to insert text into a text database field that contains single quotes. What it the best method? I am currently doing a URLENCODE($text) upon insertion, then STRIPSLASHES(URLDECODE($text)) to view. Lanham. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] !!!File porblems!!!
My code: $Newsfile = fopen("News.txt","r"); while (!feof($Newsfile)) { $zeile = fgets($Newsfile,1000); echo $zeile+''; } fclose($Newsfile); In the file is: Testfile! But I get a output: 0 Why?? Can someone help me??? Please mail me at [EMAIL PROTECTED]!!! GreeZ, JSTHEMASTER! -- 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-WIN] money format
does anyone know how to convert a number like 324.42932 to 324.43 format is there any special functions in php for this ? -- 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-WIN] expiring pages
Hello , does anyone know how can do this ? The page should not saved in browsers cache i mean... browser will try to retrieve evertime fresh data i tried to do this in every pages. but it didn't helped me -- can anybody suggest -- 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]
[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.. 0x424d2e043e00280077003f0001000100 f0030200ff00ff fff03fff00f03fe01ffcff8f00e00f cfcfff7ff8ff0700cfc39fe7ff3ff87f3300 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]
[PHP-WIN] currency format.... not international format
Hello php-windows, any body know how to do this ? suppose there is a input number "12345678.23" i want output to be like this "1,23,45,678.23" i don't need output in international format... that means not like this fomrmat "12,345,678.23" (it is the format used in our country) so this is what i did... - 0) {$a=$a.".00";} $b=strlen($a); $c=strpos($a,"."); $d=substr("$a",$c); $e=substr("$a",0,-($b-$c)); $f=strlen($e); $aa=""; for ($i=1;$i<$f+1;$i++) { $g=substr("$e",-$i,1); $aa=$g.$aa; if($i==3){$aa=",".$aa;} if($i==5 and $i<$f){$aa=",".$aa;} if($i==7 and $i<$f){$aa=",".$aa;} if($i==9 and $i<$f){$aa=",".$aa;} if($i==11 and $i<$f){$aa=",".$aa;} if($i==13 and $i<$f){$aa=",".$aa;} } $summa=$aa.$d; $replace=str_replace("-,","-",$summa); $issmall=strlen($replace); if ($issmall<8) {$replace=str_replace(",","",$replace);} echo "$replace"; } ?> - this works for me... it should be used in this was - ------------- but i think there must be some easy way can anyone can give idea about it ? i think you understood what i wrote here... -- 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]
[PHP-WIN] format....not international........
Hello php-windows, any body know how to do this ? suppose there is a input number "12345678.23" i want output to be like this "1,23,45,678.23" i don't need output in international format... that means not like this fomrmat "12,345,678.23" (it is the format used in our country) so this is what i did... - 0) {$a=$a.".00";} $b=strlen($a); $c=strpos($a,"."); $d=substr("$a",$c); $e=substr("$a",0,-($b-$c)); $f=strlen($e); $aa=""; for ($i=1;$i<$f+1;$i++) { $g=substr("$e",-$i,1); $aa=$g.$aa; if($i==3){$aa=",".$aa;} if($i==5 and $i<$f){$aa=",".$aa;} if($i==7 and $i<$f){$aa=",".$aa;} if($i==9 and $i<$f){$aa=",".$aa;} if($i==11 and $i<$f){$aa=",".$aa;} if($i==13 and $i<$f){$aa=",".$aa;} } $summa=$aa.$d; $replace=str_replace("-,","-",$summa); $issmall=strlen($replace); if ($issmall<8) {$replace=str_replace(",","",$replace);} echo "$replace"; } ?> - this works for me... it should be used in this was - ------------- but i think there must be some easy way can anyone can give idea about it ? i think you understood what i wrote here... -- 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]
[PHP-WIN] popup text
Hello php-windows, does anyone know how to do this ? for example... if we will take mouse cursor above any hyperlink, then some text will be popup. i know how to do this with images ... but simply with text link how to do ??? this doesn't works :( link any idea ?? -- 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]
[PHP-WIN] disable function
Hello php-windows, through i came to know that many fuction are pre - compiled in windows binary version of php for example : ftp,calender,xml,wddx etc... and even i'm not using mysql function because our company uses mssql server... and for that i'm loading only one dll (ie: php_mssql70.dll) that's itno more dll are loaded i'm using module version of php 4.0.6 (php4apache.dll) so how to disable these function in windows version.. now don't tell me to download sources and recomplile it, because i haven't compiler for that.. in php.ini i can't find anything to disble these function... i think that, if i'll disable unused function , then may be php will be working more faster so if any idea.. please share it... -- 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]
[PHP-WIN] php code subscription
Hello php-windows, is there any server or site where we can subscribe and get php codes daily by mail i know some server , but they send only links so any idea ? -- 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]
[PHP-WIN] is it bug ?
Hello php-windows, for example.. look at this simple script.. it returns 3.28007 it must return 3.28 does anyone know what is problem.. i know that number_format function can ne used here... but i want to know that is it bug in php i 'm using apache 1.3.20 , php 4.0.6 as module (php4apache.dll ) under windows 98 SE anyone ? -- 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]
[PHP-WIN] some kind of not real , real time clock :)
Hello , some trick for real time clock which will show latest time every 60 second but this cannot be said real time data, i think :) //== //== -- 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]
[PHP-WIN] supported functions
Hello php-windows, i saw here many guys asking for that why some functions are not working, firstly please check whether your configuration supports it or not so try this : it will show all commands that your php current supports: $a[$ii1]\n"; print_r(get_extension_funcs("$a[$ii1]")); echo "\n"; $ii1++; } ?> -- 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]
[PHP-WIN] windows & .htaccess
hi, my web server is apache on windows. i want to ask the configuration of .htacess files. thx __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.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-WIN] inifiles & php
hi I want to learn how to read and write ini files using php scripts;. Thz for your help. Phpci. __ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.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-WIN] No input file specified
I have installed php and configured it per the install manual. I associated .php extensions to run php scripts via the php interpreter and ran the test.php script successfully. I then configured my Netscape 3.63 server mime-types to support php as magnus-internal/shellcgi Then I enabled php extensions to run on Netscape 3.63. When I first ran test.php via webserver I got the security alert about accessing php cgi's directly so I modified the php.ini file cgi.force_redirect = 0 and now all I get is "No input file specified" when I try to load the same test.php script. Can someone help me with this please. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] HTML Printing problem.
Issue: HTML files are to large to print from the browser. We are creating reports that are ++5 mg in size. This is a real problem for the browser. We are on a network and can print directly from the server but this means we must convert the html to some printer friendly format. We are using many new standards such as Any help with a solution? _ Instant message with integrated webcam using MSN Messenger 6.0. Try it now FREE! http://msnmessenger-download.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] HTML Printing problem.
We have tried this method but it has a lot of problems. One is that you have to hit print everytime a new page is printed. You can do some active x programming to get around this but then your just talking IE. Another problem is that you have to count lines to keep your headers straight. The great thing about html is that you can define your headers to look right on the screen (only showing once) and in your document (showing on every page) with little code. The draw back of html is that there is no effient way to print large files. JAVA comes with a html parser that you can use to send files to the printer. Is there something like this in php? From: Piotr Pluciennik <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] HTML Printing problem. Date: Tue, 07 Oct 2003 22:54:02 +0200 Hi, if I can suggest you to do some pagination on your reports, then after printing each page, next page will be automatically loaded and printed and so on until report will be printed. Reloading and printing of each page should be done with client side programt, such like javascript... This metod will produce several html pages smaller and easier to handle for the browser. HTH, let me know Piotr php coder wrote: > Issue: > HTML files are to large to print from the browser. We are creating reports > that are ++5 mg in size. This is a real problem for the browser. We are on a > network and can print directly from the server but this means we must > convert the html to some printer friendly format. We are using many new > standards such as > on each page of a printed document. These seem to cause problems with most > conversions that we have seen. > > Any help with a solution? > > _ > Instant message with integrated webcam using MSN Messenger 6.0. Try it now > FREE! http://msnmessenger-download.com > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Instant message in style with MSN Messenger 6.0. Download it now FREE! http://msnmessenger-download.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Problem with Modules
I just know a little about it In my memory, the key action is to modify the correct path of dynamic library in php.ini yesI always be annoyed by it because the PHP sometimes read his configs(php.ini) from c:/winnt/ and sometimes from the path which it be installed in. find the php.ini and test the environment variable "extension_dir" may help you the second way is moving all Dll to a new path and changing setup again some one tells me that it could work only in c:\winnt\system32\ and thats all you can try :) Frederick Kuo Cole Hubbard 提到: > Here's the error message: > > Unknown(): Unable to load dynamic library > 'C:\PHP\extensions\php_.dll' - The specified module could not be found. > > Yet I know the module file is there. I just don't know why it's not > loading them. This happens with different modules every time. After I > cycle through the error messages the script executes properly and > outputs to the browser. > > This is outputted at the end of the page: > > PHP Warning: Unknown(): Unable to load dynamic library > 'C:\PHP\extensions\php_ifx.dll' - The specified module could not be > found. in Unknown on line 0 PHP Warning: Unknown(): Unable to load > dynamic library 'C:\PHP\extensions\php_oci8.dll' - The specified module > could not be found. in Unknown on line 0 PHP Warning: Unknown(): Unable > to load dynamic library 'C:\PHP\extensions\php_oracle.dll' - The > specified module could not be found. in Unknown on line 0 Cannot find > module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At > line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) > Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module > (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At > line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) > Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find > module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module > (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module > (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module > (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module > (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module > (SNMP-MPD-MIB): At line 0 in (none) Cannot find module > (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module > (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module > (SNMPv2-TM): At line 0 in (none) PHP Warning: Unknown(): Unable to load > dynamic library 'C:\PHP\extensions\php_sybase_ct.dll' - The specified > module could not be found. in Unknown on line 0 > > Not sure what the problem is, since the files exist and are in the right > place. Besides this error, scripts run fine. It's just getting annoying. > > B.A.T. Svensson wrote: > >> Can you give a more detial error description? >> And what do you mean it runs fine? Fine excpet when >> you try to execute a php script via the webserver? >> >> IF you want to execute php scritps on IIS, there are >> several steps that needs to be completed in order to >> make it work. >> >> -Original Message- >> From: Cole Hubbard >> To: [EMAIL PROTECTED] >> Sent: 2003-12-21 06:12 >> Subject: [PHP-WIN] Problem with Modules >> >> I just set up my webserver on an old Windows 2000 box that I have. >> >> AMD Athlon 750Mhz, 512MB RAM, 4GB hard drive >> >> Should be enough to test scripts and everything that I might need to do, >> >> and so far it's working just great. I'm running IIS on this server. >> Whichever version that comes with 2000, I think it's 4.0. Maybe 5. >> >> Perl installed great, and it runs great. I manually installed the >> full binaries for PHP, went in just fine. Except for when I try to >> load scripts. The first time I run a script on the server it gives me >> about five errors saying it cannot find module files. I've checked >> that these >> >> files are in the location that the program is looking for them in, but >> PHP just isn't finding them. I have no clue why. >> >> Any help would be appreciated. >> >> ~Cole Hubbard >> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Q on fopen (URL )
I did this... https://www.homier.com/security.asp?a=v&$mystr";; echo URLopen($url); // code from PHP docs... function URLopen($url) { // Fake the browser type ini_set('user_agent','MSIE 4\.0b2;'); $dh = fopen("$url",'r'); $result = fread($dh,8192); return $result; } ?> What I get back is this... Unable to find wrapper "https" - did you forget to enable it when you configured PHP? I can't find any (real) reference to this anywhere. Anyone have any ideas? I'm on an NT, PHP 4.3.2 Walter Torres == Torres Development Group Systems Design & Development Services web.torres.wsC++PerlPHP V:708-288-5859 F:714-908-8403[d]HTML CSS Javascript ====== -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: Q on fopen (URL )
"Dietrich Ayala" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > even if the openssl extension is enabled, on windows ssl will still not > be available in the streams code (fopen, fsockopen, ftp, etc). > > the only way to make this work is to statically link openssl when > compiling on windows. there's a link on the streams documentation page > to a patch that does this. oh, my brain is leaking out my ear! I read these pages 4 times. I'm still no closer to this than I was when I started. Sorry, can someone translate this into "English". Thanks. Walter -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: Q on fopen (URL )
"Jason Barnett" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > What I get back is this... > > > > Unable to find wrapper "https" > > - did you forget to enable it when you configured PHP? > > You'll need to look at the openSSL for Windows. Someone at PHP's site > said they openSSL has a bug in it, you should try using this to support > https: > > http://ftp.proventum.net/pub/php/win32/misc/openssl/ > > The original manual / posting where I gleaned this information: > > http://www.php.net/manual/en/wrappers.php Thanks. Got the new DLL, replaced the old one, modified my ini. Now I get this... Warning: fopen(): HTTP request failed! HTTP/1.1 500 Internal Server Error in test_2.php on line 29 this is line 29... $dh = fopen("$url",'r'); well, another step closer! This is hitting an IIS server, but I don't know which one. Any ideas? Walter -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: Why doesn't php have a 'date' variable type?
PEAR:Date Walter "Ross Honniball" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I accidently sent this to php-db mailing list earlier today. Apologies to > people who get it twice. > > Why doesn't php offer a standard class or variable type to help process > dates in a standard manner? > > Php should offer a DATE variable type (in addition to string, int, array, > object etc.). > > Date variables could be created by utilising standard date functions. eg. > >$birthday = SetDate('23-07-1985', 'dmy'); > > Use of this function would effectively declare $birthday as a field of type > date. (note that I wish this was my birthday). > > Standard maths could be performed on date fields for comparison. eg. > >$newdate = $start_date + $birthdate - 5; // as in days > >if ($date1 < $date2) ..whatever..; > > And of course standard routines for formating dates, standard routines for > showing time between dates / times etc. would all understand the date > variable type. > > This frustrated me so much that I recently wrote a class to emulate, as > best as possible, this level of functionality, which would actually be > quite adequate if Windows didn't suck. But due to some lunatic Windows > limitation, the php DATE() funciton will only work on dates between 1970 > and 2038. Annoying. > > Anyway, am I missing something, or do other people find this a glaring > omission in an otherwise spiffing product? > > Ross > > PS note that in refering to dates above, I really mean date + time. > > . Ross Honniball JCU Bookshop Cairns Supervisor > . James Cook Uni, McGreggor Rd, Smithfield, Qld. 4878, Australia > . Ph:07.4042.1157 Fx:07.4042.1158 Em:[EMAIL PROTECTED] > . There are no problems. Only solutions. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: Feature request for PHP on windows
"Court Shrock" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How about using the registry to store the location of the php.ini. It could > default to c:\windows for backward compatibility. I currently have multiple > versions of PHP setup on the same system. This works fine, as long as I > don't use the ISAPI module because the path to php.ini is hardcoded to > c:\windows with the dll. I'd like to test ISAPI configurations before > "going live" but still have the ability to easily maintain/update to newer > versions of PHP. > > The folks at Zend have done exactly that in their bundled version of PHP. NO, NO, please NO! No registry! God please, No! I have a complete Apache, Perl, mySQL and PHP install on my NT (works 2k and XP BTW) and I have NO registry settings! None! I don't want them! I back up my G volume to CD, and when my windows box dies (which it does all too often) all I have to do is restore from the CD, add some env vars and I'm in business! Now, if Windows PHP would be made "smart" enough to look in it's current dir FIRST for its INI, then I, and others, can run multiple versions of PHP without a problem. Why this was not done in the first place I have no idea. I just figured the guys who made it had a real good, windows limiting, reason for doing what they did. (I hope) So please, I vote -1 on a registry setting. BTW: add the env var PHPRC with the path to your PHP install and PHP will look there for the INI. But again, this only works for a single PHP install. Walter -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: php_gettext and php_iconv extensions
Daniel Blake" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ok, it took awhile but I finally got it working. Here are the instructions so > everyone can get it working easier. There are two DLL's that need to be in the > Windows\System32 directory and two that need to be in your extension_dir with > the PHP 4.3.4 package. FYI: I have *nothing* PHP related in my windows (or /system32) directory. Nothing at all. I do not have php.ini in there either. I have all my PHP files in their own directory; G:\etc\php as it happens. By placing 'PHPRC' in your environmental variables (left-click 'my computer' -> properties) and give the path to your php directory, all will be fine with the world. In fact, my Perl, Apache (with mold_perl and SSL), PHP and mySQL are in their own directories, all integrate just fine. If this is of any interest, for more info... http://web.torres.ws/dev/php This also make back ups and restores a breeze. I back up my G volume, simply burn to CD. Then, when I need to restore the system, I just drag the contents of the CD to the new G, insert a few env vars and everything works! Just wanted to share. Walter -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: PDF Library/Extention
[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Exactly what extension's do I use to generate PDF documents in PHP 4.2.3? I use this library... http://www.fpdf.org/ works great! Walter -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] virus and auto-reponders!
I post an answer to 2 different messages here, and within 20 minutes I'm flooded with virus alerts (someone using my address to spew virus) and auto-responders telling me they are on vacation. I thought everyone understood that auto-responders were "discouraged"? And I thought anyone on a development list would be smart enough to have current anti-virus software running 24/7 and fully up-to-date files. I guess not. Anyway, just a note to inform you that someone here is infected. And that 8 people have auto-responders running. Walter (ready to delete the next flood of crap generated by this message) -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] doubt
Is this the address where i send my queries regarding any problems faced with php. Please help thanks, penjo Yahoo! India Careers: Over 65,000 jobsonline.
[PHP-WIN] PHP to mySQL connect...
I have 2 machines, a server (Win NT server) and a workstation (Win XP Pro). On the server I have PHP, mySQL, Apache, Perl, etc. If I run this command from the prompt... G> mysql -h db.torres.ws -u user It connects fine. If I do this from PHP... $db_user = "user"; $db_pass= ""; $db_name= "myDB"; $db_host= 'db.torres.ws'; // '192.168.1.10' mysql_pconnect($db_host, $db_user, $db_pass) or die("Unable to connect to SQL server"); mysql_select_db($db_name) or die("Unable to select database"); I get this... Warning: mysql_pconnect(): Unknown MySQL Server Host 'db.torres.ws' (11001) in G:\home\php\htdocs\db.php on line 12 But if I use the IP, it connects just fine. If I use 'localhost', it works. BTW: db.torres.ws is in the HOSTS file on both machines. This worked before. I had to reinstall the database and now it doesn't work. Anyone have any ideas? Thanks Walter -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] php installation problem
Hello list, While installing phpafter i have configured everything, i am not able to get php running. While trying to run a test page consisting of the code: I get a dialog box saying that "You have chosen to download a file from this location". Upon opening the file, i get the whole code and not just "Hello". Please can you tell me what went wrong. I am using PHP 4.3.4, Apache 1.3.2. and Windows 2000. Also can u please tell me how do u know that php has been installed in my PC. While double clicking php.exe, a window gets opened and nothing seems to happen with it. We have to close it manually. Is it unusual or is it supposed to be like that only. Please help. Thanks in advance, penjo Yahoo! India Matrimony: Find your life partneronline.
[PHP-WIN] form to php
hi list, i have managed to successfully install php and i am now going through the manual and trying a few of the examples given there. The examples i have tried till now are all working except for one. The example about inputting in the form and then displaying it through php is not working for me. But when i run it i get the entire code in action.php instead. The example i am referring to is: form action="action.php" method="post"> Your name: Your age: .You are Please tell me whts wrong thanks in advance penjo Yahoo! India Matrimony: Find your life partneronline.
RE: [PHP-WIN] form to php
hi, 1) The lines in the form are in the correct order. 2)i tried using HTTP_POST['age']; ?> , but it still displays the entire code. Not quite sure wht u meant by "AUTOGLOBAL ON|OFF setting". If u meant register_globals in php.ini file, then it is set to on. 3) Regarding action.php: phpinfo(); ?> It still only displays the code. I ran action.php by itself and looked at the info page and i couldnot any entries for $HTTP_POST['name'] or $ _POST['name'] or $HTTP_POST['age'] or $_POST['age'] Please help. penjo grgk2 <[EMAIL PROTECTED]> wrote: Hi 1) Line " form action="action.php" method="post"> Your name: [input] type="text" name="name" /> Your age: [input] /> [input] should read " Your name: [input] name="name" /> Your age: [input] [input] " assuming that is correct 2) Try .You are $HTTP_POST['age']; ?> REASON - php.ini - AUTOGLOBAL ON|OFF setting 3) If that doesn't work try 4) action.php: phpinfo(); ?> Try to locate entries for $HTTP_POST['name'] or $ _POST['name'] or $HTTP_POST['age'] or $_POST['age'] See if they carry any values. REASON - php.ini - Other settings And resubmit to the list with your results. Best regards, Grgk2 Yahoo! India Matrimony: Find your life partneronline.
Re: [PHP-WIN] form to php
hi, Yes this is the contents of the file. I tried to use ur code but it still displays the entire code and not just the line required. Any idea wht is wrong. thanks, penjo Luis Moreira <[EMAIL PROTECTED]> wrote: Is this the contebnt of the PHP file ? Hi .You are It can not start by the "Hi" word ... Action.php should be something like $name = $_POST['name']; $age = $_POST['age']; echo "Hi $name. You are $age"; ?> PHP MySQL wrote: >hi list, > > i have managed to successfully install php and i am now going through the manual and > trying a few of the examples given there. The examples i have tried till now are all > working except for one. The example about inputting in the form and then displaying > it through php is not working for me. But when i run it i get the entire code in > action.php instead. >The example i am referring to is: > >form action="action.php" method="post"> Your name: [input] Your age: [input] [input] > >action.php: > >Hi .You are > > > >Please tell me whts wrong > >thanks in advance > >penjo > >Yahoo! India Matrimony: Find your life partneronline. > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Yahoo! India Matrimony: Find your life partneronline.
RE: [PHP-WIN] form to php
Thanks for all ur repliesi have finally got it working. Thanks a lot "grgk2", i did exactly as u told me, i.e., executed the form like so: http://localhost /form.html. And it worked. I was earlier trying to access it by double clicking on it. Once again, thanks for ur help. grgk2 <[EMAIL PROTECTED]> wrote: Its not a bother, its the purpose of the list. Yes. What I meant was that in order for the php script to be parsed it should be executed on a web server. if your html form resides in a file named [form.html], it should be executed like so: http://localhost /form.html. if your web server has a different name just use the appropriate name My point being that you should not try to execute any php file just by double clicking on it J If you have the following 1) A web server installed on your machine 2) Php installed correctly for that WS Then the following script should yield result [Save as info.php] [Execute http://localhost/info.php] Mail me the results -Original Message- From: PHP MySQL [mailto:[EMAIL PROTECTED] Sent: Thursday, July 29, 2004 1:12 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] form to php 1) i have tried with all the HTML structure and it is not displaying the part using the php code. i.e., it is displaying "Hi $name. You are $age". 2)) Please tell me how ca i make sure iexecute the file through my localhost server (i.e. Apache so that php code will be treated as php code). Do u mean i have to run as "http://127.0.0.1/action.php"; Sorry for bothering u again and again. thanks, grgk2 <[EMAIL PROTECTED]> wrote: Luis is very correct. If you see all the source code that means the php code is not parsed as php code. 1) Make sure you execute the file through you localhost server (i.e. Apache so that php code will be treated as php code) 2) any html file should conform with the following skeleton structure Any echoes you need to do should be within the element As Luis stated this will do as well as this Hoppe that does it... -Original Message- From: PHP MySQL [mailto:[EMAIL PROTECTED] Sent: Thursday, July 29, 2004 12:30 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] form to php hi, 1) The lines in the form are in the correct order. 2)i tried using HTTP_POST['age']; ?> , but it still displays the entire code. Not quite sure wht u meant by "AUTOGLOBAL ON|OFF setting". If u meant register_globals in php.ini file, then it is set to on. 3) Regarding action.php: phpinfo(); ?> It still only displays the code. I ran action.php by itself and looked at the info page and i couldnot any entries for $HTTP_POST['name'] or $ _POST['name'] or $HTTP_POST['age'] or $_POST['age'] Please help. penjo grgk2 wrote: Hi 1) Line " form action="action.php" method="post"> Your name: [input] type="text" name="name" /> Your age: [input] /> [input] should read " Your name: [input] name="name" /> Your age: [input] [input] " assuming that is correct 2) Try .You are $HTTP_POST['age']; ?> REASON - php.ini - AUTOGLOBAL ON|OFF setting 3) If that doesn't work try 4) action.php: phpinfo(); ?> Try to locate entries for $HTTP_POST['name'] or $ _POST['name'] or $HTTP_POST['age'] or $_POST['age'] See if they carry any values. REASON - php.ini - Other settings And resubmit to the list with your results. Best regards, Grgk2 Yahoo! India Matrimony: Find your life partneronline. Yahoo! India Matrimony: Find your life partner online. Yahoo! India Matrimony: Find your life partneronline.
[PHP-WIN] Re: WinXP PHP Install Problem
http://web.torres.ws/dev/php check this out, see if the instructions there help you at all. Walter "Bruce Guthrie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I've just installed PHP 4.3.8 on my WinXP, Apache 2.0.50, MySQL 4.0.20d > system. Apache, MySQL are running without issue. After installing PHP, > however, my "Hello World" test does not run. It only list out the > source code which looks like PHP isn't running. I've checked my Apache, > PHP installtions against the PHP Installtion guide and all seems to be > correct. No errors appear in the Apache error log. I'm new to PHP, so > I was wondering if anyone could give me some additional troubleshooting > tips? > > Thank you for your assistance. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Connecting to a database
hi list, I am given a task to connect to a database and display the info there onto the Web. So that whatever changes are made in the database...my web page will also show the newly changed data. I am planning to try doing this using PHP but as i am new to php...i don't know how to go about doing this. I am in the process of learning php and i am using a book called"Beginning php4". But i was wondering if any of u guys would tell me how it could be done and how i should get started in it. I am sorry if the answer is already in the list..i searched through it but couldn't get my desired answer. Thanks.. penjo Yahoo! India Matrimony: Find your life partneronline.
[PHP-WIN] PHP and SQL 2000
hi there, i have been trying to connect to a sql 2000 server database. I am able to connect using the DSN-connection: i.e., the following code works: "; while (odbc_fetch_row ($process)) { $Description = odbc_result($process, "FullDescrp"); echo "$Description "; } odbc_close ($sqlconnect); ?> But when i try to connect to the database using the mssql_ functions like: "; while ($row = mssql_fetch_array ($result)) { echo $row['FullDescrp']."\n"; } mssql_close ($sqlconnect); ?> It is not getting conencted. The following error is given: "Warning: mssql_connect(): message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in c:\program files\apache group\apache\htdocs\btc_test.php on line 8 Warning: mssql_connect(): Unable to connect to server: in c:\program files\apache group\apache\htdocs\btc_test.php on line 8 Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in c:\program files\apache group\apache\htdocs\btc_test.php on line 9 Couldn't open database BACSDB_test" Please help Any help received will be highly appreciated. thanks penjo Yahoo! India Matrimony: Find your life partneronline.
Re: [PHP-WIN] PHP and SQL 2000
hi list, I set mssql.secure_connection = On in php.ini file and my php file is now successfully getting connected to the SQL 2000 database. Thank u very much for ur helpspecial thanks to Frank. Regards, penjo Yahoo! India Matrimony: Find your life partneronline.
Re: [PHP-WIN] Substr function
In addition to substr() and explode() already mentioned, check out some of these: basename() - Returns filename component of path http://us2.php.net/manual/en/function.basename.php strrpos() - Find position of last occurrence of a char in a string http://us2.php.net/manual/en/function.strrpos.php $filepath = "/something/somethingelse/filename.ext"; You could use basename() to get the full filename with exension then use $basename = basename($filepath); Or you could use: $basename = substr(strrpos($filepath,"/")+1); Then use: list($file,$ext) = explode(".",$basename); .. to get your extension. I think that's right. If you don't do the +1, I believe you'll get the "/" in your filename and you don't want that part. I think basename() is probably your best bet if you have the full file path to start with. substr() works great if you know where to split the string but using PHP's functions to their fullest capability is always good tood. Good luck! HTH! -TG *** new email address [EMAIL PROTECTED] *** old email address [EMAIL PROTECTED] (Stupid Chapter 11) = = = Original message = = = Hi can anyone explain to me how to manipluate strings. I have generated a file name ($_FILES['documenturl']['name']) Out of this server variable I need to grab the file and the extension and put them into seperate fields for database upload. Any idea how to do this by using substr? Thanks Steven ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: AW: [PHP-WIN] Word COM Object
Creating a new document in Word, inserting Page Breaks then saving it as a web page revealed that Word seems to use CSS tags to show the line breaks in HTML. The only odditiy I see is that when I load the HTML back into Word, mine is still set to "View -> Web Page Layout" or something (Word 2003) which doesn't show the page breaks (since you don't have page breaks in HTML) but if you set it to "View -> Normal" the page breaks are in there. Anyway, generating HTML like the following should give you page breaks when loaded into Word: Test 1 <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal ~{margin:0in; ~margin-bottom:.0001pt; ~font-size:12.0pt; ~font-family:"Times New Roman";} @page Section1 ~{size:8.5in 11.0in; ~margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 ~{page:Section1;} --> Test 1 Test 2 Test 3 Really you probably just need this as the page break: Not sure what "clear=all" does, but the "page-break-before" is standard CSS (CSS2 I believe) that's telling it to insert the page break before the tag (right? I think that's right). Maybe that helps.. if not, post again "Ask again later" - Magic 8 Ball :) -TG = = = Original message = = = Thank you for reply. I figured out how to do that but now my issue is that since my styling is all done in HTML...I'm trying to bring over the HTML for each person's BIO, followed by a page break then the next person's BIO followed by a page break...and so on... The obvious problem is that if I use the Word COM object to insert the HTML...the HTML isnt parsed and all I get is the HTML source code...but the page breaks work great. If I save the file first as HTML then open it using the Word COM object then save it as a doc, it parses correctly...but since there is no HTML page break function...all of the bios run one after the other, when what I really need is each Bio starting on a new page. This is killing me! Ron >From: Sven Schnitzke >To: '[PHP-WIN]' >Sent: 01/07/2005 8:15 AM >Hi, >sorry for accidentally sending private mail first ! Now to the list: > >to insert a pagebreak just leave out the parameter entirely. It's default: > >~$word->Selection->InsertBreak(); > >but for clarity you may want to specify it, so do it the positional way (it's the 1st one): > >~$word->Selection->InsertBreak(wdPageBreak); > >Named parms don't seem to be supported by PHP COM. > >HTH >-- >Sven > >> -Urspr~ngliche Nachricht- >> Von:[EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] >> Gesendet am:~Mittwoch, 5. Januar 2005 18:55 >> An:[EMAIL PROTECTED] >> Betreff:~[PHP-WIN] Word COM Object >> >> >> I have successfully made a PHP script that takes dynamically generated >> HTML and creates a Word Doc then saves it to the server and creates a link >> to itself. This is fine and dandy but now I have to do a multipage >> document using several dynamically generated pages...this isnt a problem >> BUT I need to put a page break following each dynamically generated page. >> Is there some MS WORD command that I could embed in the HTML I am >> generating that will cause a page break? >> >> This seemingly simple task is killing me. >> >> Ron >> >> >> >> >> >> > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: AW: [PHP-WIN] Word COM Object
No prob, hope it helps. Usually, if Word or whatever application you're working with knows how to do something then usually you can work it backwards (start with the finished product and trace it back a little) to figure out how they do it or what standard they use get the job done. Sometimes there are some special little codes that aren't really obvious that will do the job. Try exporting an Excel spreadsheet to HTML ("Save for web" or whatever) and take a look at THAT code. If you have a formula like "=B2+5" and B2 is "2", the cell with the formula will have the value "7" between the but then there's a code embedded in there that's ignored by web browsers that actually has the formula so Excel knows how to reconstruct it. It's kind of cool but definitely useful to know that you can do things like that. I did a thing once that generated an HTML table with some embedded Excel tags. It displayed correctly in HTML and then you could click a "Download" or "Open in Excel" button and just send some custom headers to pretend it was an .XLS file and the document would open in Excel with all the formulas and things in the right place... all without having to mess with PEAR Excel Writer (??) or creating an .XLS file itself. Anyway, good luck. I think there are probably lots of ways to skin this particular cat. Play around with different methods. -TG = = = Original message = = = Wow thanks! I will try this out. I really appreciate the help. Ron >From: [EMAIL PROTECTED] >To: php-windows@lists.php.net >Sent: 01/07/2005 9:54 AM >Creating a new document in Word, inserting Page Breaks then saving it as a web page revealed that Word seems to use CSS tags to show the line breaks in HTML. The only odditiy I see is that when I load the HTML back into Word, mine is still set to "View -> Web Page Layout" or something (Word 2003) which doesn't show the page breaks (since you don't have page breaks in HTML) but if you set it to "View -> Normal" the page breaks are in there. > >Anyway, generating HTML like the following should give you page breaks when loaded into Word: > > > > > > >Test 1 > ><!-- > /* Style Definitions */ > p.MsoNormal, li.MsoNormal, div.MsoNormal >~margin:0in; >~margin-bottom:.0001pt; >~font-size:12.0pt; >~font-family:"Times New Roman"; >@page Section1 >~size:8.5in 11.0in; >~margin:1.0in 1.25in 1.0in 1.25in; >div.Section1 >~page:Section1; >--> > > > > > > >Test 1 > >style='page-break-before:always'> > > >Test 2 > >style='page-break-before:always'> > > >Test 3 > > > > > > > > >Really you probably just need this as the page break: > > > >Not sure what "clear=all" does, but the "page-break-before" is standard CSS (CSS2 I believe) that's telling it to insert the page break before the tag (right? I think that's right). > >Maybe that helps.. if not, post again "Ask again later" - Magic 8 Ball :) > >-TG > > >= = = Original message = = = > >Thank you for reply. I figured out how to do that but now my issue is >that since my styling is all done in HTML...I'm trying to bring over the >HTML for each person's BIO, followed by a page break then the next >person's BIO followed by a page break...and so on... > >The obvious problem is that if I use the Word COM object to insert the >HTML...the HTML isnt parsed and all I get is the HTML source code...but >the page breaks work great. If I save the file first as HTML then open it >using the Word COM object then save it as a doc, it parses correctly...but >since there is no HTML page break function...all of the bios run one after >the other, when what I really need is each Bio starting on a new page. > >This is killing me! >Ron > >>From: Sven Schnitzke >>To: '[PHP-WIN]' >>Sent: 01/07/2005 8:15 AM >>Hi, >>sorry for accidentally sending private mail first ! Now to the list: >> >>to insert a pagebreak just leave out the parameter entirely. It's >default: >> >>~$word->Selection->InsertBreak(); >> >>but for clarity you may want to specify it, so do it the positional way >(it's the 1st one): >> >>~$word->Selection->InsertBreak(wdPageBreak); >> >>Named parms don't seem to be supported by PHP COM. >> >>HTH >>-- >>Sven >> >>> -Urspr~ngliche Nachricht- >>> Von:[EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] >>> Gesendet am:~Mittwoch, 5. Januar 2005 18:55 >>> An:[EMAIL PROTECTED] >>> Bet
[PHP-WIN] RE: [PHP] php editor
It's true that googling would produce a list of PHP-happy editors, but the intended question seems to be more along the lines of "What does everyone like? Use? Prefer?" That's not something that's always found on lists you'd get off of google. Helpful responses aren't always ones that are technically correct. -TG = = = Original message = = = "Know any goog ones?" funny you should mention goog.. if you google'd "php editor" youd have your answer by now.. cheers phpninja -Original Message- From: William Stokes [mailto:[EMAIL PROTECTED] Sent: Thursday, January 13, 2005 8:02 AM To: php-general@lists.php.net Subject: [PHP] php editor Hello, I'm quite new with writing php code. I was considering of using some kind of php editor program to help with the syntax. Know any goog ones? Thanks -Will ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: SpreadSheet_Excel_Writer PEAR package
First, I have to admit that I don't have any experience with PEAR's Excel Writer, but I have quite a bit of Excel experience (including Excel+VBA so I got some experience with the internal workings via code). foreground color should be for the text and/or pattern color. bgcolor should be for the cell color. In the example used in that link, a pattern is set and the foreground color is set to 22. Most likely this 'works' because the pattern is being colored, not the cell background. I'm not sure what color index 22 is or pattern 2, but this seems like a bad solution (or at least not the 'right' solution) to what's being asked. The quest was if you have pattern set to 0 (no pattern I would think), why a background color doesn't work properly. Right now I don't have a good answer for anyone, but wanted to break down what was already mentioned and say that you might want to keep looking for a better solution. No offense Torsten. But I'm thinking that if Louis puts any data into that cell, it's going to show up in the 'fgcolor' color which may not be acceptable to what he's trying to do. But hey... I could be wrong too. It's happened before. hah. Louis! You might check on the PEAR mailing list as well.. check their archives and such. Someone may have had a similar problem and they most likely discussed it there before they did here. http://pear.php.net Good luck! Let us know if you find a solution. I have an interest in PHP<->Excel stuff, but havn't had any need for it recently. So I'm eager to learn of any issues with PEAR's Excel Writer or other PHP/Excel solutions. Thanks! -TG = = = Original message = = = "Louis Young" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there > > Why does my background color not show if I set a cells pattern to 0? > > Cheers > Louis Hi Louis, take a look here: http://marc.theaimsgroup.com/?l=pear-general&m=108127548918900&w=2 Have you tried setFgColor()? Regards, Torsten _______ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Re: PHP MS-DOS
I think people get confused when they talk about "Windows apps" and such. I'm not sure that I can clarify things that much, but I wanted to point out some stuff that might help people understand a little better. Please, anyone who has more intimate knowledge of this, feel free to correct me or add to what I've said. When people think Windows, they think GUI. So then you ask yourself, "Why does PHP need a GUI if we're only trying to run it in command line mode?". I guess one answer is that you really DONT need Windows, but in the evolution from DOS to Windows there were some things done that were never added to the older DOS-only systems that PHP requires. It's probably more accurate to say that PHP, even command line, is a win32 app. This means that it's using some win32 calls/functions/whatever that you can't get in a DOS-only environment. Probably not even the DOS that's installed on a bootable floppy created under a newer version of Windows (DOS 7? They up to DOS 8 or so yet? I havn't made a bootable floppy since Windows 98 so I don't know). I havn't checked out the PHP CLI mentioned, but if it still needs win32 functions, then it's probably not going to work on a bootable floppy/cdrom without something special to help it (or a recompiling to make it not a win32 app). I did find a product called unWin that emulates win32 calls, but it looks like you have to pay for it. Still, if that's a hard requirement for an application you're creating for a job or something, it might be worth looking into. You can find unWin and unDos at: http://www.smxinfo.com/rtos/dos/undwinpb.htm If I screwed something up, feel free to correct me. If you have more questions or I was unclear, feel free to ask and I'll try to be more clear. -TG = = = Original message = = = Yes, but it's still a windows app.. :p I think it uses windows funtionality, that doesn't exist in dos (with dos I don't mean console windows, I mean real dos, with no windows loaded at all).. It's not using windows specific stuff, or at least it doesn't really depend on it, but it uses stuff that I doubt exists in dos.. -- // DvDmanDT MSN: dvdmandt~hotmail.com Mail: dvdmandt~telia.com "Jean-Philippe Palha" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Try PHP CLI, it's the command line version of PHP > (look at the CLI folder in your PHP distrib) > > Jean-Philippe PALHA ([EMAIL PROTECTED]) > IMA'DIFF - 13, rue Damesme - 75013 Paris FRANCE > Tel : 33 1 53 80 89 89 - Fax : 33 1 53 80 89 81 > Web : http://www.imadiff.com > -- > -- > > "DvDmanDT" <[EMAIL PROTECTED]> sur mercredi 26 janvier 2005 ~ 15:45 +0100: > >I don't think you could get it to run under dos.. You could recompile it > >ofcorse, but I doubt it would work anyway.. I think it uses some > >functionality that wouldn't be possible under dos.. But it's only a > >guess.. > > > >-- > >// DvDmanDT > >MSN: dvdmandt~hotmail.com > >Mail: dvdmandt~telia.com > >"Shawn McKenzie" <[EMAIL PROTECTED]> skrev i meddelandet > >news:[EMAIL PROTECTED] > >> Is it possible to run the current win32 PHP under DOS only? I have a > >> bootable DOS disk with PHP and when I attempt to run it I get "This > >> program can not run in DOS mode.". > >> > >> Is there a DOS binary??? > >> > >> TIA > >> -Shawn > > > >-- > >PHP Windows Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] From Browser to Print - ?????
Check into maybe using CSS2 page breaks. I don't see any way to make PHP do it, but CSS2 has facilities for that. Try this: Requires IE 5.5 if I remember right. -TG = = = Original message = = = I have some PHP scripts that put output to the browser. I can then print them. However, I want to have the pages form feed at specific places so the printouts look nice. How can I do that? Thanks. Mike ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] outlook calendar
= = = Original message = = = > Good morning, > > Is it possible to reach the data of the outlook calendar (on a server > exchange) with php? > > Thank you for advance I've never tried using PHP to connect to an Exchange server directly, but I've done some stuff with using PHP to connect via COM to Outlook itself (and let Outlook do all the hard work of getting data from Exchange). Here's some sample code to read calendar entries. Remember, you have to have Outlook currently running on the PC that PHP is running on. Good luck! -TG Activate; # This is your mailbox name just like it appears in your Folders view. It might be 'Inbox' or something else. $targetmailboxname = "Personal Folders"; # This is the folder you're looking for. In this case, I'm looking for calendar items, but you can look for # any folder. You need to add another loop to look for subfolders. Although there's probably a better # way, that's how I did it when I needed to get to Personal Folders/Inbox/Subfoldername $targetfoldername = "Calendar"; $objNamespace = $comobjOutlook->GetNameSpace("MAPI"); $objFolders = $objNamespace->Folders(); $mailboxcount = $objFolders -> Count(); $foundmailbox = FALSE; for ($i=1; $i<=$mailboxcount; $i++) { $folderitem = $objFolders ->Item($i); if ($folderitem -> Name == $targetmailboxname) { $objMailbox = $folderitem; $foundmailbox = TRUE; } } $foundcal = FALSE; if ($foundmailbox) { $objFolders = $objMailbox->Folders(); $foldercount = $objFolders -> Count(); for ($i=1; $i<=$foldercount; $i++) { $folderitem = $objFolders -> Item($i); if ($folderitem -> Name == $targetfoldername) { $objCalendar = $folderitem; $foundcal = TRUE; } } if ($foundcal) { $objItems = $objCalendar->Items(); $itemcount = $objItems->Count(); for ($i=1; $i<=$itemcount; $i++) { $apptitem = $objItems -> Item($i); $apptstart = $apptitem -> Start(); $apptend = $apptitem -> End(); $apptallday = $apptitem -> AllDayEvent(); $apptrecur = $apptitem -> IsRecurring(); $apptsubject = $apptitem -> Subject(); $apptlocation = $apptitem -> Location(); $secondsadj = $apptstart - 14400; $startadj = date("m/d/Y H:i:s", mktime(0,0,$secondsadj,1,1,1970)); $secondsadj = $apptend - 14400; $endadj = date("m/d/Y H:i:s", mktime(0,0,$secondsadj,1,1,1970)); if($apptallday) { $allday = "All Day"; } else { $allday = ""; } if($apptrecur) { $recurring = "Recurring"; } else { $recurring = ""; } echo "$apptsubject @ $apptlocation\r\nFrom: $startadj To: $endadj\r\n"; if ($allday <> "" OR $recurring <> "") echo "$allday $recurring\r\n"; echo "\r\n\r\n"; } } else { die ("Did not find calendar folder"); } } else { die("Did not find target mailbox: $targetmailboxname"); } ?> ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] outlook calendar
You know, I forgot but I think that depending on the version of Outlook, you might have to replace the "outlook.application" with something else. Maybe not.. hmm.. I can't find any examples where something other than 'outlook.application' is used. Maybe I'm wrong there. At any rate, I'd check to make sure you're instantiating the COM object. Maybe try connecting to Excel or another MS program via COM. I havn't played with PHP5 yet, so can't tell ya if it does anythig differently or needs any extra TLC. Let us know if you find anything interesting. -TG = = = Original message = = = [EMAIL PROTECTED] wrote: > $comobjOutlook = new COM("outlook.application") or die("Unable to instantiate > outlook"); $comobjOutlook -> Activate; > PHP 5.0.3 crashed after trying this... it complained that there was no property named "Activate". I then tried changing Activate to Activate() in case it was supposed to be a method, but that failed as well. So much for copy and paste, is it ever that easy? I always have problems with COM. :-/ Perhaps there is another issue that I'm unaware of that is preventing me from using COM and / or preventing Outlook from responding correctly? Anyone know what I might try? I should probably add: I'm running Win2K v5.00.2195 (with all critical updates). I will try running this code on my WinXP laptop later to see if the OS is my issue... ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: [PHP] Re: Storing CCN's Again...
ed, clean-room access, armed guards on all hardware setup, etc Instead of breaking into CC Storage with your secret decoder ring from CC Processing, you can maybe find a flaw in the API of Seg 3, and sniff out encrypted data to apply the ring, or even catch it after they decrypted it. The point is, you have to work much harder at it because of the segmented architecture. By adding an additional layer between the CC Processing and the CC Storage, they reduce risk significantly. All the CC machines (Processing and Storage) are in the armed guard locked storage room for physical access to be severely curtailed. Duh. But the CC Storage machines have an additional layer of software/network blocks with severely limited software/network access to the CC Storage area. I'm not claiming they *DO* have this, but I'll bet whatever they do have, it's at least that complicated, if not more so. Or, even more likely, Amazon doesn't store the number! They let the BANK that provides their CC processing services store the numbers. So then the BANK has this kind of setup. Whatever. This is just a description of what was explained to me on this very same list several years ago as *ONE* industry-standard way to store CC Numbers for later retrieval. I'm not an expert, and may easily have left out some (okay a lot) of crucial details. If you're storing CC Numbers with *JUST* the 2-way encryption, maybe you're doing it wrong. I dunno for sure, but *I* think so. Go hire a professional security audit and find out. YMMV IANAL NAIAA -- Like Music? http://l-i-e.com/artists.htm ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: [PHP] Removing Items from an Array
Thanks for the addition Jochem.. one reason I post here, even if it's a basic example, is because if there's a better way or a chance to learn something new, I want to have that opportunity. Thanks again! -TG = = = Original message = = = Id like to continue where TG left off ... hth. [EMAIL PROTECTED] wrote: > If I understand what you're asking, then maybe this will help: > > $arrset1 = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1); > $arrset2 = array("Couches" => 6, "Chairs" => 2, "Benches" => 5); > > $alldataarr["Fruits"] = $arrset1; > $alldataarr["Furniture"] = $arrset2; > > Say we want to remove "Chairs", and let's do it the hard way: > > foreach ($alldataarr as $key => $data) > foreach ($data as $subkey => $subdata) > if ($subkey == "Chairs) > unset($alldataarr[$key][$subkey]); > > > > > using foreach $arr as $key => $data you can get the key/index name as well as > the actual value stored in that part of your array. Then all you have to do > is refer back up to the main array using the current $key/$subkey values as > your indexes. > $filter = array( ~'Fruits'=> array('Apples' => 1, 'Oranges' => 1), ~'Furniture' => array('Couches' => 1, 'Chairs' => 1), ); $alldataarr = array(); $alldataarr["Fruits"] = array("Apples" => 3, "Oranges" => 5, "Apricots" => 1); $alldataarr["Furniture"] = array("Couches" => 6, "Chairs" => 2, "Benches" => 5); foreach ($alldataarr as $key => $data) if (!isset($filter[$key]) ~// we want it all;. ~continue; $alldataarr[$key]= array_intersect_keys($data, $filter[$key]); // heres one I prepared earlier: /** * array_intersect_keys() *^--- the internal function (php5.x+?) has no 's' * * returns the all the items in the 1st array whose keys are found in any of the other arrays * * @return array() */ function array_intersect_keys() $args = func_get_args(); $originalArray = $args[0]; $res= array(); if(!is_array($originalArray)) return $res; for($i=1;$i $data) if (isset($originalArray[$key]) && !isset($res[$key])) $res[$key] = $originalArray[$key]; return $res; > > Basic example, but I think you can modify this to work with what you're doing. > > Let me know if you have any questions about this example. > > -TG > > > > = = = Original message = = = > > Hi all, > > I'm really struggling here! I have a large, multi-dimensional array that > I want to "clean-up" a bit before committing to a database. > > I want to remove quite a bit of the array but using the KEYs not the > values. I know the keys I want to keep and I know the keys I want to get > rid of. I want to keep the structure and sequence of the array in tact. > > All of the array traversing functions in PHP seem to either: only work > on the values, or do not allow the removal of elements of the array! > > Can anyone offer a clue bat to a tired old array walker! > > Thanks > > Alan > > > ___ > Sent by ePrompter, the premier email notification software. > Free download at http://www.ePrompter.com. > ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Is this a PHP bug?
Thanks for the vote of confidence, Ross. hah. *shrug* At any rate, I was wrong about one thing. Mis-remembered something about converting a string to a int. It doesn't pull all numbers out of the string, it only pulls leading numbers. $address = "123 Main St Apt 45"; echo intval($address); outputs "123" not "12345" But as explained, the lack of numbers (specifically at the front end of the string) produces a numerical zero. As to "numbers should be converted to strings" that was sort of my initial thoughts when I started using PHP, but now that I've used it for a while, I think the "convert to lowest common denominator" method works better. Either way, it was a judgement call on the part of the PHP development team and it's how PHP operates. So at this point it's kind of like saying "This house really should have a basement" after the house is built. Maybe there's a good reason why they didn't put a basement in to start with and technically it's possible to add a basement if they changed their mind, but at what cost. At any rate, known, predictable and intentional behavior is not a bug. -TG = = = Original message = = = I'm yet to be convinced it isn't a bug. I suspect it is a bug that has been around so long that they can't afford to fix it or it may break many applications that for various peculiar reasons rely on it to behave as it does for their code to work. For those who have tried to defend its behaviour, this is my logic. 1. The == operator means, by definition, "don't worry about variable 'type', just compare the values" (This is probably the single thing I love about PHP more than anything else) 2. If the numeric variable $x is given ANY other numeric value other than zero, the logic behaves correctly as you read it So it is irrational for program logic to vary between a zero value and, for aguments sake, a numeric value of 42. Regarding specifically TG's explanation below, I believe he is wrong. If you compare a numeric type and a string type using ==, PHP should convert the number to a string and compare the two from there. Anyway, not expecting any answers to this, just a point of note and a strange quirk to keep at the back of your head when consciously comparing numeric / string variables. Ross [EMAIL PROTECTED] wrote: > It's because PHP is trying to convert different var types into a common var > type and then compare them when you use ==. === means compare value AND type > so that's why it fails. > > Your string, 'Some kind of string' is getting converted down to the lowest > common denominator, an int. Since there are no numbers in the string to grab > onto, it gets converted to nothing, an int value of zero. > > If you had $x = "0" or if $y had contained numbers at all, it wouldn't have > passed. > > But this is why when you use $x.'' it works properly because now you have > "0", it's been converted to a string value "0". Good catch on > that though, shows good methodical debugging :) > > So in the future, either use === or be extra aware of your variable types and > make sure you're comparing properly. > > Good luck! > > -TG > > = = = Original message = = = > > $x = 0; // Numeric zero > $y = 'Some kind of string'; > > if ($x == $y) echo 'they equal using =='; > if ($x === $y) echo 'they equal using ==='; > > The above will echo 'they equal using =='. > > The values don't look very equal to me. > > Can anyone explain the logic behind this? > > I'm heading home now but look forward to your explanations tomorrow. > > PS > > Incidently, to 'fix' it so it behaves as it should, you can code: > > if ($x.'' == $y.'') echo 'this will not print and all is good.'; > > Regards .. Ross > > > ___ > Sent by ePrompter, the premier email notification software. > Free download at http://www.ePrompter.com. > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Re: [PHP] PDF printing under windows.
Two (and a half) things: 1. Even though DOS/Windows machines don't have, specifically, /dev/printer or /dev/lpr or whatever the *nix specific is, it does have a LPTx: device According to the page listed below, it may be possible to do: copy /b filename LPTx The /b indicates it's a binary file. How it'd handle PDF fonts and such, I'm not sure, but I know that some printers can decode PDF's internally so that'd work out great. 2. Second point... If all you need is a simple print function and you have exec() privs, why not try to find a DOS based printing solution. The copy command above was mentioned on this page: http://www.lerup.com/printfile/ It says it works with Windows 3.1 to XP. And it even works with command line options: "PrintFile also works well with command line (DOS) programs. It has several command line options and can read data from command line standard input, e.g. a command line pipe. A command like: dir | prfile32" So I guess it sets up it's own print device that you can pipe to. And finally... the half a point. All of this may not be necessary because you can configure Windows printers to support DOS (although I havn't done this in ages, I assume you still can in XP) so in theory the normal DOS "print" command would pipe through Windows drivers and print handling to the printer of choice. So in general, there's probably zero need to use COM to print. One of these options should pipe the file through Windows which in turn, could possibly send it through the proper printing method. If not, you might be able to look in your registry and find the right-click "Print..." option and see if it's something you can execute from command line. Ok, I know this email's too long already, but I know someone's going to say "How do you do that?" So here's the 50 cent tour: 1. Pull up "regedit" 2. Search for the file extension ".pdf" 3. Make note of the "(Default)" value, in this case "AcroExch.Document" (I think this is specific to having the full Acrobat installed) 3. Below the area where all the file extensions are in HKEY_CLASSES_ROOT there are the actual named app section (that way, ".gif" and ".jpg" can both point to Photoshop.document" or something.. get it?) So search for "AcroExch.Document" in this case 4. Expand that tree and look for "shell". These are all the things that show up on your right-click menu. In this case, we have a "print" section. Under each of these entries, there should be (but sometimes not) a "command" branch. This is what's run when you select that option from the right-click menu. And voila! We find that the command to use Acrobat to print (which can be executed from command line on a Windows machine) is: "C:\Program Files\Adobe\Acrobat 5.0\Acrobat\Acrobat.exe" /p /h "%1" Substituting the %1 for the filename. Using that command line in a php exec() call should exactly simulate selecting right-click PRINT on a PDF file. Crossposting this to PHP-Win for their benefit too since this is more Windows related than PHP General. I see lots of ways to potentially solve this problem without using COM. I loved messing with COM (with or without PHP) for a while, but it's not a great general solution to things unless you absolutely HAVE to control the app (which is very cool and slick sometimes, but not for something as simple as printing). Hope this gives you some new avenues to persue. Best of luck! -TG = = = Original message = = = Richard Lynch wrote: >On Mon, October 24, 2005 1:48 pm, Dave Lists wrote: > > >>I'm generating PDFs under windows using PDFlib and all is easy. What I >>am wondering though, and google reveals nothing usefull, can I print >>the >>PDF to a network printer from windows? I'm presuming to print the file >>I >>would ahve to use COM and open it under Acrobat? Anyone done this >>before >>and have any pointers? I'm printing out invoices and what to automate >>the task. >> >> > >If, for some weird reason, you want to allow the user (authenticated, >logged in, trusted) to print to a networked computer on the WEB >SERVER, then your best bet is probably to figure out how to print that >PDF from MS-DOS and then to use http://php.net/exec to print it, I >would guess... > > It's from a cli PHP install on a local machine :-) >You might be able to use PHP to open up a COM object to convince >Adobe/Windows/whatever to print... > > COM makes me want to cry ;-) At the moment I'm trying to convince OpenOffiice it wants to play with PHP and COM. I have tried to exec print on the windows box but that just hung. >If it wa
[PHP-WIN] Re: [PHP] PDF printing under windows.
David.. I think I accidentally deleted your last message, but I believe you said something about Acrobat not closing after it gets done printing. Here are a few thoughts: 1. If you right click on something and select "print" and it performs the command line action listed in the registry as mentioned below, it SHOULD exit when done printing. If it doesn't, it could be an app issue. 2. If you use COM and app doesn't close properly, you might want to look at the app "Close" as well as "Quit" methods. If I recall, you can do one, or the other, but an instance of the app may still hover invisible in the background. I remember using both (in a certain order.. reversing the order made it so the app still stayed loaded.. the correct order though made sure the app closed properly). 3. If a certain file type (like say Excel files for instance) requires a specific app to interpret it's data for output, then you kind of can't get around loading the app in order to print it. Unless you can find a smaller view/print-only app that's made for handling that app's data files. In the case of PDF, if you're lucky then your printer knows how to decode them and you might get away with piping the raw binary file directly to the print device (LPTx in the case of DOS/Windows.. where "x" is of course the number of the printer device. Might have to mount the printer to that port though or do the DOS printer config in Windows). The printer needs intelligible data from the PC if it doesn't natively know how to handle the file. So again, you need the real app or a reader type app to load in order to send the printer proper data. If you get the print command line out of the registry as listed below, then it SHOULD exit properly. If not, it's a problem with the app and not with your code. Try performing the CLI command in a command prompt and see if the app exits properly before doing it in PHP.Something as common (and an open standard) like PDF, you should be able to find other DOS and/or Windows apps that'll print it, but you'll probably still have to use the command line and exec() call of some kind, unless you use COM which is overly complicated and burdensome in my opinion. -TG = = = Original message = = = Two (and a half) things: 1. Even though DOS/Windows machines don't have, specifically, /dev/printer or /dev/lpr or whatever the *nix specific is, it does have a LPTx: device According to the page listed below, it may be possible to do: copy /b filename LPTx The /b indicates it's a binary file. How it'd handle PDF fonts and such, I'm not sure, but I know that some printers can decode PDF's internally so that'd work out great. 2. Second point... If all you need is a simple print function and you have exec() privs, why not try to find a DOS based printing solution. The copy command above was mentioned on this page: http://www.lerup.com/printfile/ It says it works with Windows 3.1 to XP. And it even works with command line options: "PrintFile also works well with command line (DOS) programs. It has several command line options and can read data from command line standard input, e.g. a command line pipe. A command like: dir | prfile32" So I guess it sets up it's own print device that you can pipe to. And finally... the half a point. All of this may not be necessary because you can configure Windows printers to support DOS (although I havn't done this in ages, I assume you still can in XP) so in theory the normal DOS "print" command would pipe through Windows drivers and print handling to the printer of choice. So in general, there's probably zero need to use COM to print. One of these options should pipe the file through Windows which in turn, could possibly send it through the proper printing method. If not, you might be able to look in your registry and find the right-click "Print..." option and see if it's something you can execute from command line. Ok, I know this email's too long already, but I know someone's going to say "How do you do that?" So here's the 50 cent tour: 1. Pull up "regedit" 2. Search for the file extension ".pdf" 3. Make note of the "(Default)" value, in this case "AcroExch.Document" (I think this is specific to having the full Acrobat installed) 3. Below the area where all the file extensions are in HKEY_CLASSES_ROOT there are the actual named app section (that way, ".gif" and ".jpg" can both point to Photoshop.document" or something.. get it?) So search for "AcroExch.Document" in this case 4. Expand that tree and look for "shell". These are all the things that show up on your right-click menu. In this case, we have a "print"
[PHP-WIN] Re: [PHP] PDF printing under windows.
This is really dumb and overly simple, which is probably why it was missed/not brought up, but it just occurred to me that, assuming you have a browser-based interface to your app, why don't you just send the PDF to the browser for printing? Then it should use the Acrobat Reader plugin to open the app then just have the user (you?) click the print button? Or do you want it totally one-button click and that's it? Just a thought. -TG = = = Original message = = = Richard Lynch wrote: >On Mon, October 24, 2005 1:48 pm, Dave Lists wrote: > > >>I'm generating PDFs under windows using PDFlib and all is easy. What I >>am wondering though, and google reveals nothing usefull, can I print >>the >>PDF to a network printer from windows? I'm presuming to print the file >>I >>would ahve to use COM and open it under Acrobat? Anyone done this >>before >>and have any pointers? I'm printing out invoices and what to automate >>the task. >> >> > >If, for some weird reason, you want to allow the user (authenticated, >logged in, trusted) to print to a networked computer on the WEB >SERVER, then your best bet is probably to figure out how to print that >PDF from MS-DOS and then to use http://php.net/exec to print it, I >would guess... > > It's from a cli PHP install on a local machine :-) >You might be able to use PHP to open up a COM object to convince >Adobe/Windows/whatever to print... > > COM makes me want to cry ;-) At the moment I'm trying to convince OpenOffiice it wants to play with PHP and COM. I have tried to exec print on the windows box but that just hung. >If it was a Un*x server, you'd just send the document to lpr or CUPS >or something, and be done with it, probably in a half-hour of work, >even allowing for a protracted battle with file/exec permissions. > > > I'm not sure I could just fire a PDF at lpr, but no doubt it would be much easier under Unix :-) Dave. ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Cam control
There's probably libraries out there for dealing with serial and parallel operations with PHP and I'm sure someone will point one out. In the meantime and maybe as an addition to it, you might check out Winbinder (http://www.winbinder.com) it's a native Windows API interface for PHP that's just great! I looked through the sample files (WinBinder\Code\Samples after you download and decompress the package) and there's one for accessing serial ports. Looks like you could just change COM1 to LPT1 and do some tweaking to get it to do what you need. Here's the function in serial.phpw that opens the serial port: function open_serial($portname) { ~global $CreateFile; ~return wb_call_function($CreateFile, array( ~~$portname, ~~GENERIC_READ | GENERIC_WRITE, ~~0, ~~null, ~~OPEN_EXISTING, ~~0, ~~0 ~)); } $portname at this point is COM1 I believe. Good luck! -TG = = = Original message = = = I have a pan and tilt mechanism with an opto-isolated circuit board that connects to the LPT port. What I am trying to do is control it totally in PHP. Can anyone point me in the right direction for info on communicating directly with the LPT port? Or has someone done this already? ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] @mssql_connect() versus mssql_connect()
As mentioned, the @ suppresses any errors, warnings, notices, etc that the command will give. This is typically considered really bad programming practice. If you resort to using an @ to suppress, one of two things is an issue: 1. Either error reporting is set to high and you're getting warnings and notices when you don't want to... in which case you can just turn down the error reporting a bit. 2. Or there's an error and instead of trying to fix the error and program correctly, the programmer choses to just bury the error. Which isn't so good. The only time I've ever had to use @ to suppress an error was with an fgets() call that produced the following error: "Warning: fgets(): SSL: fatal protocol error in /var/www/secure/scriptname.php" I didn't save the link to the bug, but it's apparently a bug in PHP and the only solution I found was to suppress the error and everything works fine (despite the warning). -TG = = = Original message = = = The @ is for error suppression -Original Message- From: Alf Stockton [mailto:[EMAIL PROTECTED] Sent: Friday, October 13, 2006 12:00 AM To: php-windows Subject: [PHP-WIN] @mssql_connect() versus mssql_connect() What is the difference between @mssql_connect() and mssql_connect()? i.e. What is the relevance of the prefixed @? -- Regards, Alf Stockton~~www.stockton.co.za You may my glories and my state dispose, But not my griefs; still am I king of those. ~~-- William Shakespeare, "Richard II" My email disclaimer is available at www.stockton.co.za/disclaimer.html -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Problem with removable media
Styve, Here's a block of code I borrowed (see comment block) and use to scan active drives on a Windows PC. It uses the is_dir() which may still not work for you, but maybe it does it differently than you did. Also, I believe you can access Windows API functions that can return the status of a drive without throwing an error box. http://www.php.net/manual/en/ref.w32api.php (I think this is your best bet, just means diving into the Windows API and figuring out how to get the two to work together properly) Another thing to look at is maybe head over to http://www.winbinder.com and see if any of those guys have found a good way to do it, since not only is it PHP + Windows specific, but non-web browser based coding that deals directly with Windows API issues. And lastly, may be able to get info via COM interface with some other Windows apps, but I think this is a long shot and kind of sloppy: http://us2.php.net/com Let us know if you find a good solution. Good luck! -TG # # # The following code as found at: http://www.php.net/manual/en/ref.filesystem.php # Simple enough code, but m2pc saved me some typing so I'm giving credit here. Thanks for sharing your code! # # The only things I changed were some formatting and # # # m2pc (at) hotmail.com # 07-Oct-2004 12:18 # After searching all over the place to find a function to do what I wanted, I wrote the following: /* ** Returns an array of valid drives on the system (a:, b:, etc.) */ function getSystemDrives() { // Initialize $aResult = Array (); // Loop from A-Z and try opening the root dir for ($letter = 'A'; $letter <= 'Z'; $letter ++) { if (is_dir ($letter . ":")) $aResult [] = $letter . ":"; } // Return results return ($aResult); } # It simply returns an array of valid drives as seen from the server (A:, B:, etc.). This obviously is targeted to Win32 installations only. # = = = Original message = = = Hi folks, I have a PHP apps who let people listen to audio files. Those files are mainly store on the hard drive of the server. But the old ones are backed up on DVD and purged from the hard drive. I need to offer the possibility to listen to the files on the DVD. So, I have tried different things: I have added an alias in Apache configuration pointing to the DVD drive. The problem is that as Apache validate is configuration on start, if there is no disk in the drive, the service refuses to start. This implied that we ALWAYS had to have a disk in the drive in case of a server reboot. This solution was not retained after the test phase. One of the other things that I have tried is to add an entry in the PHP application configuration so we can configure the path to the DVD drive. With that approach, Apache is always able to start correctly. I can also listen to the files stores on the DVD. The problem comes when I try to access to file on the DVD drive and there is no disk in the drive. All the functions I have tried (file_exists(), is_dir(), etc.) make a message box to appear on the server (There is no disk in the drive, blabla... Abort, Retry, Ignore). This cause the session on the client to hangs (waiting for the message box on the server). I have not been able to suppress or prevent the message box to appear. Writing a restoration application, is out of scope (not enough time left on the project). Moving to PHP5 to have better error handling to. Have any of you had to work on accessing removable media? My server conf.: Windows 2000 server SP4 Apache 2.0.50 PHP 4.3.3 The DVD drive is DVD-RAM Best regards. Styve ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] php installed on IIS: changes to php.ini not taking affect
I had a similar issue a couple years ago when I was running Apache/PHP on a Windows box at a previous job. The information below helped. Check all the locations (regardless of what PHP is reporting it's using for php.ini's path). Try making some simple change that will show up on phpinfo(). You should find it eventually. Good luck! -TG http://www.php.net/manual/en/install.windows.php "php.ini is searched in these locations (in order): * SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD) * The PHPRC environment variable. Before PHP 5.2.0 this was checked after the registry key mentioned below. * HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location) * Current working directory (for CLI) * The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows) * Windows directory (C:\windows or C:\winnt) (for Windows), or --with-config-file-path compile time option" = = = Original message = = = I have php 5.2 up and running on IIS 5.1. phpinfo tells me php is looking for my ini file in C:\Windows...I place the file there, edit it, restart the server but I don't see the changes I've made. I've been dealing with this for a day and can't seem to find any information as to what's causing this problem. I've tried adding C:\PHP to my system path where C:\PHP is where php lives. I also have PHPRC pointing ot C:\PHP...not sure if either of those would have anything to do with my problem. Does anyone have any ideas? ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] php installed on IIS: changes to php.ini not taking affect
Could be a permissions issue with reading the new php.ini file you created. On this page, it tells you how to figure out what user your IIS is executing as: http://www.php.net/manual/en/install.windows.iis.php " 1. In IIS Admin, go to Application Pools 2. Right click on the pool your site is running under and click properties. 3. Go to the Identity tab and see what user is selected. 4. Give that user permissions to your php files/directory. " If all else fails and you want to see if it's a permissions thing, set permissions to "Everyone - Full Control" on your php.ini file. Bad security, but it should tell you if it's a permissions issue or not. -TG = = = Original message = = = okay...turns out there was something strange going on with my ini file. I copied its contents into a new file, saved that as "php.ini"...now whenever I drop that in either C:\Windows or C:\PHP php will not execute. If I move the file out of either of those two directories, it executes fine. Does this make any sense? [EMAIL PROTECTED] wrote: > I had a similar issue a couple years ago when I was running Apache/PHP on a > Windows box at a previous job. The information below helped. Check all the > locations (regardless of what PHP is reporting it's using for php.ini's > path). Try making some simple change that will show up on phpinfo(). You > should find it eventually. > > Good luck! > > -TG > > http://www.php.net/manual/en/install.windows.php > > "php.ini is searched in these locations (in order): > > * SAPI module specific location (PHPIniDir directive in Apache 2, -c command > line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH > environment variable in THTTPD) > * The PHPRC environment variable. Before PHP 5.2.0 this was checked after the > registry key mentioned below. > * HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location) > * Current working directory (for CLI) > * The web server's directory (for SAPI modules), or directory of PHP > (otherwise in Windows) > * Windows directory (C:\windows or C:\winnt) (for Windows), or > --with-config-file-path compile time option" > > = = = Original message = = = > > I have php 5.2 up and running on IIS 5.1. > > phpinfo tells me php is looking for my ini file in C:\Windows...I place > the file there, edit it, restart the server but I don't see the changes > I've made. > > I've been dealing with this for a day and can't seem to find any > information as to what's causing this problem. > > I've tried adding C:\PHP to my system path where C:\PHP is where php > lives. I also have PHPRC pointing ot C:\PHP...not sure if either of > those would have anything to do with my problem. > > > Does anyone have any ideas? ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] php installed on IIS: changes to php.ini not taking affect
Try checking out phpinfo() when it works and compare that to what's in your php.ini and look for the differences. Maybe some option or extension or something you're trying to run is exploding. Maybe print out the successful phpinfo() and your php.ini that's causing the trouble and go over both with a fine toothed comb. -TG = = = Original message = = = Thanks for the suggestion...I tried that...i didn't make a difference. Here's another thing I noticed. PHP seems to be using the default settings. When I drop a php.ini file in C:\Windows (where php is looking for my ini file) php fails execute. If I remove the ini file...the code executes fine. [EMAIL PROTECTED] wrote: > Could be a permissions issue with reading the new php.ini file you created. > > On this page, it tells you how to figure out what user your IIS is executing > as: > http://www.php.net/manual/en/install.windows.iis.php > > " > 1. In IIS Admin, go to Application Pools > 2. Right click on the pool your site is running under and click properties. > 3. Go to the Identity tab and see what user is selected. > 4. Give that user permissions to your php files/directory. > " > > If all else fails and you want to see if it's a permissions thing, set > permissions to "Everyone - Full Control" on your php.ini file. Bad security, > but it should tell you if it's a permissions issue or not. > > > -TG > > = = = Original message = = = > > okay...turns out there was something strange going on with my ini file. > I copied its contents into a new file, saved that as "php.ini"...now > whenever I drop that in either C:\Windows or C:\PHP php will not > execute. If I move the file out of either of those two directories, it > executes fine. > > Does this make any sense? > > > [EMAIL PROTECTED] wrote: >> I had a similar issue a couple years ago when I was running Apache/PHP on a >> Windows box at a previous job. The information below helped. Check all the >> locations (regardless of what PHP is reporting it's using for php.ini's >> path). Try making some simple change that will show up on phpinfo(). You >> should find it eventually. >> >> Good luck! >> >> -TG >> >> http://www.php.net/manual/en/install.windows.php >> >> "php.ini is searched in these locations (in order): >> >> * SAPI module specific location (PHPIniDir directive in Apache 2, -c command >> line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH >> environment variable in THTTPD) >> * The PHPRC environment variable. Before PHP 5.2.0 this was checked after >> the registry key mentioned below. >> * HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location) >> * Current working directory (for CLI) >> * The web server's directory (for SAPI modules), or directory of PHP >> (otherwise in Windows) >> * Windows directory (C:\windows or C:\winnt) (for Windows), or >> --with-config-file-path compile time option" >> >> = = = Original message = = = >> >> I have php 5.2 up and running on IIS 5.1. >> >> phpinfo tells me php is looking for my ini file in C:\Windows...I place >> the file there, edit it, restart the server but I don't see the changes >> I've made. >> >> I've been dealing with this for a day and can't seem to find any >> information as to what's causing this problem. >> >> I've tried adding C:\PHP to my system path where C:\PHP is where php >> lives. I also have PHPRC pointing ot C:\PHP...not sure if either of >> those would have anything to do with my problem. >> >> >> Does anyone have any ideas? ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Fw: COM surgery
There's thousands of things you can access via COM. Windows uses it extensively. Every application in Microsoft Office uses COM. I've used COM between Excel and MapPoint to generate maps (and yeah, I created a PHP script to access MapPoint directly.. but it was just easier to do it via Excel). Check out some of the examples in the PHP documentation: http://www.php.net/manual/en/ref.com.php Also, if you want to mess around with COM, try loading up MS Word or Excel (I like Excel myself since you can use the cells to output your data and keep it somewhat straight for debugging and general display). Also, MS Office apps have a fairly nice debugger that is aware of the COM references you've set up so it will autocomplete methods and properties as you type (even give you lists). I found it easier to sketch out what I needed in there first, then work on translating it to PHP. Another tip... you won't just be dealing with methods (actions, 'verbs') and properties (adjectives) but also objects will be returned (of various types) and collections (of objects). Here's an example from mappoint: # Connect to MapPoint and define some objects $comobjMapPoint = new COM("mappoint.application") or die("Unable to instantiate mappoint"); $comobjMapPoint -> Activate(); $comobjMapPoint -> Visible = FALSE; $mapobjActiveMap = $comobjMapPoint -> ActiveMap(); $routeobjActiveRoute = $mapobjActiveMap -> ActiveRoute(); Also.. you might find it helpful to search for the application you're trying to connect to and the key words "object model", at least in the Microsoft world. Despite MS being kinda dumb sometimes, the Excel and MapPoint object models online are actually really well documented. http://msdn2.microsoft.com/en-us/library/wss56bz7(vs.80).aspx http://msdn2.microsoft.com/en-us/library/aa723478.aspx Hopefully that'll give you a good headstart. But if your quest was "what applications can I connect to via COM", the answer is going to be too long to list.. You should figure out what you WANT to connect to and see if it supports COM. Lots of stuff does. Good luck! -TG = = = Original message = = = - Original Message - From: "gunawan" <[EMAIL PROTECTED]> To: Sent: Tuesday, January 16, 2007 11:57 AM Subject: COM surgery > i read the com and interested using in my program.. > but the help (php manual chm) don't give what i need > example : > $word = new COM("word.application") or die("Unable to instantiate Word"); > echo "Loaded Word, version $word->Version\n"; > > metods: > $obj = new COM("Application.ID"); > what i want to build nextt is not a main problem right now, what i want to > ask was about how many Aplication.id able to receive by this com > i have only: > 1. word.application > 2. ADODB.Connection > 3. excel.application > are there any application.id ?? > > ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Fw: COM surgery
Ok, I see two main questions/problems.. 1. An example of COM with Excel 2. How do you use COM with Word to set font size 20 and centered text? Keep in mind that there may be better ways to solve the problems you have, but for the time being we'll use this as an excuse to play with COM. #1 - There are at least 6 examples of using COM with Excel on php.net, so check there first. Address: http://us2.php.net/manual/en/ref.com.php Authors: a dot kulikov at pool4tool dot com 13-Mar-2006 09:36 bruce at yourweb dot com dot au 23-Apr-2005 05:47 Jack dot CHLiang at gmail dot com 10-Apr-2005 10:02 markshane1 at fuse dot net 10-May-2004 04:41 dwt at myrealbox dot com 27-Aug-2002 03:31 madon at cma-it dot com 07-Mar-2002 12:59 #2. Again, check the page above and look for these authors: pelegk2 at walla DOT co DOT il 13-Feb-2005 08:49 Shawn Coppock 11-Aug-2004 01:15 angelo [at] mandato com 03-Jun-2004 11:37 #no author name# 03-Oct-2003 12:55 php at dictim dot com 06-Sep-2003 01:17 admin at purplerain dot org 19-Apr-2002 04:34 Since you had a specific question about Word, let's see if we can give a quick example. Starting with Shawn Coppock's example, because he already has the font size done, we just need to figure out how to do centering. The easiest way to do this is to figure out how to do it in Word VBA (Visual Basic for Applications) then figure out the equivalent PHP. The built in VBA editor for MS Office apps is actually really good for learning on. Hit ALT-F11 to pull up the VBA editor, then right click on the tree on the left and do "INSERT MODULE". Here's what I got in VBA: Sub main() Selection.Font.Size = 20 Selection.TypeText ("test") Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter End Sub Took a minute to find the proper way to do 'center', but apparently it's a paragraph property. Now using the PHP example... Version}\n"; // TG: Changed this to 1 so you can see what's going on $word->Visible = 1; $word->Documents->Add(); $word->Selection->Font->Size = 20; $word->Selection->TypeText("$content"); $word->Selection->ParagraphFormat->Alignment = wdAlignParagraphCenter; $word->quit(); echo "done"; ?> Notice that I defined "wdAlignParagraphCenter". Because in the VBA example, we just did "= wdAlignParagraphCenter". This is a constant pre-defined inside Word. Easiest way to figure out what the actual value is, is to do: Selection.TypeText (wdAlignParagraphCenter) This outputs "1".. therefore, defining PHP constant of the same name to be "1". Sorry, don't have time to test this, but it should be close to correct. One note about COM stuff in general. After you run your script a few things, check your process list and make sure the application isn't still running in the background. I forget exactly what it was, but if you don't close your COM application properly, it'll stay running and take up valuable system memory. $word->close(); // Only closes the document and not the app? $word->quit(); // Quits and closes application? The only other tip I can give you is that in Excel, there are two ways of referring to cells. One like "A1" (column A, row 1) and one is "1,1" (column 1, row 1). I never found a way to use "A1" type notation via PHP. You may be able to, but by default you're probably going to have to use "1,1" type notation. This should be more than enough to get you going. Check out the other examples, learn how to write VBA code inside Word and Excel then translate it to PHP. Check out the lists of objects, properties, methods and collections on Microsoft.com listed under Word Object Model and Excel Object Model. It will take a lot of trial and error before you get things right, probably. But most of it's not too difficult if you get the basics down. -TG = = = Original message = = = - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, January 17, 2007 12:04 AM Subject: Re: [PHP-WIN] Fw: COM surgery > There's thousands of things you can access via COM. Windows uses it extensively. Every application in Microsoft Office uses COM. I've used COM between Excel and MapPoint to generate maps (and yeah, I created a PHP script to access MapPoint directly.. but it was just easier to do it via Excel). > > Check out some of the examples in the PHP documentation: > > http://www.php.net/manual/en/ref.com.php > > > Also, if you want to mess around with COM, try loading up MS Word or Excel (I like Excel myself since you can use the cells to output your data and keep it somewhat straight for debugging and general display). > > Also, MS Office apps have a fairly nice debugger that is aware of the COM references you've set up so i
Re: [PHP-WIN] PHP generated Excel Spreadsheets
I don't see why you'd have compatibility issues with Excel 2007. In theory, Excel_Writer (which we've used where I work but it's been a while since I've messed with it) creates either 97 or 2000 style Excel spreadsheets, which should be importable into Excel 2007 with no problem. I've used the other methods mentioned too and all work well if you have people downloading the excel file or viewing in excel via web page. If you need to create an XLS file without downloading via a browser, then you're better off trying to get Excel Writer to work, even though it's capabilities are kind of limited. Some people may mention COM, but that's kind of an ugly solution. You'd need Excel installed on the machine you had PHP running on and you gotta be really sure you close Excel properly when you're done using it. If I recall, there's a "close" function that only closes the worksheet. You need to do like Application.Exit or maybe it was Quit or something to get it to actally close the Excel application. Otherwise, you'll get a copy of Excel running for each time the script is run (server crash anyone?) Outputting to CSV or HTML with an Excel header, as demonstrated already, are good quick and dirty solutions. Or you can create a page that's an HTML table and use Excel's "Import -> Web Query" function to pull the table when you open the pre-made Excel spreadsheet and auto-refresh the data from the Web Query. Good luck however you decide to do it. -TG = = = Original message = = = Using PEAR :: Spreadsheet_Excel_Writer I am having compatibility issues with Excel 2007. Has anyone else experienced issues and got solutions? Dale Attree PHP Developer Jacklin Enterprises tel: +27 11 265 4282 mobile: +27 83 407 2911 fax: +27 11 314 2984 *** The information contained in this e-mail is confidential and may be subject to legal privilege. Access to this e-mail by anyone other than the intended recipient is unauthorised. If you are not the intended recipient you must not use, copy, distribute or disclose the e-mail or any part of its contents or take any action in reliance on it. If you have received this e-mail in error, please notify us immediately by e-mail ([EMAIL PROTECTED]) or telephone (+27 11 265 4200). This message is free of all known viruses. It has been screened for viruses by Blockmail. *** ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Query Syntax - WHERE fieldname1='fieldvalue1'ANDfieldname2='fieldvalue2'
Couple of things.. I'm not sure (and too lazy to look it up) if something like "category" is a reserved word, but you can try enclosing your field/table names in backticks (? whatever they're called.. the single quote looking character on the tilde) SELECT * FROM `classifieds` WHERE `trans_type` = 'For Sale' AND `category` ='Boats' or... $query = "SELECT `$field_name` FROM `classifieds` WHERE `$field_name1` = '$field_value1' AND `$field_name2` ='$field_value2'"; Making sure your variables always have values. As mentioned, echoing out your $query to see what it translates to can be very useful. Last thing is to make sure your variables don't contain characters that, unescaped, can screw up your query. Stuff like apostrophes and such. Best way to do this, and ensure some level of security, is to use mysql_real_escape_string(). I don't usually use variables for my field and table names, but I'm guessing you can use this function (and that it's recommended to do so anytime you use a variable in your SQL) for those as well as values. $field_name = mysql_real_escape_string($field_name); $field_name1 = mysql_real_escape_string($field_name1); $field_value1 = mysql_real_escape_string($field_value1); $field_name2 = mysql_real_escape_string($field_name2); $field_value2 = mysql_real_escape_string($field_value2); $query = "SELECT `$field_name` FROM `classifieds` WHERE `$field_name1` = '$field_value1' AND `$field_name2` ='$field_value2'"; Or do it inline or write a function wrapper to make it easier to read or however you want to do it. Operation precedence shouldn't be an issue. I usually run into that when dealing with an "OR" situation as well as "AND"s. Since you have a really basic AND-only situation, you shouldn't have to worry about parens. Maybe that'll help a little. If not, write back with some of your echo'd SQL $query stuff. -TG = = = Original message = = = This did not work. But thank you for trying. Warning: mysql_query() [http://www.mysql.com/doc]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM classifieds WHERE (trans_type = 'For Sale') AND (trans_type ='For Sale')' at line 1 in C:\apache2triad\htdocs\sunlakes\test3.php on line 82 ""Luis Moreira (ESI-GSQP)"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I think you have an "operator\precedence" issue. Try $query = "SELECT $field_name FROM classifieds WHERE ($field_name1 = '$field_value1') AND ($field_name2 ='$field_value2') "; This will stop you from eventually ANDing the wrong pair... -Original Message- From: Mark Abrams [mailto:[EMAIL PROTECTED] Sent: ter~a-feira, 22 de Maio de 2007 16:07 To: php-windows@lists.php.net Subject: [PHP-WIN] Query Syntax - WHERE fieldname1='fieldvalue1' ANDfieldname2='fieldvalue2' Query Syntax - I have a syntax error when I am using an AND in the WHERE clause for a double field=value restriction #1 RUNS OK $query = "SELECT $field_name FROM classifieds WHERE $field_name = '$field_value'"; $result = mysql_query($query) or die(mysql_error()); #2 FAILS $query = "SELECT $field_name FROM classifieds WHERE $field_name1 = '$field_value1' AND $field_name2 ='$field_value2'"; $result = mysql_query($query) or die(mysql_error()); dies with the following message: Warning: mysql_query() [http://www.mysql.com/doc]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM classifieds WHERE trans_type = 'For Sale' AND category ='Boats'' at line 1 in C:\apache2triad\htdocs\ Background: I call a function and pass a $field_name = $field_value pair. This works OK. When I add a second field_name = $field_value pair the query dies. Data excerpt from TABLE classifieds: trans_type = Free category = Books Also, Can anyone recommend a good book on mySQL / php? I could not find a good example of my problem in the online manual http://www.mysql.com/doc. TIA Mark -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-WIN] Query Syntax - WHERE fieldname1='fieldvalue1'ANDfieldname2='fieldvalue2'
`` shouldn't react the same as ''. If it does though, maybe try using them but putting your variables outside the quotes: $query = "SELECT `" . $field_name . "` FROM `classifieds` WHERE `" . $field_name1 ."` = '" . $field_value1 . "' AND `" . $field_name2 . "` ='" . $field_value2 . "'"; And check what the other poster said about the "SELECT FROM" with no value for $field_name. This is going to be something really simple and basic. -TG = = = Original message = = = Thanks - but it doesn't work `` interprets the literal value $field_name as the column name and not its contents "trans_type". Warning: mysql_query() [http://www.mysql.com/doc]: Unknown column '' in 'field list' in C:\apache2triad\htdocs\sunlakes\test3.php on line 83 Unknown column '' in 'field list' -Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 10:57 AM To: php-windows@lists.php.net Cc: [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Query Syntax - WHERE fieldname1='fieldvalue1'ANDfieldname2='fieldvalue2' Couple of things.. I'm not sure (and too lazy to look it up) if something like "category" is a reserved word, but you can try enclosing your field/table names in backticks (? whatever they're called.. the single quote looking character on the tilde) SELECT * FROM `classifieds` WHERE `trans_type` = 'For Sale' AND `category` ='Boats' or... $query = "SELECT `$field_name` FROM `classifieds` WHERE `$field_name1` = '$field_value1' AND `$field_name2` ='$field_value2'"; Making sure your variables always have values. As mentioned, echoing out your $query to see what it translates to can be very useful. Last thing is to make sure your variables don't contain characters that, unescaped, can screw up your query. Stuff like apostrophes and such. Best way to do this, and ensure some level of security, is to use mysql_real_escape_string(). I don't usually use variables for my field and table names, but I'm guessing you can use this function (and that it's recommended to do so anytime you use a variable in your SQL) for those as well as values. $field_name = mysql_real_escape_string($field_name); $field_name1 = mysql_real_escape_string($field_name1); $field_value1 = mysql_real_escape_string($field_value1); $field_name2 = mysql_real_escape_string($field_name2); $field_value2 = mysql_real_escape_string($field_value2); $query = "SELECT `$field_name` FROM `classifieds` WHERE `$field_name1` = '$field_value1' AND `$field_name2` ='$field_value2'"; Or do it inline or write a function wrapper to make it easier to read or however you want to do it. Operation precedence shouldn't be an issue. I usually run into that when dealing with an "OR" situation as well as "AND"s. Since you have a really basic AND-only situation, you shouldn't have to worry about parens. Maybe that'll help a little. If not, write back with some of your echo'd SQL $query stuff. -TG ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] photo gallery plugin
Gallery2 and Coppermine are two big PHP photo gallery apps. http://gallery.menalto.com/ http://coppermine-gallery.net/index.php = = = Original message = = = Does anyone have a recommendation on a photo gallery plug in that works with php and mySQL. I have a car club and want to allow members to load their cars pics and specs to the site. TAI Mark -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] ORDER BY is not sorting
I can't really see anything wrong with what you have there. It shouldn't matter that your SQL is inside the query function, although I like to build the query in a variable outside the query function, but either way it should work. And you're obviously getting data and not an error, right? What happens if you leave the "DESC" off? Does it come back 4, 3, 2, 1? or still 1, 2, 3, 4? You might try displaying more data from the result set to see if there's some other issue. And have you tested the SQL statement just using MySQL via command line, phpMyAdmin, WinSQL, Navicat, or something like that? -TG = = = Original message = = = Sorry, this seams very trivial but I can not sort the result set for any field. What am I doing wrong? php & mySQL 5 ' ?> 1 2 3 4 TIA Mark -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] ORDER BY is not sorting
Spaces would affect sorting if the spaces appeared in the actual rowID data. If rowID is stored as text of some kind, then yeah, maybe he'd have an issue. But I have a feeling you're talking about the code itself and whether to put the quer into a variable or not (rebuting what I said). Here's his code: > $table_name ='users'; > $result = mysql_query("SELECT * FROM $table_name ORDER BY rowID DESC"); Code looks fine. $table_name gets substituted for it's value, 'users'. There are no extra spaces in the variable data. Even if there was, that's fine. If it were something like this, he'd have a problem: > $result = mysql_query("SELECT * FROM ` $table_name` ORDER BY rowID DESC"); Then it would look for a table named users. Which probably doesn't exist. Also.. that doesn't relate to the sorting issue since sorting is on 'rowID' within that table, which isn't defined in a variable, but stated explicitly in the query. So not sure what you're saying about spaces messing things up. -TG = = = Original message = = = Well, if you have blank spaces on the field's beginning it won't sort correctly, it will put the blank spaces on the last results on that case. On 7/31/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I can't really see anything wrong with what you have there. It shouldn't > matter that your SQL is inside the query function, although I like to build > the query in a variable outside the query function, but either way it should > work. > > And you're obviously getting data and not an error, right? > > What happens if you leave the "DESC" off? Does it come back 4, 3, 2, > 1? or still 1, 2, 3, 4? > > You might try displaying more data from the result set to see if there's > some other issue. > > And have you tested the SQL statement just using MySQL via command line, > phpMyAdmin, WinSQL, Navicat, or something like that? > > -TG > > = = = Original message = = = > > Sorry, this seams very trivial but I can not sort the result set for any > field. What am I doing wrong? > > > php & mySQL 5 > > > > ... > >$table_name ='users'; > > // Select records > $result = mysql_query("SELECT * FROM $table_name ORDER BY rowID > DESC"); > > > // Loop through the record set > while($row = mysql_fetch_array($result)) > print 'rowID =' .$row['rowID']. '' > > > ?> > > 1 > 2 > 3 > 4 > > > TIA > Mark > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > ___ > Sent by ePrompter, the premier email notification software. > Free download at http://www.ePrompter.com. > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Bruno Policarpo [EMAIL PROTECTED] MSN [EMAIL PROTECTED] ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] Array Question
I assume you're getting fields with the same name from pulling data from two or more tables. Something like "SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.id = TABLE2.id" or something like that. At any rate, if you can.. it's always good to name the fields you want to pull instead of using "SELECT *". I know it's a pain sometimes, but in this case it may be somewhat necessary. What you can do is use an alias for the duplicate field name. Something like this: "SELECT TABLE1.id as id1, TABLE2.id as id2 FROM" Then in your array, it'll be $mydata['id1'] and $mydata['id2'] Works the same with a single table pull and I usually alias the table names too: SELECT t1.id id1, t2.id id2 FROM TABLE1 t1, TABLE2 t2 WHERE t1.id = t2.id (can't remember if you can use the alias in the WHERE to make it "id1 = id2" or not) The "as" is usually optional, but sometimes nice to keep things clear. In some flavors of SQL it's required. -TG = = = Original message = = = I have pull a bunch of data from an SQL database through a query. The problem I am running into is I pull two fields with the exact same name. How do I grab the right info? I have been using mydata ~ the array name. mydata['contactID'] Should I instead use the array value so mydata[8]? ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] array problem??
\n"); } ?> I suppose it should be display ~~ a b c ~~ but it doesn't work, pls help. the emtpy page was displayed. -- 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]