[PHP] database problem?
hi all! i have the following problem: 1.im loading 5 colums from a mysql-table into an array: $threads = db_query("SELECT title, date, body, poster, board_posts_ID FROM board_posts WHERE msgkind = 'thr' ORDER BY date DESC"); everything fine so far... 2.im trying to list them line by line: while (list ($title, $date, $body, $poster, $msgID) = mysql_fetch_array($threads)){ print (" \n". " $title\n". " $poster\n". " $date\n". " \n"); } here is the problem: there's always one line(row) missing (i.e. if there are 17 rows in the db, 16 are being displayed in the browser).i've tried the same code with mysql_fetch_row()...no difference in the outcome. please reply to this msg if you can help, thx in advance, Chris -- PHP General 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] Mercantec Payment Module
Has anyone here worked with the Mercantec Merchant Account? If so, do you have (or know where I can get) a payment module? Or, information on how I can process cards myself? I'm looking for something like AuthorizeNet offers. Please help. -john __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- -- PHP General 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-general Digest 2 Dec 2001 09:38:07 -0000 Issue 1028
php-general Digest 2 Dec 2001 09:38:07 - Issue 1028 Topics (messages 76323 through 76340): Re: Getting the filesize of an image? 76323 by: faeton 76324 by: Matt McClanahan 76325 by: faeton SAPI 76326 by: Obasi Adande George 76331 by: Fred Cause of:`T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' 76327 by: Jason G. 76332 by: Fred how to get multiple checkbox values in a results page? 76328 by: Ivan Carey 76329 by: Philip Hallstrom Re: Strange problem... 76330 by: Edgardo Rossetto Updating parts of files without rewriting them 76333 by: Jeff Lewis 76334 by: Fred Re: Testing Alert: Significant changes to DOM-XML 76335 by: Markus Fischer Few quick questions on php 4.1 76336 by: Joelmon2001.aol.com HTTP_SESSION_VARS != Work 76337 by: Andrew Forgue 76338 by: Fred database problem? 76339 by: christian.donhofer.chello.at Mercantec Payment Module 76340 by: John Monfort Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Hello Matt, Of course it does not, but as i've already said file() with strlen() can be used. :) MM> If you want the size of a remote file, you'll have to download it; HTTP MM> doesn't provide a way to query a remote file's size. FTP does, if you have MM> FTP access. Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com --- End Message --- --- Begin Message --- On Sat, Dec 01, 2001 at 11:05:51PM +0200, faeton wrote: > Hello Matt, > > Of course it does not, but as i've already said file() with strlen() > can be used. :) > > MM> If you want the size of a remote file, you'll have to download it; HTTP > MM> doesn't provide a way to query a remote file's size. FTP does, if you have > MM> FTP access. Not on binary files. For an image that's 4494 bytes, file/join/strlen gives me 3512. And since file() on a remote file is downloading it anyway, you might as well do it right: $fp = fopen('http://example.com/image.jpg','r'); while (!feof($fp)) $image .= fread($fp,1024); echo strlen($image); Matt --- End Message --- --- Begin Message --- Hello Matt, So does that problem have a solution? MM> Not on binary files. For an image that's 4494 bytes, file/join/strlen gives MM> me 3512. And since file() on a remote file is downloading it anyway, you MM> might as well do it right: MM> $fp = fopen('http://example.com/image.jpg','r'); MM> while (!feof($fp)) MM> $image .= fread($fp,1024); MM> echo strlen($image); MM> Matt Ivan 'Faeton aka xetrix' Danishevsky ICQ(240266) [EMAIL PROTECTED] www.xemichat.com --- End Message --- --- Begin Message --- I have been trying to get apache2 to load the php4 module for a while now, but after consulting the bug report page, i was directed to seek assistance from you all. Is there any further files I may need to have this program p and running. Thank You For Your Assistance in this matter Obasi Adande George --- End Message --- --- Begin Message --- What is not working? Are you getting an error message? Fred Obasi Adande George <[EMAIL PROTECTED]> wrote in message 000801c17ab6$5d77bf90$b6d45ed1@tbird">news:000801c17ab6$5d77bf90$b6d45ed1@tbird... I have been trying to get apache2 to load the php4 module for a while now, but after consulting the bug report page, i was directed to seek assistance from you all. Is there any further files I may need to have this program p and running. Thank You For Your Assistance in this matter Obasi Adande George --- End Message --- --- Begin Message --- Hello all, I have ran across this error a number of times, and for those of you who are or will pulling out your hair, read on. When you get a: Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in your_script.php on line 2149 Check to see if you have all of you { and } intact. The error could be thousands of lines away, but the error message may point to the end of your file. I notice this behavior when I am working on class definitions and forget to open close a block (switch, for, while) in a method in the class somewhere. Hope it helps someone. -Jason Garber IonZoft.com --- End Message --- --- Begin Message --- A couple of more pointers: Check the line right before the parse error for missing }) or ; Always close your curley braces right after you open them and then insert your code lines between the braces. {} This will prevent you from forgetting to close your braces. Never write a single script with 2149 lines of code ;) Fred Jason G. <[EMAIL PROTECTED]> wrote in
[PHP] Re: PHP and JAVA
In <00f501c17b22$dd26da20$0600a8c0@shaemeli>, Steve Haemelinck wrote: > Hi all > > Does anyone got any experience with JAVA in PHP? I tried to rebuild php > with java support. Everything worked well but when I try to initiate > Java in PHP, I get cannot instantiate Virtual machine. I use kaffe and I > believe I have configured PHP correctly. > > See http://www.haemelinck.be:8080/phpinfo.phtml > > look at http://php.chregu.tv/java-debian.html maybe this gives you a hint what you could have missed. chregu -- PHP General 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] best way to handle a form with 60 fields !!!
What is the best way to handle a form with 60 fields ? Is it a maximum number of var that i can regisister in a session ? is it possible to configure this number in php.ini ? I dont'host my web site I use a hoste company where my site is hosted on an linux/apache server with php4. Is it a good idea to register the 60 vars in my session and then to insert them into a databes or is it better to insert only somme of them and make a link to a file where i store all the others fields ? What pissed me off most is to declare and handle so many vars. It' s a form for a congress registration and users have to enter a lot of information. I hope that some kind php master will give me some good tip to speed up my dev. time Thanks and Peace
Re: [PHP] PHP 4.1 out?
On Thu, 29 Nov 2001 15:37:09 -0600 impersonator of [EMAIL PROTECTED] (Mark Charette) planted &I saw in php.general: > >> -Original Message- >> From: ~~~i LeoNid~~ [mailto:[EMAIL PROTECTED]] > >> It could be stated on the site, or (and) tar could be re-moved. As far as >> I am concerned, as soon as something is placed on the web, you have no >> control over reference to it.. And access you can regulate of c0urse:) > >Or you could remember that picking up unannounced software from _any_ site >is generally a very bad idea ... you may get a lot more than you bargained >for ... > As if viruses/spyware can not be inserted in announced software, as well.. even in additions to original developers bugs/eggs btw:). Of course you have more rights to complain with announced ones, and this IS (theoretically atleast:) important. Not exactly about this case, but I received (not downloaded by myself:) the other day, an unsolicited e-mail with a virus, from (and via) my ISP based address, which I am going to report. In the described case though, the site for download packages is widely known. Its not for one time release, but for subsequent versions. Besides, warning is in most cases included _inside_ the package's license, that no-body is responsible for damage, use it 4 your own risk, etc, etc.. Anyway, I am not encouraging dounloading to quick, but just am stating that forbidding refference to something already placed on the WEB - is absurd. >Mark C. > L. S. made DS:) -- PHP General 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] Re: best way to handle a form with 60 fields !!!
First, if your goal is to enter the form information into a database, there is no need to ever register the form data as session variables. Simply insert the data into the database from the form and if you need some or all of the data on other pages pull it back out of the database. Second, it is never quicker or more efficient to store data in a file than a database. Third, it is ineffecient and unneccessary to put 60 fields in a single form. If you are using the GET method it probably will not work since it passes the variable names and values in the URL, which has a maximum length of 255 characters. 52 of your fields could be one character long (A,a,B,b...) and the remaining 8 would need to be two characters (aa,bb...), which takes up 68 characters. Then there are 60 &'s and 60 ='s which brings your total to 188 characters. Even if your data was all sinlge characters your total will now be 248 characters, leaving only 7 characters for your domain name, path and script name. You could, of course, use the POST method, but I would still not recommend this simbly because it is a nightmare for both the user entering the data and the person writing the script. Break the form up into smaller pieces along logical boundaries. For example, submit contact information first and then move on to a form which submits qualification information and so on. Third, your database should probably not consist of a single table with 60 fields. There is rarely an occasion where it is necessary or desirable to have a 60 field table. Break your tables up into logic groups along the same lines as your forms. You could have, for example, a table for contact information and a table for qualification information. Each table would contain a unique id field that related to the other tables. Find a tutorial on the web about database normalization to learn how to best design your databases. This should be the first step in the application design process and all other work should be based on it. Good luck and happy PHPing. Fred Masudi Olivier <[EMAIL PROTECTED]> wrote in message 004e01c17b29$db1756e0$[EMAIL PROTECTED]">news:004e01c17b29$db1756e0$[EMAIL PROTECTED]... What is the best way to handle a form with 60 fields ? Is it a maximum number of var that i can regisister in a session ? is it possible to configure this number in php.ini ? I dont'host my web site I use a hoste company where my site is hosted on an linux/apache server with php4. Is it a good idea to register the 60 vars in my session and then to insert them into a databes or is it better to insert only somme of them and make a link to a file where i store all the others fields ? What pissed me off most is to declare and handle so many vars. It' s a form for a congress registration and users have to enter a lot of information. I hope that some kind php master will give me some good tip to speed up my dev. time Thanks and Peace -- PHP General 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] How to set file extension php Mac OSX and PHP 4.0.6
I have successfully installed PHP 4.0.6, and it works! Only problem is that Apache only sends files to the PHP module that have a .php extension. However, I need to name the files .php4 (long story). As it stands, all I see is the actual PHP source, not the output. Does anyone know how I can change Apache and/or the PHP module to recognize .php4 files and execute them as such? Thanks. ...Rene -- PHP General 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] PHP Bulletin Boards...how they work.
I'm using Windows 98 with Apache, mysql and PHP. I'm in the process of learning PHP and would like to find a few tutorials on PHP/mysql bulletin boards. I know that there are a few that you can download but I am trying to find a tutorial that will let me anylaze the syntax and logic of the code so that I can understand and breakdown the steps in how a BB program works. Any URL's will be helpful. Thanking all in advance. Tony Ritter -- PHP General 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] PHP Bulletin Boards...how they work.
What did a search of Google "bulletin board tutorial php" turn up? Then grab some source and analyze it. Miles Thompson At 03:53 PM 12/2/2001 -0600, Anthony Ritter wrote: >I'm using Windows 98 with Apache, mysql and PHP. > >I'm in the process of learning PHP and would like to find a few tutorials on >PHP/mysql bulletin boards. > >I know that there are a few that you can download but I am trying to find a >tutorial that will let me anylaze the syntax and logic of the code so that I >can understand and breakdown the steps in how a BB program works. > >Any URL's will be helpful. > >Thanking all in advance. >Tony Ritter > > > > > >-- >PHP General 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 General 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] PHP Bulletin Boards...how they work.
A search of Google came up with more than a few PHP/mysql bulletin boards. I'd like to get one or two basic PHP/mysql BB's which a few users on this NG like so that I can try to analyze the code. TR -- PHP General 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] Re: PHP Bulletin Boards...how they work.
If you are new to PHP and/or MySQL then you are asking more than you think. It is much more difficult for a newbie to "analyze" someone else's code than it is to learn from scratch. Do yourself a favor and read the PHP and MySQL manual several time. Start by writing simple scripts to enter and extract database info and display it on the page. In the process of learning, you can come to this list and ask questions that you cannot find answers to in the manuals or list archives. It will be much less frustrating for you and those on this list if you take this approach. Although bulletin boards are not the most complex of applications, they require a knowledge of many many PHP and MySQL basics. Take the time to learn those basics before trying to swallow the whole thing. Good luck. Fred Anthony Ritter <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm using Windows 98 with Apache, mysql and PHP. > > I'm in the process of learning PHP and would like to find a few tutorials on > PHP/mysql bulletin boards. > > I know that there are a few that you can download but I am trying to find a > tutorial that will let me anylaze the syntax and logic of the code so that I > can understand and breakdown the steps in how a BB program works. > > Any URL's will be helpful. > > Thanking all in advance. > Tony Ritter > > > > -- PHP General 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] How to set file extension php Mac OSX and PHP 4.0.6
OK, that makes sense--that's what I did under WinME. The only problem is that I can't seem to find the httpd.conf file anywhere. At least, Sherlock is not returning any results. Do you know which directory httpd.conf is in? ...Rene On Sunday, December 2, 2001, at 01:56 PM, Michael B. Weiner wrote: > modify the apache configuration file (i.e. httpd.conf) and add it as > and AddType, as in the following: > > AddType application/x-httpd-php .php4 .php3 .phtml .php > AddType application/x-httpd-php-source .phps > HTH > -- > > René Fournier wrote: > >> I have successfully installed PHP 4.0.6, and it works! Only problem is >> that Apache only sends files to the PHP module that have a .php >> extension. However, I need to name the files .php4 (long story). As it >> stands, all I see is the actual PHP source, not the output. >> >> Does anyone know how I can change Apache and/or the PHP module to >> recognize .php4 files and execute them as such? >> >> Thanks. >> >> ...Rene >> >> > > -- Michael B. Weiner, Linux+, Linux+ SME > Systems Administrator/Partner > The UserFriendly Network (UFN) > -- > Linux Registered User #94900 Have you been counted? > http://counter.li.org > > PGP: 30 1D CC BA 30 30 63 35 CD 58 E0 89 A9 17 CC C0 8C 55 F7 72 > > .Escape the 'Gates' of Hell > `:::' ... .. > ::: * `::.::' > ::: .:: .:.::. .:: .:: `::. :' > ::: :: :: :: :: :::::. > ::: .::. .:: ::. `. .:' ::. > ...:::.::' ... > -- > > > > > --- René Fournier [EMAIL PROTECTED] -- PHP General 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-general Digest 2 Dec 2001 21:50:56 -0000 Issue 1029
php-general Digest 2 Dec 2001 21:50:56 - Issue 1029 Topics (messages 76341 through 76351): PHP and JAVA 76341 by: Steve Haemelinck 76342 by: Christian Stocker best way to handle a form with 60 fields !!! 76343 by: Masudi Olivier 76345 by: Fred Re: PHP 4.1 out? 76344 by: ~~~i LeoNid ~~ How to set file extension php Mac OSX and PHP 4.0.6 76346 by: René Fournier 76351 by: René Fournier PHP Bulletin Boards...how they work. 76347 by: Anthony Ritter 76348 by: Miles Thompson 76349 by: Anthony Ritter 76350 by: Fred Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Hi all Does anyone got any experience with JAVA in PHP? I tried to rebuild php with java support. Everything worked well but when I try to initiate Java in PHP, I get cannot instantiate Virtual machine. I use kaffe and I believe I have configured PHP correctly. See http://www.haemelinck.be:8080/phpinfo.phtml Thx --- End Message --- --- Begin Message --- In <00f501c17b22$dd26da20$0600a8c0@shaemeli>, Steve Haemelinck wrote: > Hi all > > Does anyone got any experience with JAVA in PHP? I tried to rebuild php > with java support. Everything worked well but when I try to initiate > Java in PHP, I get cannot instantiate Virtual machine. I use kaffe and I > believe I have configured PHP correctly. > > See http://www.haemelinck.be:8080/phpinfo.phtml > > look at http://php.chregu.tv/java-debian.html maybe this gives you a hint what you could have missed. chregu --- End Message --- --- Begin Message --- What is the best way to handle a form with 60 fields ? Is it a maximum number of var that i can regisister in a session ? is it possible to configure this number in php.ini ? I dont'host my web site I use a hoste company where my site is hosted on an linux/apache server with php4. Is it a good idea to register the 60 vars in my session and then to insert them into a databes or is it better to insert only somme of them and make a link to a file where i store all the others fields ? What pissed me off most is to declare and handle so many vars. It' s a form for a congress registration and users have to enter a lot of information. I hope that some kind php master will give me some good tip to speed up my dev. time Thanks and Peace --- End Message --- --- Begin Message --- First, if your goal is to enter the form information into a database, there is no need to ever register the form data as session variables. Simply insert the data into the database from the form and if you need some or all of the data on other pages pull it back out of the database. Second, it is never quicker or more efficient to store data in a file than a database. Third, it is ineffecient and unneccessary to put 60 fields in a single form. If you are using the GET method it probably will not work since it passes the variable names and values in the URL, which has a maximum length of 255 characters. 52 of your fields could be one character long (A,a,B,b...) and the remaining 8 would need to be two characters (aa,bb...), which takes up 68 characters. Then there are 60 &'s and 60 ='s which brings your total to 188 characters. Even if your data was all sinlge characters your total will now be 248 characters, leaving only 7 characters for your domain name, path and script name. You could, of course, use the POST method, but I would still not recommend this simbly because it is a nightmare for both the user entering the data and the person writing the script. Break the form up into smaller pieces along logical boundaries. For example, submit contact information first and then move on to a form which submits qualification information and so on. Third, your database should probably not consist of a single table with 60 fields. There is rarely an occasion where it is necessary or desirable to have a 60 field table. Break your tables up into logic groups along the same lines as your forms. You could have, for example, a table for contact information and a table for qualification information. Each table would contain a unique id field that related to the other tables. Find a tutorial on the web about database normalization to learn how to best design your databases. This should be the first step in the application design process and all other work should be based on it. Good luck and happy PHPing. Fred Masudi Olivier <[EMAIL PROTECTED]> wrote in message 004e01c17b29$db1756e0$[EMAIL PROTECTED]">news:004e01c17b29$db1756e0$[EMAIL PROTECTED]... What is the best way to handle a form with 60 fields ? Is it a maximum number of var that i can regisister in a session ? is it possible to configure this number in php.ini ? I dont'
[PHP] Question about adding library to use with php
Hello, i have one simple question With php installed, if the time comes where I want to add another library, let's say ming, do I redo the ./congigure script or do I redo the installation or just edit one file to accomodate the new software so it can work with php? This way if there is software not configured with php at the moment that comes out in a year or what not, I would know what to do. This is one area I am confused with. I am not sure if it is necessary to redo installation or just one simple modification. Thanks
[PHP] content disposition and internet exploder
I am attempting to allow users to download csv files that are created dynamically from a database. In order to do so I use: header( "Content-Disposition: attachment, filename=query.csv"); This works fine in NS, but not in IE, as it always attempts to save the file using the script name instead of the filename in the header. I have read numerous posts and articles on MS site as well as this list about bugs in MS 4.01 5.0 and 5.5, but each article claims that the problem is fixed with SP2 etc. I have installed each of the service packs and have not been able to get this to work correclty on any of them. Has anyone had success in getting IE to use the correct filename when downloading dynamically generated files? Fred -- PHP General 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] content disposition and internet exploder
> I am attempting to allow users to download csv files that are created > dynamically from a database. In order to do so I use: > > header( "Content-Disposition: attachment, filename=query.csv"); [snip] > Has anyone had success in getting IE to use the correct filename when > downloading dynamically generated files? I just use: Header("Content-disposition: filename=".$filename); ... ie, no "attachment". Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "Work now, freak later!" -- PHP General 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] content disposition and internet exploder
You could just trick it with a URL like: http://your.domain.com/script.php/query.csv IE will think your script is called query.csv while Apache is smart enough to run script.php. -Rasmus On Sun, 2 Dec 2001, Fred wrote: > I am attempting to allow users to download csv files that are created > dynamically from a database. In order to do so I use: > > header( "Content-Disposition: attachment, filename=query.csv"); > > This works fine in NS, but not in IE, as it always attempts to save the file > using the script name instead of the filename in the header. I have read > numerous posts and articles on MS site as well as this list about bugs in MS > 4.01 5.0 and 5.5, but each article claims that the problem is fixed with SP2 > etc. I have installed each of the service packs and have not been able to > get this to work correclty on any of them. > > Has anyone had success in getting IE to use the correct filename when > downloading dynamically generated files? > > Fred > > > > -- PHP General 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] content disposition and internet exploder
LOL Of course it worked. Open Source outwits MS yet again. Fred Rasmus Lerdorf <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You could just trick it with a URL like: > > http://your.domain.com/script.php/query.csv > > IE will think your script is called query.csv while Apache is smart enough > to run script.php. > > -Rasmus > > On Sun, 2 Dec 2001, Fred wrote: > > > I am attempting to allow users to download csv files that are created > > dynamically from a database. In order to do so I use: > > > > header( "Content-Disposition: attachment, filename=query.csv"); > > > > This works fine in NS, but not in IE, as it always attempts to save the file > > using the script name instead of the filename in the header. I have read > > numerous posts and articles on MS site as well as this list about bugs in MS > > 4.01 5.0 and 5.5, but each article claims that the problem is fixed with SP2 > > etc. I have installed each of the service packs and have not been able to > > get this to work correclty on any of them. > > > > Has anyone had success in getting IE to use the correct filename when > > downloading dynamically generated files? > > > > Fred > > > > > > > > > -- PHP General 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] content disposition and internet exploder
That works fine in IE but does not work in NS, undoubtedly because it does not conform to the RFC. Fred Jason Murray <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I am attempting to allow users to download csv files that are created > > dynamically from a database. In order to do so I use: > > > > header( "Content-Disposition: attachment, filename=query.csv"); > [snip] > > Has anyone had success in getting IE to use the correct filename when > > downloading dynamically generated files? > > I just use: > > Header("Content-disposition: filename=".$filename); > > ... ie, no "attachment". > > Jason > > -- > Jason Murray > [EMAIL PROTECTED] > Web Developer, Melbourne IT > "Work now, freak later!" -- PHP General 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] Re: A tricky one?
Basically, you want to do is evaluate if they entered anything for each item, and if so, print an additional line to the message. Explanation: $message .= "blah"; appends "blah" onto the end of the string $message \n is a new line (I dunno, you might be a newbie!!) If they entered 2 hamburgers and one pizza into the form, then the result of $message would be: --- I would like to order: Pizza: 1 Hamburger: 2 --- I think you get the drift. There are DEFINATELY better ways to write this code, but it's the simplest to understand. Justin French Raymond Lilleodegard wrote: > > Thanks for answering. > > But this only works if the customer orders one of each. Do you know how to > do it if, lets say the customer order 2 hamburgers and nothing else? > > Raymond > > "Raymond LilleøDegåRd" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi! > > > > I'm trying to make this form working with a mail() script. > > I made this form. Then the customer could write how many "pizzas" or > > "hamburgers" as he want. > > But how do I solve this without too much headache? Havent slept for days > > because of this problem : ) > > > > > > > > > > > > > > > > script > > > /* recipients */ > > $to = "[EMAIL PROTECTED]" ; > > > > /* subject */ > > $subject = "Order"; > > > > /* message */ > > $message = "I would like to order $?"; > > > > /* To send HTML mail, you can set the Content-type header. */ > > > > /* additional headers */ > > $headers = "From: Someone <[EMAIL PROTECTED]>\r\n"; > > > > > > /* and now mail it */ > > mail($to, $subject, $message, $headers); > > > > > > Best regards > > > > Raymond > > > > > > -- > PHP General 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 General 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] How to set file extension php Mac OSX and PHP 4.0.6
In your httpd.conf file, add: AddType application/x-httpd-php .php4 On Sun, 2 Dec 2001, [ISO-8859-1] René Fournier wrote: > I have successfully installed PHP 4.0.6, and it works! Only problem is > that Apache only sends files to the PHP module that have a .php > extension. However, I need to name the files .php4 (long story). As it > stands, all I see is the actual PHP source, not the output. > > Does anyone know how I can change Apache and/or the PHP module to > recognize .php4 files and execute them as such? > > Thanks. > > ...Rene > > > -- PHP General 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] pages will not refresh publically
I have a W2k box setup with IIS and PHP. It works fine, well almost. I can create a .php page and it works great. But, when I edit that page, the old page still shows up pubically. The page is updated if I open it from within the private network. For instance: www.domain.com displays old page, but 192.168.x.x displays updated page. Thanks in advance for any help. -- PHP General 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] pages will not refresh publically
Sounds like the old page is cached somewhere along the line. I am assuming that the same server is serving both the Internet and the private network, and there's no "Oops, forgot up upload it." Miles At 08:32 PM 12/2/2001 -0500, Keith Kwasigroch wrote: >I have a W2k box setup with IIS and PHP. It works fine, well almost. I can >create a .php page and it works great. But, when I edit that page, the old >page still shows up pubically. The page is updated if I open it from within >the private network. For instance: www.domain.com displays old page, but >192.168.x.x displays updated page. > > > >Thanks in advance for any help. > > > >-- >PHP General 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 General 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] why didnt you come watch me on my webcam? you said youwould! w
On Fri, 30 Nov 2001 [EMAIL PROTECTED] wrote: > Below is the result of your feedback form. It was submitted by > ([EMAIL PROTECTED]) on Friday, November 30, 2001 at 20:45:27 > --- > > : hey babe, it's karina remember me? if you don't im 5'8" with brown hair and blue >eyes with an ass you can bounce a quarter off of :) Im 21 years old and im in my >final year of college at OSU in OREGON! i just got my first webcam and i love meeting >new people on it and just showing my body off. i want you to come watch me do a >striptease! my website is located at: http://sepimpin.brinkster.net/ if that doesnt >work try http://karina.tk.ru/ ~ LOVE ALWAYS! -Karina XOXOXO<33 > > --- > > > -- > PHP General 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] > > Sorry, We're to busy with PHP ! Thank you, Steve Maroney -- PHP General 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] 4800 Would you like to lose weight while you sleep? 5060017
As seen on NBC, CBS, CNN, and even Oprah! The health discovery that actually reverses aging while burning fat, without dieting or exercise! This proven discovery has even been reported on by the New England Journal of Medicine. Forget aging and dieting forever! And it's Guaranteed! Click here: http://ultimatehgh1000.81832.com Would you like to lose weight while you sleep! No dieting! No hunger pains! No Cravings! No strenuous exercise! Change your life forever! 100% GUARANTEED! 1.Body Fat Loss82% improvement. 2.Wrinkle Reduction 61% improvement. 3.Energy Level 84% improvement. 4.Muscle Strength 88% improvement. 5.Sexual Potency 75% improvement. 6.Emotional Stability 67% improvement. 7.Memory62% improvement. You are receiving this email as a subscriber to the Opt-In America Mailing List. To remove yourself from all related maillists, just click here: mailto:[EMAIL PROTECTED]?Subject=REMOVE -- PHP General 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] SQL state S1090: Almost connected to mysql via PHP/odbc
Hello, thanks to the precious suggestions I had on this list some day ago, I have made some progresses, or at least have something new to report. I would like to ask now above the error mentioned in the subject, because I have not found it inside www.,mysql.com I have a database called m97. It *is* listed when I run "show databases" in themysql monitor. It *shows* when I run isql -v m97. I have modified /etc/odbc.ini and /etc/odbcinst.ini and /etc/odbc.ini as follows: /etc/odbc.ini [m97] Trace= On TraceFile= stderr Driver = /usr/lib/libmyodbc.so DSN = m97 SERVER = localhost USER = test PASSWORD = gee PORT = 3306 OPTIONS = 1 DATABASE= m97 SOCKET = /tmp/mysql.sock # /etc/odbcinst.ini # From the MyODBC package [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc.so FileUsage = 1 In the PHP file I have: putenv("LD_LIBRARY_PATH=/usr/lib/"); putenv("ODBCINSTINI=/etc/odbcinst.ini"); putenv("ODBCINI=/etc/odbc.ini"); $DSN="m97"; $cnx = odbc_connect( $DSN , 'test', 'gee' ); The result in netscape is still: Warning: SQL error: [unixODBC][TCX][MyODBC]Invalid DSN specified, SQL state S1090 in SQLConnect in /home/mweb/public_html/test.php on line 360 -- PHP General 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] RE: SQL state S1090: Almost connected to mysql via PHP/odbc
Hi, > -Original Message- > From: mweb [mailto:[EMAIL PROTECTED]] > Sent: Sunday, December 02, 2001 2:03 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: SQL state S1090: Almost connected to mysql via PHP/odbc > > > Hello, > > thanks to the precious suggestions I had on this list some day ago, I have > made some progresses, or at least have something new to report. > I would like to ask now above the error mentioned in the subject, because I > have not found it inside www.,mysql.com > > I have a database called m97. It *is* listed when I run "show databases" in > themysql monitor. It *shows* when I run isql -v m97. > I have modified /etc/odbc.ini and /etc/odbcinst.ini and /etc/odbc.ini as > follows: > > /etc/odbc.ini > > [m97] > Trace= On > TraceFile= stderr > Driver = /usr/lib/libmyodbc.so > DSN = m97 > SERVER = localhost > USER = test > PASSWORD = gee > PORT = 3306 > OPTIONS = 1 > DATABASE= m97 > SOCKET = /tmp/mysql.sock > # > > /etc/odbcinst.ini > > # From the MyODBC package > [MySQL] > Description = ODBC for MySQL > Driver = /usr/lib/libmyodbc.so > FileUsage = 1 > > In the PHP file I have: > putenv("LD_LIBRARY_PATH=/usr/lib/"); > putenv("ODBCINSTINI=/etc/odbcinst.ini"); > putenv("ODBCINI=/etc/odbc.ini"); > $DSN="m97"; > $cnx = odbc_connect( $DSN , 'test', 'gee' ); > > The result in netscape is still: > > Warning: SQL error: [unixODBC][TCX][MyODBC]Invalid DSN specified, SQL state > S1090 in SQLConnect in > /home/mweb/public_html/test.php on line 360 > The problem is that, unixODBC is not able to find your MyODBC DSN entry. This is probably due to the fact that it is not picking the right odbc.ini file. Did you tried by using isql -v m97 to check whether it is really picking the .ini or not. For more information on howto setup MyODBC, unixODBC and MySQL, refer to the following link: http://lists.mysql.com/cgi-ez/ezmlm-cgi?5:mss:3657:200108:einnhiokafobjmjbmcbm Regards, Venu -- For technical support contracts, go to https://order.mysql.com __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mr. Venu <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer /_/ /_/\_, /___/\___\_\___/ California, USA <___/ www.mysql.com -- PHP General 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] RE: SQL state S1090: Almost connected to mysql via PHP/odbc
On Sunday 02 December 2001 23:18, Venu wrote: > > in themysql monitor. It *shows* when I run isql -v m97. > > I have modified /etc/odbc.ini and /etc/odbcinst.ini and /etc/odbc.ini as > The problem is that, unixODBC is not able to find your MyODBC > DSN entry. This is probably due to the fact that it is not picking > the right odbc.ini file. > Did you tried by using isql -v m97 to check whether it is > really picking the .ini or not. Venu, I tried, as posted in the original message. Also, I put the complete path to the odbc.ini file listing that DSN (see again original post). There is certainly something wrong with my config files, but I'm checking them aginst all the documentation I found so far, and nothing appears. Any help is appreciated. mweb -- PHP General 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] PHP and JAVA
Hi all Does anyone got any experience with JAVA in PHP? I tried to rebuild php with java support. Everything worked well but when I try to initiate Java in PHP, I get cannot instantiate Virtual machine. I use kaffe and I believe I have configured PHP correctly. See http://www.haemelinck.be:8080/phpinfo.phtml Thx -- PHP General 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]