Re: [PHP] Ho to write output of sql query to txt file?
Original question: [snip] I am trying to get only records out of a table mathing a query. This should be piped into a textfile. My problem is that I have to transmit this records to a new machine. So the output should be a kind of sql commands which I could run with phpadmin or similar to import them to the other db on the other machine. Is this possible? [/snip] Thank you for your help. I did read on mysql.com and your article. Than I tryed to transfer the datasets. Export worked ok. The textfile contains the records. Import message: Query OK, 35 rows affected (0.04 sec) Records: 35 Deleted: 0 Skipped: 0 Warnings: 630 The warning already tells it. the datasets are totally empty. Only default of the columns is set. do u have an idea why? Thanx, Andy - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: 'andy' [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 4:07 PM Subject: RE: [PHP] Ho to write output of sql query to txt file? [snip] I am trying to get only records out of a table mathing a query. This should be piped into a textfile. My problem is that I have to transmit this records to a new machine. So the output should be a kind of sql commands which I could run with phpadmin or similar to import them to the other db on the other machine. Is this possible? [/snip] from: http://www.mysql.com/doc/S/E/SELECT.html The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected rows to a file. The file is created on the server host and cannot already exist (among other things, this prevents database tables and files such as `/etc/passwd' from being destroyed). You must have the file privilege on the server host to use this form of SELECT. SELECT ... INTO OUTFILE is mainly intended to let you very quickly dump a table on the server machine. If you want to create the resulting file on some other host than the server host you can't use SELECT ... INTO OUTFILE. In this case you should instead use some client program like mysqldump --tab or mysql -e SELECT ... outfile to generate the file. SELECT ... INTO OUTFILE is the complement of LOAD DATA INFILE; the syntax for the export_options part of the statement consists of the same FIELDS and LINES clauses that are used with the LOAD DATA INFILE statement. See section 6.4.9 LOAD DATA INFILE Syntax. In the resulting text file, only the following characters are escaped by the ESCAPED BY character: The ESCAPED BY character The first character in FIELDS TERMINATED BY The first character in LINES TERMINATED BY Additionally, ASCII 0 is converted to ESCAPED BY followed by 0 (ASCII 48). The reason for the above is that you must escape any FIELDS TERMINATED BY, ESCAPED BY, or LINES TERMINATED BY characters to reliably be able to read the file back. ASCII 0 is escaped to make it easier to view with some pagers. As the resulting file doesn't have to conform to the SQL syntax, nothing else need be escaped. Here follows an example of getting a file in the format used by many old programs. SELECT a,b,a+b INTO OUTFILE /tmp/result.text FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY \n FROM test_table; HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Ho to write output of sql query to txt file?
[snip] I did read on mysql.com and your article. Than I tryed to transfer the datasets. Export worked ok. The textfile contains the records. Import message: Query OK, 35 rows affected (0.04 sec) Records: 35 Deleted: 0 Skipped: 0 Warnings: 630 The warning already tells it. the datasets are totally empty. Only default of the columns is set. [/snip] Did you remember to add a field seperator? That seems the likely cause of the problem. Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Logic -- conditional statements
On Tue, Jun 04, 2002 at 04:40:26AM +0400, Ricardo Fitzgerald wrote: I'm trying to echo a neat table I've GOT to bust your chops. That table and your code are anything BUT neat. For neat, you need to put /td tags to close each cell. Also nest your code properly... if ($value2 ==0) { echo td$variable1; } as opposed to if ($value2 ==0) { echo td$variable1; } Now, to the logic problems in your code. Please note, I've snipped a LOT... //Value1 is always 1 if ($value1 == 0) { exit } So, if the value is always 1 why bother even doing the test? if ($value2 ==0) { .td ... $variable1 ... } if($value2 == 0) { .td ... $variable1 ... .tr /next row .td ... $variable5 ... } Dude, you're evaluating if $value2 == 0 twice and thus printing the same stuff twice. if($value3 == 3) { .td ... $variable1 ... .tr /next row .td ... $variable5 ... ./tr .td ... $variable9 ... Now, if $value3 == 3 you're going ahead and printing out variable1 and 5 all over again. Am I correct in assuming that if value3 == 3 all you want to print is variable9 and up? If so, then just print that. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multisite hit counter, includin session statistics
Hi! I want to write some multisite hit counter, but including session statistics. Anyone knows how to do that? I mean: I need to place some link on the page, on not allways php enabled site - probably in form of blank image, which will run script on my server. Ex.: img src=http://my_serv.org?site=0011;. This way I can produce statistics including: - page access number - IP adresses of users ... but can't(don't know how): - number of unique users - average time users stays on site etc. Any hint? Thanks, Minca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cronjob security
On Tue, Jun 04, 2002 at 09:51:18AM -0400, SP wrote: Or you could do this to make the page only accessable to you. http://www.mysite.com/cronpage.php?secretpassword=iud88383 You could also use .htaccess or checking $_SERVER['REMOTE_ADDR'] to see that the request is coming from your server. Of course, that can be spoofed by the REALLY determined cracker. But, why would anyone go to that length to mess with you? --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php IDE for linux
Quanta is for KDE, too, not GTK. J Henrik Hansen wrote: [EMAIL PROTECTED] (Pedro Jorge Dias Cardoso) wrote: please tell me a good PHP editor for linux, wich one you prefer. or a package for PHP in Xemacs. I saw recently that phpedit comes out on linux now thats a good editor (it costs). Else try Kate for KDE and Quanta for GTK. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP_RAW_POST_VARS
This variable isn't getting populated! Environment: PHP 4.1.2 Linux Apache always_populate_raw_post_data is on (php.ini). Any ideas? --Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MacOSX / php.ini newbie question
Did a php.ini-dist or php.ini-recommended file come with your installation files? Locate those, edit them accordingly, and save it as php.ini in /usr/lib/ ---John Holmes... - Original Message - From: Verdon Vaillancourt [EMAIL PROTECTED] To: Peter [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 9:04 AM Subject: Re: [PHP] MacOSX / php.ini newbie question Hi Peter, Thanks for the reply. Yes, I have searched using both locate and find in the terminal, and sherlock, though I don't think sherlock will find anything in system folders. BTW... I updated my locate db before doing the search. :) verdon On 6/3/02 10:19 PM, Peter [EMAIL PROTECTED] wrote: have you tried doing a general search for that file? ie search all of ur hdd ... -Original Message- From: Verdon Vaillancourt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 June 2002 11:15 AM To: [EMAIL PROTECTED] Subject: [PHP] MacOSX / php.ini newbie question Hi Apologies in advance if this question is simple. I haven't been able to find an answer... Is there no php.ini file in a php 4.1.2 install on MacOSX 10.1.4 (client not server) ? My php info/test page says that the path to the configuration file (php.ini) file is '/usr/lib', but it is not there (or anywhere else according to locate) Is this a file I can create myself or is there an example to be had somewhere? TIA, verdon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP_AUTH_USER
I have a bunch of pages on my site inside an apache .htaccess protected directory. After visitors have logged in I am on part of my site I need to find out which user it is that has logged in. I thought this information was stored in the $PHP_AUTH_USER variable, but when I print this variable it is empty. Does anyone know of way to tell on apache 7 how to tell with php who is logged in? PHP might not be very stable with apache 7... :) What version of PHP are you using? Try using the variable $_SERVER['PHP_AUTH_USER'] or $HTTP_SERVER_VARS['PHP_AUTH_USER']. If it's not in _SERVER, someone please correct me. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Secure File Upload
Hi There! When uploading a file with PHP, AFAIK I can only control what will be stored on the server. So if someone sends me 100 MB, these will be deleted immediately. But, unfortunately, the traffic is produced nevertheless. Is there any way to check the file size before uploading the file or any other way to keep the traffic under a certain limit? Last think I would like to have is a script that disables all uploads after a certain traffic has been produced, I would like to be able to really PREVENT uploads, let's say bigger than 10 MB?! Cheers, Kiko -- It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.gruppe-69.com/ ICQ: 100601600 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MacOSX / php.ini newbie question
Hi John, Thanks for answering. Apparently not. I have tried both the builds provided by Marc (well respected) at http://www.entropy.ch/software/macosx/ and the default build included with Apple's MacOSX (10.1.4). Neither include these files. Marc says that the file is not included and just instructs to write it... I just can't find an example of the format. I only need a couple of lines in it for the scripts I wish to run, and know what they are. I am just unsure if the php.ini file needs specific lines to open and close, or if I can just create a file with the declarations I require (and nothing else) and save it in the correct location. Cheers, verdon On 6/4/02 11:26 AM, 1LT John W. Holmes [EMAIL PROTECTED] wrote: Did a php.ini-dist or php.ini-recommended file come with your installation files? Locate those, edit them accordingly, and save it as php.ini in /usr/lib/ ---John Holmes... - Original Message - From: Verdon Vaillancourt [EMAIL PROTECTED] To: Peter [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 9:04 AM Subject: Re: [PHP] MacOSX / php.ini newbie question Hi Peter, Thanks for the reply. Yes, I have searched using both locate and find in the terminal, and sherlock, though I don't think sherlock will find anything in system folders. BTW... I updated my locate db before doing the search. :) verdon On 6/3/02 10:19 PM, Peter [EMAIL PROTECTED] wrote: have you tried doing a general search for that file? ie search all of ur hdd ... -Original Message- From: Verdon Vaillancourt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 4 June 2002 11:15 AM To: [EMAIL PROTECTED] Subject: [PHP] MacOSX / php.ini newbie question Hi Apologies in advance if this question is simple. I haven't been able to find an answer... Is there no php.ini file in a php 4.1.2 install on MacOSX 10.1.4 (client not server) ? My php info/test page says that the path to the configuration file (php.ini) file is '/usr/lib', but it is not there (or anywhere else according to locate) Is this a file I can create myself or is there an example to be had somewhere? TIA, verdon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multisite hit counter, includin session statistics
img src=http://www.yourserver.com/image.php?ID=xxx; Do what you need to do with the PHP code as far as keeping a count of visitors, etc, and then create an image header and send it the data for a 1x1 pixel transparant image. Got a question for everyone else, b/c I'm not sure on this. If I have a link like the above on www.example.com, say, and it linkes to www.yourserver.com/image.php, can I start a session in that file and have it carry over each time this image is called? i.e. image.php would start a session, see if one already exists, update counts and track of user, then send image headers and data. Will that work? I'm at work now, so I can't test it. What I'm worried about is the session cookies being accessible when it's an image being requested, not a web page... Any suggestions welcome... ---John Holmes - Original Message - From: Martin Smetak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 11:30 AM Subject: [PHP] multisite hit counter, includin session statistics Hi! I want to write some multisite hit counter, but including session statistics. Anyone knows how to do that? I mean: I need to place some link on the page, on not allways php enabled site - probably in form of blank image, which will run script on my server. Ex.: img src=http://my_serv.org?site=0011;. This way I can produce statistics including: - page access number - IP adresses of users ... but can't(don't know how): - number of unique users - average time users stays on site etc. Any hint? Thanks, Minca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multisite hit counter, includin session statistics
img src=http://www.yourserver.com/image.php?ID=xxx; Well, how can this help me? This is the way I need to use the counter on web page, it solves nothing. I need the same thing u are asking to, but this way it doesn't work. But there are counters-sites that uses this method(img) producing session statistics. Anyone know how they do that? Minca Do what you need to do with the PHP code as far as keeping a count of visitors, etc, and then create an image header and send it the data for a 1x1 pixel transparant image. Got a question for everyone else, b/c I'm not sure on this. If I have a link like the above on www.example.com, say, and it linkes to www.yourserver.com/image.php, can I start a session in that file and have it carry over each time this image is called? i.e. image.php would start a session, see if one already exists, update counts and track of user, then send image headers and data. Will that work? I'm at work now, so I can't test it. What I'm worried about is the session cookies being accessible when it's an image being requested, not a web page... Any suggestions welcome... ---John Holmes - Original Message - From: Martin Smetak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 11:30 AM Subject: [PHP] multisite hit counter, includin session statistics Hi! I want to write some multisite hit counter, but including session statistics. Anyone knows how to do that? I mean: I need to place some link on the page -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP_AUTH_USER
Correction Redhat7 :-) Got it working thanks for all the help! -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 9:36 AM To: Fifield, Mike; [EMAIL PROTECTED] Subject: Re: [PHP] PHP_AUTH_USER I have a bunch of pages on my site inside an apache .htaccess protected directory. After visitors have logged in I am on part of my site I need to find out which user it is that has logged in. I thought this information was stored in the $PHP_AUTH_USER variable, but when I print this variable it is empty. Does anyone know of way to tell on apache 7 how to tell with php who is logged in? PHP might not be very stable with apache 7... :) What version of PHP are you using? Try using the variable $_SERVER['PHP_AUTH_USER'] or $HTTP_SERVER_VARS['PHP_AUTH_USER']. If it's not in _SERVER, someone please correct me. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP_RAW_POST_VARS
A bug existed in 4.1.x regarding this directive, and was fixed in 4.2.0. Sorry I can't give any specifics (as I've forgotten them) but see the changelog: http://www.php.net/changelog Regards, Philip Olson On Tue, 4 Jun 2002, Daniel Kushner wrote: This variable isn't getting populated! Environment: PHP 4.1.2 Linux Apache always_populate_raw_post_data is on (php.ini). Any ideas? --Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] proxy looses cookie
Dear PHP-People: Anybody knows why when I configure in my Explorer that uses a proxy, the value of the cookie that I has set with setcookie(...) is lost. When I disable the proxy, the cookie value is remained. Anybody has had the same problem? Thanks a lot. Emiliano Marmonti
Re: [PHP] Alguine me puede Ayudar...S.O.S...mi PHP no sube .....!!!!
Ok, here's that email in English, if anyone can help this guy... I can't unfortunately. Hello It is that I have problems so that works PHP in a servant NT 4,0 with IIS 3,0 and this PHP does not work to see. 4.2.1) since when doing some of the examples that no encloses (codigos) works. Hicela proves with Apache/Win98/PHP and there I work myself. Nonentinedo that is what happens; ademas segui instruciones of the pagina Web http://www.php.net/manual/fi/configuration.php and asi I do not even work. If somebody can Help me would thank for it, since this has to me very complicated. Greetings. Oscar Dwells PS: With these codigos, I make test with a called pagina prueba.php and I realized of which in NT it did not work, but if in W98 (with php 4.2.0). [EMAIL PROTECTED] wrote: Hola Resulta que tengo problemas para que funcione PHP en un servidor NT 4.0 con IIS 3.0 y este no funciona PHP ver. 4.2.1) ya que al hacer alguno de snip... ?php $myvar = Hola. Este es mi primer script en PHP \n; //es mi primer script en PHP \n; echo $myvar; ? BR trtdForma 1/a/td ? echo Hola, este es un mensaje de Prueba con PHP; ? BR trtdForma 2/a/td ?php echo Hola, este es un mensaje de Prueba con PHP;? BR trtdForma 3/a/td script language=php echo Hola, este es un mensaje de Prueba con PHP; /script BR trtdForma4/a/td % echo Hola, este es un mensaje de Prueba con PHP; % BRBR ? php phpinfo() ?
Re: [PHP] PHP_AUTH_USER
And the solution was? remember, other people actually search the archives before they post, so giving the solution to your problem will help those people out. (Even if it was something simple) ---John Holmes... - Original Message - From: Fifield, Mike [EMAIL PROTECTED] To: '1LT John W. Holmes' [EMAIL PROTECTED]; Fifield, Mike [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 12:19 PM Subject: RE: [PHP] PHP_AUTH_USER Correction Redhat7 :-) Got it working thanks for all the help! -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 9:36 AM To: Fifield, Mike; [EMAIL PROTECTED] Subject: Re: [PHP] PHP_AUTH_USER I have a bunch of pages on my site inside an apache .htaccess protected directory. After visitors have logged in I am on part of my site I need to find out which user it is that has logged in. I thought this information was stored in the $PHP_AUTH_USER variable, but when I print this variable it is empty. Does anyone know of way to tell on apache 7 how to tell with php who is logged in? PHP might not be very stable with apache 7... :) What version of PHP are you using? Try using the variable $_SERVER['PHP_AUTH_USER'] or $HTTP_SERVER_VARS['PHP_AUTH_USER']. If it's not in _SERVER, someone please correct me. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multisite hit counter, includin session statistics
No problem bud, sorry I tried to help. Anyhow, this does work, you just do not know how to write image.php so that it returns the correct data for an image counter. maybe i misunderstood your first email, but I thought you were looking for a hidden way of keeping track of page hit counts and user paths, etc. If your talking about files that can have PHP in them, then this is as simple as an include() file that generates the correct img calls to product the correct number, while tracking the other information you want. If you want to call this on a plain HTML page that can't parse PHP, then the only way I know of is to create an image call to a PHP script. Maybe you can do more with Javascript or SSI, if that's available... ---John Holmes... - Original Message - From: Martin Smetak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 12:14 PM Subject: Re: [PHP] multisite hit counter, includin session statistics img src=http://www.yourserver.com/image.php?ID=xxx; Well, how can this help me? This is the way I need to use the counter on web page, it solves nothing. I need the same thing u are asking to, but this way it doesn't work. But there are counters-sites that uses this method(img) producing session statistics. Anyone know how they do that? Minca Do what you need to do with the PHP code as far as keeping a count of visitors, etc, and then create an image header and send it the data for a 1x1 pixel transparant image. Got a question for everyone else, b/c I'm not sure on this. If I have a link like the above on www.example.com, say, and it linkes to www.yourserver.com/image.php, can I start a session in that file and have it carry over each time this image is called? i.e. image.php would start a session, see if one already exists, update counts and track of user, then send image headers and data. Will that work? I'm at work now, so I can't test it. What I'm worried about is the session cookies being accessible when it's an image being requested, not a web page... Any suggestions welcome... ---John Holmes - Original Message - From: Martin Smetak [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 11:30 AM Subject: [PHP] multisite hit counter, includin session statistics Hi! I want to write some multisite hit counter, but including session statistics. Anyone knows how to do that? I mean: I need to place some link on the page -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php IDE for linux
[EMAIL PROTECTED] (J Smith) wrote: Quanta is for KDE, too, not GTK. you are right I was thinking about glimmer :) but kate,quanta for kde then :) -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP_AUTH_USER
The information is stored in the $PHP_AUTH_USER variable but only appears to be accessible while you are viewing a page that is protected by that .htaccess file. To make it available to other pages I assigned $PHP_AUTH_USER to a session variable. :o) -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 10:48 AM To: Fifield, Mike Cc: [EMAIL PROTECTED] Subject: Re: [PHP] PHP_AUTH_USER And the solution was? remember, other people actually search the archives before they post, so giving the solution to your problem will help those people out. (Even if it was something simple) ---John Holmes... - Original Message - From: Fifield, Mike [EMAIL PROTECTED] To: '1LT John W. Holmes' [EMAIL PROTECTED]; Fifield, Mike [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 12:19 PM Subject: RE: [PHP] PHP_AUTH_USER Correction Redhat7 :-) Got it working thanks for all the help! -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 9:36 AM To: Fifield, Mike; [EMAIL PROTECTED] Subject: Re: [PHP] PHP_AUTH_USER I have a bunch of pages on my site inside an apache .htaccess protected directory. After visitors have logged in I am on part of my site I need to find out which user it is that has logged in. I thought this information was stored in the $PHP_AUTH_USER variable, but when I print this variable it is empty. Does anyone know of way to tell on apache 7 how to tell with php who is logged in? PHP might not be very stable with apache 7... :) What version of PHP are you using? Try using the variable $_SERVER['PHP_AUTH_USER'] or $HTTP_SERVER_VARS['PHP_AUTH_USER']. If it's not in _SERVER, someone please correct me. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alguine me puede Ayudar...S.O.S...mi PHP no sube .....!!!!
Qual o erro que você está recebendo? Qual o módulo que você está usando? CGI ou SAPI? Veja que se você está usando o módulo ISAPI, ele não funciona com IIS 3.0. Você terá que instalar o Option Pack 4. Aqui vai a informação do install.txt: For the ISAPI module, an ISAPI 4.0 compliant Web server is required (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is *NOT* supported; You should download and install the Windows NT 4.0 Option Pack with IIS 4.0 if you want native PHP support. Boa sorte, Josué At 11:40 AM 6/4/2002 -0400, [EMAIL PROTECTED] wrote: Hola Resulta que tengo problemas para que funcione PHP en un servidor NT 4.0 con IIS 3.0 y este no funciona PHP ver. 4.2.1) ya que al hacer alguno de los ejemplos que adjunte (codigos) ninguno funciona. Hicela prueba con Apache/Win98/PHP y ahí me funciono. No entinedo que es lo que pasa?; ademas segui instruciones de la pagina Web http://www.php.net/manual/fi/configuration.php y aun asi no Funciono. Si alguien me puede Ayudar se lo agradecería, ya que esto me tiene muy complicado. Saludos. Oscar Mora PD: Con estos codigos, hago test con una pagina llamada prueba.php y me di cuenta de que en NT no funcionó, pero si en W98 (con php 4.2.0). ?php $myvar = Hola. Este es mi primer script en PHP \n; //es mi primer script en PHP \n; echo $myvar; ? BR trtdForma 1/a/td ? echo Hola, este es un mensaje de Prueba con PHP; ? BR trtdForma 2/a/td ?php echo Hola, este es un mensaje de Prueba con PHP;? BR trtdForma 3/a/td script language=php echo Hola, este es un mensaje de Prueba con PHP; /script BR trtdForma4/a/td % echo Hola, este es un mensaje de Prueba con PHP; % BRBR ? php phpinfo() ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alguine me puede Ayudar...S.O.S...mi PHP no sube .....!!!!
Sorry, this was meant to go off-list. At 01:38 PM 6/4/2002 -0400, Josué Figueira Machado wrote: Qual o erro que você está recebendo? Qual o módulo que você está usando? CGI ou SAPI? Veja que se você está usando o módulo ISAPI, ele não funciona com IIS 3.0. Você terá que instalar o Option Pack 4. Aqui vai a informação do install.txt: For the ISAPI module, an ISAPI 4.0 compliant Web server is required (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is *NOT* supported; You should download and install the Windows NT 4.0 Option Pack with IIS 4.0 if you want native PHP support. Boa sorte, Josué At 11:40 AM 6/4/2002 -0400, [EMAIL PROTECTED] wrote: Hola Resulta que tengo problemas para que funcione PHP en un servidor NT 4.0 con IIS 3.0 y este no funciona PHP ver. 4.2.1) ya que al hacer alguno de los ejemplos que adjunte (codigos) ninguno funciona. Hicela prueba con Apache/Win98/PHP y ahí me funciono. No entinedo que es lo que pasa?; ademas segui instruciones de la pagina Web http://www.php.net/manual/fi/configuration.php y aun asi no Funciono. Si alguien me puede Ayudar se lo agradecería, ya que esto me tiene muy complicado. Saludos. Oscar Mora PD: Con estos codigos, hago test con una pagina llamada prueba.php y me di cuenta de que en NT no funcionó, pero si en W98 (con php 4.2.0). ?php $myvar = Hola. Este es mi primer script en PHP \n; //es mi primer script en PHP \n; echo $myvar; ? BR trtdForma 1/a/td ? echo Hola, este es un mensaje de Prueba con PHP; ? BR trtdForma 2/a/td ?php echo Hola, este es un mensaje de Prueba con PHP;? BR trtdForma 3/a/td script language=php echo Hola, este es un mensaje de Prueba con PHP; /script BR trtdForma4/a/td % echo Hola, este es un mensaje de Prueba con PHP; % BRBR ? php phpinfo() ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] MacOSX / php.ini newbie question
Verdon, Maybe you didn't see my response to your message yesterday, since I saw a few more posts from you after I replied wondering where you can get a php.ini file. Just go to http://www.php.net/downloads Download the .tar.gz file for the version you're using from entropy.ch Within, you will find php.ini-dist and php.ini-recommended. Move those out of the directory of unpacked PHP source, and delete the rest. (You won't need it, since you have the entropy.ch version.) Look through the two files. Decide which one you like. Edit if necessary. Rename to php.ini Upload to your /usr/lib directory on your server. That's it! -Clay -- Forwarded Message From: Clay Loveless [EMAIL PROTECTED] Date: Mon, 03 Jun 2002 19:11:10 -0700 To: PHP-General [EMAIL PROTECTED] Subject: Re: [PHP] MacOSX / php.ini newbie question Verdon, I'm a fellow PHP'er on Mac OS X (Server) 10.1.4. : ) You need to download the full distribution from php.net/downloads ... In there you will find a php.ini-dist file and php.ini-recommended file. Pick one that you like, edit as needed with BBEdit Lite (NOT TextEdit!), rename to php.ini and upload to /usr/lib. Restart Apache, and the newly installed php.ini file will be read in at that time. Good luck! -Clay From: Verdon Vaillancourt [EMAIL PROTECTED] Date: Mon, 03 Jun 2002 21:15:27 -0400 To: [EMAIL PROTECTED] Subject: [PHP] MacOSX / php.ini newbie question Hi Apologies in advance if this question is simple. I haven't been able to find an answer... Is there no php.ini file in a php 4.1.2 install on MacOSX 10.1.4 (client not server) ? My php info/test page says that the path to the configuration file (php.ini) file is '/usr/lib', but it is not there (or anywhere else according to locate) Is this a file I can create myself or is there an example to be had somewhere? TIA, verdon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- End of Forwarded Message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MacOSX / php.ini newbie question
Thanks Clay :) got it! On 6/4/02 1:49 PM, Clay Loveless [EMAIL PROTECTED] wrote: Verdon, Maybe you didn't see my response to your message yesterday, since I saw a few more posts from you after I replied wondering where you can get a php.ini file. Just go to http://www.php.net/downloads Download the .tar.gz file for the version you're using from entropy.ch Within, you will find php.ini-dist and php.ini-recommended. Move those out of the directory of unpacked PHP source, and delete the rest. (You won't need it, since you have the entropy.ch version.) Look through the two files. Decide which one you like. Edit if necessary. Rename to php.ini Upload to your /usr/lib directory on your server. That's it! -Clay -- Forwarded Message From: Clay Loveless [EMAIL PROTECTED] Date: Mon, 03 Jun 2002 19:11:10 -0700 To: PHP-General [EMAIL PROTECTED] Subject: Re: [PHP] MacOSX / php.ini newbie question Verdon, I'm a fellow PHP'er on Mac OS X (Server) 10.1.4. : ) You need to download the full distribution from php.net/downloads ... In there you will find a php.ini-dist file and php.ini-recommended file. Pick one that you like, edit as needed with BBEdit Lite (NOT TextEdit!), rename to php.ini and upload to /usr/lib. Restart Apache, and the newly installed php.ini file will be read in at that time. Good luck! -Clay From: Verdon Vaillancourt [EMAIL PROTECTED] Date: Mon, 03 Jun 2002 21:15:27 -0400 To: [EMAIL PROTECTED] Subject: [PHP] MacOSX / php.ini newbie question Hi Apologies in advance if this question is simple. I haven't been able to find an answer... Is there no php.ini file in a php 4.1.2 install on MacOSX 10.1.4 (client not server) ? My php info/test page says that the path to the configuration file (php.ini) file is '/usr/lib', but it is not there (or anywhere else according to locate) Is this a file I can create myself or is there an example to be had somewhere? TIA, verdon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: notice:undefined variable
OK - couple of things first: a) The PHP mailing list is for programmers of PHP looking for help making their own scripts - not for people who want support for implementing someone else's script. There is a link on the site where I found a copy of your script offering support, this is where you should have gone first. b) This is a mailing list, and as such replies should be made to the list - not to individuals who subscribe the list. c) You still didn't send the source code for the form - I had to go and look for it myself on the net. Hi Michael, Our client uses the formmail.php script. He said to me that he used it as is with his previous ISP - it was not necessary for him to change anything. I configured the php.ini in the NTWin directory correctly. As a test I do not add anything to the email field (on the form) but it does not make any difference in the errror message. The page can be found at www.reservationhouse.co.za and then the link on the lefthand side: bookings and information. However, the problem appears to be quite simple - if you create a simple script like the one below and run it on your server, you should see a setting called register_globals. This setting need to be On for your script to work. Newer versions of PHP disable this by default as it compromises both speed and security. List config script: ? phpinfo(); ? If you are leasing space, you will probably not have access to the php.ini file to make this change. You can however specify php settings in a file named .htaccess placed in your root web directory, eg: .htaccess: php_value register_globals On regards, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: notice:undefined variable
Ooops, now I feel silly - sent this to the wrong list! Hangs head in shame! :-) Michael Davey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... OK - couple of things first: a) The PHP mailing list is for programmers of PHP looking for help making their own scripts - not for people who want support for implementing someone else's script. There is a link on the site where I found a copy of your script offering support, this is where you should have gone first. b) This is a mailing list, and as such replies should be made to the list - not to individuals who subscribe the list. c) You still didn't send the source code for the form - I had to go and look for it myself on the net. Hi Michael, Our client uses the formmail.php script. He said to me that he used it as is with his previous ISP - it was not necessary for him to change anything. I configured the php.ini in the NTWin directory correctly. As a test I do not add anything to the email field (on the form) but it does not make any difference in the errror message. The page can be found at www.reservationhouse.co.za and then the link on the lefthand side: bookings and information. However, the problem appears to be quite simple - if you create a simple script like the one below and run it on your server, you should see a setting called register_globals. This setting need to be On for your script to work. Newer versions of PHP disable this by default as it compromises both speed and security. List config script: ? phpinfo(); ? If you are leasing space, you will probably not have access to the php.ini file to make this change. You can however specify php settings in a file named .htaccess placed in your root web directory, eg: .htaccess: php_value register_globals On regards, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can't Connect to INFORMIX DB
Hi, I need some help (or maybe a lot), to get PHP connecting to my Informix DB. I'm pretty new to PHP, and i don't have a clue of what i'm doing wrong. I'm using IIS 4.0 under Win NT 4.0. with PHP 4.2.1 I've tried to connect throw ODBC driver, and directly from native functions but both fail. The messages are: When i use ODBC: Warning: SQL error: [INTERSOLV][ODBC Informix driver][Informix]Cannot open file 'csql.iem' , SQL state S1000 in SQLConnect When i use native functions: PHP Warning: Unable to load dynamic library 'C:\Php421\extensions\php_ifx.dll' - The specified procedure could not be found. in Unknown on line 0 Thanks, Gastón. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using stdin in php
On Thursday 30 May 2002 08:55, [EMAIL PROTECTED] wrote: Could somebody look at this a tell me way it does not set the password correctly. I know it has to run at root this has been handled. I think my problem is with --stdin. It sets a password but it does not set it correctly $cmd = echo $newpassword | passwd --stdin $user; return(exec($cmd)); $pw = 'fiddle'; $user = 'doo'; `echo $pw | passwd --stdin $user`; works for me. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Never say you know a man until you have divided an inheritance with him. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] General IIS Implementation Question
I have written an PHP application using LAMP. However, I have a client who wants me to install the application on his Win2K server. My application uses PHP sessions with trans-SID enabled. I remember reading on this list where people were having problems getting PHP on Windows to work. I do not remember what the issues were. My biggest question is it best to use IIS or Apache on the windows machine. What are the pros and cons of each. Any input or opinions would be welcome. /dkm
[PHP] findin colors in gif files
hi everybody, i am new to this list php and i have a big question that i would love to be answered ;) i have a small gif file that has a part in #ff3366 colored - so what i thought is to do a mean hack for my website: instead of opening all images in a graphicseditor and change the color manually i could look up for that color (ff3366) in the image files and replace it with something else, unfortunatly i got stuck with this approach pretty soon. here is my problem: if i open the gif file in php (its attached to this mail) and convert it to hex: $filetext1 = implode(,(file(vcd_1.gif))); $filetext1 = bin2hex($filetext1); } like this i get a string that looks like hex - but i cant find my ff3366 anymore, did i miss something really obvious? if i look up the gif file with an hexeditor (i use textpad) i can see it - with php its not findable any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] countries
What about this? Michael Cronstrom Web Inventor AF,Afghanistan; AL,Albania; DZ,Algeria; AS,American Samoa; AD,Andorra; AO,Angola; AI,Anguilla; AQ,Antarctica; AG,Antigua and Barbuda; AR,Argentina; AM,Armenia; AW,Aruba; AU,Australia; AT,Austria; AZ,Azerbaidjan; BS,Bahamas; BH,Bahrain; BD,Banglades; BB,Barbados; BY,Belarus; BE,Belgium; BZ,Belize; BJ,Benin; BM,Bermuda; BO,Bolivia; BA,Bosnia-Herzegovina; BW,Botswana; BV,Bouvet Island; BR,Brazil; IO,British Indian O. Terr.; BN,Brunei Darussalam; BG,Bulgaria; BF,Burkina Faso; BI,Burundi; BT,Buthan; KH,Cambodia; CM,Cameroon; CA,Canada; CV,Cape Verde; KY,Cayman Islands; CF,Central African Rep.; TD,Chad; CL,Chile; CN,China; CX,Christmas Island; CC,Cocos (Keeling) Isl.; CO,Colombia; KM,Comoros; CG,Congo; CK,Cook Islands; CR,Costa Rica; HR,Croatia; CU,Cuba; CY,Cyprus; CZ,Czech Republic; CS,Czechoslovakia; DK,Denmark; DJ,Djibouti; DM,Dominica; DO,Dominican Republic; TP,East Timor; EC,Ecuador; EG,Egypt; SV,El Salvador; GQ,Equatorial Guinea; EE,Estonia; ET,Ethiopia; FK,Falkland Isl.(UK); FO,Faroe Islands; FJ,Fiji; FI,Finland; FR,France; FX,France (European Ter.); TF,French Southern Terr.; GA,Gabon; GM,Gambia; GE,Georgia; DE,Germany; GH,Ghana; GI,Gibraltar; GB,Great Britain (UK); GR,Greece; GL,Greenland; GD,Grenada; GP,Guadeloupe (Fr.); GU,Guam (US); GT,Guatemala; GN,Guinea; GW,Guinea Bissau; GY,Guyana; GF,Guyana (Fr.); HT,Haiti; HM,Heard McDonald Isl.; HN,Honduras; HK,Hong Kong; HU,Hungary; IS,Iceland; IN,India; ID,Indonesia; IR,Iran; IQ,Iraq; IE,Ireland; IL,Israel; IT,Italy; CI,Ivory Coast; JM,Jamaica; JP,Japan; JO,Jordan; KZ,Kazachstan; KE,Kenya; KG,Kirgistan; KI,Kiribati; KP,Korea (North); KR,Korea (South); KW,Kuwait; LA,Laos; LV,Latvia; LB,Lebanon; LS,Lesotho; LR,Liberia; LY,Libya; LI,Liechtenstein; LT,Lithuania; LU,Luxembourg; MO,Macau; MG,Madagascar; MW,Malawi; MY,Malaysia; MV,Maldives; ML,Mali; MT,Malta; MH,Marshall Islands; MQ,Martinique (Fr.); MR,Mauritania; MU,Mauritius; MX,Mexico; FM,Micronesia; MD,Moldavia; MC,Monaco; MN,Mongolia; MS,Montserrat; MA,Morocco; MZ,Mozambique; MM,Myanmar; NA,Namibia; NR,Nauru; NP,Nepal; AN,Netherland Antilles; NL,Netherlands; NT,Neutral Zone; NC,New Caledonia (Fr.); NZ,New Zealand; NI,Nicaragua; NE,Niger; NG,Nigeria; NU,Niue; NF,Norfolk Island; MP,Northern Mariana Isl.; NO,Norway; OM,Oman; PK,Pakistan; PW,Palau; PA,Panama; PG,Papua New; PY,Paraguay; PE,Peru; PH,Philippines; PN,Pitcairn; PL,Poland; PF,Polynesia (Fr.); PT,Portugal; PR,Puerto Rico (US); QA,Qatar; RE,Reunion (Fr.); RO,Romania; RU,Russian Federation; RW,Rwanda; LC,Saint Lucia; WS,Samoa; SM,San Marino; SA,Saudi Arabia; SN,Senegal; SC,Seychelles; SL,Sierra Leone; SG,Singapore; SK,Slovak Republic; SI,Slovenia; SB,Solomon Islands; SO,Somalia; ZA,South Africa; SU,Soviet Union; ES,Spain; LK,Sri Lanka; SH,St. Helena; PM,St. Pierre Miquelon; ST,St. Tome and Principe; KN,St.Kitts Nevis Anguilla; VC,St.Vincent Grenadines; SD,Sudan; SR,Suriname; SJ,Svalbard Jan Mayen Is; SZ,Swaziland; SE,Sweden; CH,Switzerland; SY,Syria; TJ,Tadjikistan; TW,Taiwan; TZ,Tanzania; TH,Thailand; TG,Togo; TK,Tokelau; TO,Tonga; TT,Trinidad Tobago; TN,Tunisia; TR,Turkey; TM,Turkmenistan; TC,Turks Caicos Islands; TV,Tuvalu; UG,Uganda; UA,Ukraine; AE,United Arab Emirates; UK,United Kingdom; US,United States; UY,Uruguay; UM,US Minor outlying Isl.; UZ,Uzbekistan; VU,Vanuatu; VA,Vatican City State; VE,Venezuela; VN,Vietnam; VG,Virgin Islands (British); VI,Virgin Islands (US); WF,Wallis Futuna Islands; EH,Western Sahara; YE,Yemen; YU,Yugoslavia; ZR,Zaire; ZM,Zambia; ZW,Zimbabwe; At 16:22 04/06/02, you wrote: Apologies for being slightly OT, but has anyone got an array or list of countries that I can use to populate a pull-down menu? Or maybe a link to a resource to find this sort of stuff? Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] countries
On Tue, Jun 04, 2002 at 09:52:23PM +0200, Michael Cronström wrote: TP,East Timor; The ISO met in May and changed this code to TL --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] finding colors in gif files
sorry- last mail i forgot the gif file, here it is though: also the complete code i got so far: ?php echo table width=600 border=1 wraptrtd; $filetext1 = implode(,(file(vcd_1.gif))); // $filetext1 = bin2hex($filetext1); $newfiletext1 = ; for ($i = 0; $i strlen($filetext1); $i++) { $currchar = substr($filetext1, $i, 8); $newfiletext1 .= $currchar .= ; } echo $newfiletext1; echo /td/tr/table; ? begin 666 vcd_1.gif M1TE.#EAZ `@`*(``/\S9OW]_5)24C(R,O___P```'Y! $```0` M+ #H` ```/G+#_C#*2:N]..O-P^$XHUD:9YHJB[!0(1K+,]T';?N M*]I\[_\R7$X'+!J/2(AP2$PZGU#5DMF,6J_8R91:S7J_SRVWRZ;;(Q^QN ME]+JM7M.K\#C\KI^?\?G]X!L?7Y_@899X2%AXQ.B8J+C9(_CY1DY@SE9:7 MF9XGFYR=GZ0H:*CI:IV`ZVNK[N`B^TM;:W.ZNZZSM[_ N;O#%+W Q[_ MQ,L-QLC/MK,Q,[0UC#3S-77UM+9I-OW=^ZX+CY.QZ[^Y^?Z8;F[]?Q 4\GKT]CXC*'N^^#U:[0)(+ $`#L` ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP as HTML
Hey there- I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. any suggestions would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP as HTML
AddType application/x-httpd-php .html AddType application/x-httpd-php .htm - Original Message - From: Tom Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 2:41 PM Subject: [PHP] PHP as HTML Hey there- I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. any suggestions would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems with attachment to email for mail() function
have a form where user uploads attachment and provides email address and a brief note regarding the attachment. The below script should grab all that and email the note with the attachment to our target user. Email appears with text portion and attachment icon, but no attachment (Outlook 2000). In viewing the email prior to delivery to the client, it appears to be formatted correctly. The following is the email script, and below that the headers from the email. if \n is replaced with \r\n then no attachment flag appears, otherwise same problem help or insight appreciated. Dave php file code ?php # $from, $to, $body, and $attachment are provided in the previous form $sig = \n--\nWebsite Mailer\n; $body .= $sig; $headers = From: $from\n; $boundary = =WSM. . md5(uniqid(time())) . =; $headers .= MIME-Version: 1.0\n; $headers .= Content-Type: multipart/mixed;\n\tboundary=\$boundary\\n\n; $str = --$boundary\n; $str .= Content-Type: text/plain;\n\tcharset=\us-ascii\\n; $str .= Content-Transfer-Encoding: 7bit\n\n; $str .= $body\n\n; $fp = fopen($attachment, rb); $data = fread($fp, filesize($attachment)); $data = chunk_split(base64_encode($data),76,\n); fclose($fp); $str .= --$boundary\n; $str .= Content-Type: .$attachment_type.;\n\tname=\.$attachment_name . \\n; $str .= Content-Transfer-Encoding: base64\n; $str .= Content-Disposition: attachment; \n\tfilename=\.$attachment_name . \\n\n; $str .= $data; $str .= --$boundary--\n; $body = $str; if(mail($to, $subject, $body, $headers)){ $status.='brSuccessfully sent.'; }else{ $status.='brAn error occurred while sending.'; } ? email header info Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Received: (qmail 96549 invoked by uid 81); 4 Jun 2002 21:45:49 - Date: 4 Jun 2002 21:45:49 - Message-ID: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [EMAIL PROTECTED] From: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary==WSM.38ef75d9c66623ee87e302bad63e79b3= --=WSM.38ef75d9c66623ee87e302bad63e79b3= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit test test test -- Website Mailer --=WSM.38ef75d9c66623ee87e302bad63e79b3= Content-Type: application/octet-stream; name=FixKlez.com Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=FixKlez.com TVqQAAME//8AALgAQAAA +A4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1v ZGUuDQ0KJABo6XodLIgUTiyIFE4siBROV5QYTi+IFE5Dlx9OJogUTq+UGk43iBROQ5ce TluIFE5VqR9OHogUTiyIFU6GiRROTpcHTj2IFE4siBROJIgUTiqrH04oiBRO644STi2IFE5SaWNo LIgUTgBQRQAATAEDAL9J4zwAAOAADwELAQYAABACAAAg clipped DBt6MUOTCWeZFsi39DQGvapqsVo/VLIKnbrS15vO5+7fIzhl+Kjhha8azcbokj7NTTK6cF6Dy8Qn 4LceXyJzQT9bstNNJJT56sz9XJ8lzOFwcv/hpgK2f3QNPSrjU7PKYlerj0kSUpE9DZJqpi+stPFm GKrmkNx1Pzv1jBXgMX+r4g7Jz5dnbpgg3tAZMTHHROCAyWsW1JWeaZ6zFSh+7zFodgkbOjZ7hKUy nAXiZ0/Z+I+w4fmUwZuJ9kjixNM6MHWSTzVXrBG5XCLm6mEcSGThGP4BUA5wN54K2ace0SA0r9x/ PsT0J3BGtQ== --=WSM.38ef75d9c66623ee87e302bad63e79b3=-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP as HTML
Tom Ray [EMAIL PROTECTED] wrote: I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. Assuming you're using the module version, add this into your .htaccess file: AddType application/x-httpd-php .html -- Richard Heyes ___ This mail sent using V-webmail - http://www.v-webmail.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] General IIS Implementation Question
Hi There! I'm running wink2 with php and apache, I've found no problems with this and have not had any issues that have found their way to the surface yet I did try running php IIS on here how ever I found that IIS (for some reason ... most likely me) was cutting out at a maximum of 10 connections at the one time ... this is why I've gone with apache on my win 2k and also I've found apache easier to configure than ISS. I will leave it with this ... in the end it comes down to which one you feel more comfortable using. Cheers P -Original Message- From: Dennis Moore [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 5 June 2002 5:17 AM To: [EMAIL PROTECTED] Subject: [PHP] General IIS Implementation Question I have written an PHP application using LAMP. However, I have a client who wants me to install the application on his Win2K server. My application uses PHP sessions with trans-SID enabled. I remember reading on this list where people were having problems getting PHP on Windows to work. I do not remember what the issues were. My biggest question is it best to use IIS or Apache on the windows machine. What are the pros and cons of each.Any input or opinions would be welcome. /dkm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] resolution
is it possible to check the visitors's resolution with php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] resolution
I think this was asked recently by someone else You need to use javascript/vbscript to grab the dimensions then pass it to php php is server side and doesn't know anything about the client unless it's told about it HTH Martin -Original Message- From: Doron [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 7:02 AM To: [EMAIL PROTECTED] Subject: [PHP] resolution is it possible to check the visitors's resolution with php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP as HTML
I tried this, and it just prompts me to download the file from the server. I can't see what the issue is. - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 5:35 PM Subject: Re: [PHP] PHP as HTML AddType application/x-httpd-php .html AddType application/x-httpd-php .htm - Original Message - From: Tom Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 2:41 PM Subject: [PHP] PHP as HTML Hey there- I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. any suggestions would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating pop-up window and passing variable to it?
How can I create a pop up window in my index.php (for example) when user clicks on the link and pass value of the variable from my index.php to this new window?
RE: [PHP] Creating pop-up window and passing variable to it?
script function myopen() { window.open(foobar.html?var1=?= $var1; ?var2=?= $var2; ?); } /script a href=javascript:myopen();click for new window/a -Original Message- From: Igor Portnoy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Creating pop-up window and passing variable to it? How can I create a pop up window in my index.php (for example) when user clicks on the link and pass value of the variable from my index.php to this new window? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP as HTML
Tom, this does work fine... doing what Kevin says... ie the AddType application/x-httpd-php .html AddType application/x-httpd-php .htm is PHP installed as a module or cgi ver? Cheers -Original Message- From: Tom Ray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 5 June 2002 9:49 AM To: Kevin Stone; [EMAIL PROTECTED] Subject: Re: [PHP] PHP as HTML I tried this, and it just prompts me to download the file from the server. I can't see what the issue is. - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 5:35 PM Subject: Re: [PHP] PHP as HTML AddType application/x-httpd-php .html AddType application/x-httpd-php .htm - Original Message - From: Tom Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 2:41 PM Subject: [PHP] PHP as HTML Hey there- I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. any suggestions would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: [PHP] Creating pop-up window and passing variable toit?
Couldn't you also do: a href=foobar.php?var1=1var2=2 target=_blankLink/a I think you can subsitute Resource Window for _blank and get the same effect. HTH Jason Soza - Original Message - From: Martin Towell [EMAIL PROTECTED] Date: Tuesday, June 4, 2002 3:55 pm Subject: RE: [PHP] Creating pop-up window and passing variable to it? script function myopen() { window.open(foobar.html?var1=?= $var1; ?var2=?= $var2; ?); } /script click for new window -Original Message- From: Igor Portnoy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Creating pop-up window and passing variable to it? How can I create a pop up window in my index.php (for example) when user clicks on the link and pass value of the variable from my index.php to this new window? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: RE: [PHP] Creating pop-up window and passing variable to it?
Depends if you want to have more control over the window that gets open If you don't mind what the window looks like, use the method Jason mentioned. If you want to set the size or turn on/off the status bar/tool bar/etc (to name a few) then use the javascript version -Original Message- From: Jason Soza [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 10:19 AM To: [EMAIL PROTECTED] Cc: 'Igor Portnoy' Subject: Re: RE: [PHP] Creating pop-up window and passing variable to it? Couldn't you also do: a href=foobar.php?var1=1var2=2 target=_blankLink/a I think you can subsitute Resource Window for _blank and get the same effect. HTH Jason Soza - Original Message - From: Martin Towell [EMAIL PROTECTED] Date: Tuesday, June 4, 2002 3:55 pm Subject: RE: [PHP] Creating pop-up window and passing variable to it? script function myopen() { window.open(foobar.html?var1=?= $var1; ?var2=?= $var2; ?); } /script click for new window -Original Message- From: Igor Portnoy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Creating pop-up window and passing variable to it? How can I create a pop up window in my index.php (for example) when user clicks on the link and pass value of the variable from my index.php to this new window? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] countries
Thanks! I found another one (minus two char codes)... but this looks more comprehensive. Justin on 05/06/02 5:52 AM, Michael Cronström ([EMAIL PROTECTED]) wrote: What about this? Michael Cronstrom Web Inventor AF,Afghanistan; AL,Albania; DZ,Algeria; AS,American Samoa; AD,Andorra; AO,Angola; AI,Anguilla; AQ,Antarctica; AG,Antigua and Barbuda; AR,Argentina; AM,Armenia; AW,Aruba; AU,Australia; AT,Austria; AZ,Azerbaidjan; BS,Bahamas; BH,Bahrain; BD,Banglades; BB,Barbados; BY,Belarus; BE,Belgium; BZ,Belize; BJ,Benin; BM,Bermuda; BO,Bolivia; BA,Bosnia-Herzegovina; BW,Botswana; BV,Bouvet Island; BR,Brazil; IO,British Indian O. Terr.; BN,Brunei Darussalam; BG,Bulgaria; BF,Burkina Faso; BI,Burundi; BT,Buthan; KH,Cambodia; CM,Cameroon; CA,Canada; CV,Cape Verde; KY,Cayman Islands; CF,Central African Rep.; TD,Chad; CL,Chile; CN,China; CX,Christmas Island; CC,Cocos (Keeling) Isl.; CO,Colombia; KM,Comoros; CG,Congo; CK,Cook Islands; CR,Costa Rica; HR,Croatia; CU,Cuba; CY,Cyprus; CZ,Czech Republic; CS,Czechoslovakia; DK,Denmark; DJ,Djibouti; DM,Dominica; DO,Dominican Republic; TP,East Timor; EC,Ecuador; EG,Egypt; SV,El Salvador; GQ,Equatorial Guinea; EE,Estonia; ET,Ethiopia; FK,Falkland Isl.(UK); FO,Faroe Islands; FJ,Fiji; FI,Finland; FR,France; FX,France (European Ter.); TF,French Southern Terr.; GA,Gabon; GM,Gambia; GE,Georgia; DE,Germany; GH,Ghana; GI,Gibraltar; GB,Great Britain (UK); GR,Greece; GL,Greenland; GD,Grenada; GP,Guadeloupe (Fr.); GU,Guam (US); GT,Guatemala; GN,Guinea; GW,Guinea Bissau; GY,Guyana; GF,Guyana (Fr.); HT,Haiti; HM,Heard McDonald Isl.; HN,Honduras; HK,Hong Kong; HU,Hungary; IS,Iceland; IN,India; ID,Indonesia; IR,Iran; IQ,Iraq; IE,Ireland; IL,Israel; IT,Italy; CI,Ivory Coast; JM,Jamaica; JP,Japan; JO,Jordan; KZ,Kazachstan; KE,Kenya; KG,Kirgistan; KI,Kiribati; KP,Korea (North); KR,Korea (South); KW,Kuwait; LA,Laos; LV,Latvia; LB,Lebanon; LS,Lesotho; LR,Liberia; LY,Libya; LI,Liechtenstein; LT,Lithuania; LU,Luxembourg; MO,Macau; MG,Madagascar; MW,Malawi; MY,Malaysia; MV,Maldives; ML,Mali; MT,Malta; MH,Marshall Islands; MQ,Martinique (Fr.); MR,Mauritania; MU,Mauritius; MX,Mexico; FM,Micronesia; MD,Moldavia; MC,Monaco; MN,Mongolia; MS,Montserrat; MA,Morocco; MZ,Mozambique; MM,Myanmar; NA,Namibia; NR,Nauru; NP,Nepal; AN,Netherland Antilles; NL,Netherlands; NT,Neutral Zone; NC,New Caledonia (Fr.); NZ,New Zealand; NI,Nicaragua; NE,Niger; NG,Nigeria; NU,Niue; NF,Norfolk Island; MP,Northern Mariana Isl.; NO,Norway; OM,Oman; PK,Pakistan; PW,Palau; PA,Panama; PG,Papua New; PY,Paraguay; PE,Peru; PH,Philippines; PN,Pitcairn; PL,Poland; PF,Polynesia (Fr.); PT,Portugal; PR,Puerto Rico (US); QA,Qatar; RE,Reunion (Fr.); RO,Romania; RU,Russian Federation; RW,Rwanda; LC,Saint Lucia; WS,Samoa; SM,San Marino; SA,Saudi Arabia; SN,Senegal; SC,Seychelles; SL,Sierra Leone; SG,Singapore; SK,Slovak Republic; SI,Slovenia; SB,Solomon Islands; SO,Somalia; ZA,South Africa; SU,Soviet Union; ES,Spain; LK,Sri Lanka; SH,St. Helena; PM,St. Pierre Miquelon; ST,St. Tome and Principe; KN,St.Kitts Nevis Anguilla; VC,St.Vincent Grenadines; SD,Sudan; SR,Suriname; SJ,Svalbard Jan Mayen Is; SZ,Swaziland; SE,Sweden; CH,Switzerland; SY,Syria; TJ,Tadjikistan; TW,Taiwan; TZ,Tanzania; TH,Thailand; TG,Togo; TK,Tokelau; TO,Tonga; TT,Trinidad Tobago; TN,Tunisia; TR,Turkey; TM,Turkmenistan; TC,Turks Caicos Islands; TV,Tuvalu; UG,Uganda; UA,Ukraine; AE,United Arab Emirates; UK,United Kingdom; US,United States; UY,Uruguay; UM,US Minor outlying Isl.; UZ,Uzbekistan; VU,Vanuatu; VA,Vatican City State; VE,Venezuela; VN,Vietnam; VG,Virgin Islands (British); VI,Virgin Islands (US); WF,Wallis Futuna Islands; EH,Western Sahara; YE,Yemen; YU,Yugoslavia; ZR,Zaire; ZM,Zambia; ZW,Zimbabwe; At 16:22 04/06/02, you wrote: Apologies for being slightly OT, but has anyone got an array or list of countries that I can use to populate a pull-down menu? Or maybe a link to a resource to find this sort of stuff? Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] countries
Why not go to the source? http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html -- Eugene Lee [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] User Authentication
Hey guys, What is the best way for user authentication (now i'm talking about the most secure and easiest way). Now i've been using sessions, and i was wondering if cookies were better and easier... any thoughts? thanks, Jule -- Jule Slootbeek [EMAIL PROTECTED] http://blindtheory.cjb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] User Authentication
Sessions use cookies as it is...so what do you really want to do...what do you want to protect? ---John Holmes... -Original Message- From: Jule Slootbeek [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 9:49 PM To: php-general Subject: [PHP] User Authentication Hey guys, What is the best way for user authentication (now i'm talking about the most secure and easiest way). Now i've been using sessions, and i was wondering if cookies were better and easier... any thoughts? thanks, Jule -- Jule Slootbeek [EMAIL PROTECTED] http://blindtheory.cjb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] User Authentication
I wouldnt rely on cookies or standard sessions (which use cookies) as a means of security. You can use sessions, but make sure you have the ini_alter(session.use_cookies, 0); so that no cookies are used for the session id. This means you'll have to pass the session id in the querystring or post of each page. Regards Jarrad Kabral -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 5 June 2002 11:48 AM To: [EMAIL PROTECTED]; 'php-general' Subject: RE: [PHP] User Authentication Sessions use cookies as it is...so what do you really want to do...what do you want to protect? ---John Holmes... -Original Message- From: Jule Slootbeek [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 9:49 PM To: php-general Subject: [PHP] User Authentication Hey guys, What is the best way for user authentication (now i'm talking about the most secure and easiest way). Now i've been using sessions, and i was wondering if cookies were better and easier... any thoughts? thanks, Jule -- Jule Slootbeek [EMAIL PROTECTED] http://blindtheory.cjb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User Authentication
John Holmes wrote: Sessions use cookies as it is...so what do you really want to do...what do you want to protect? ---John Holmes... Oh ok, that explains it then... Well thanks for the info anyway. I was basically just wondering which method was reccommended.. Jule -- Jule Slootbeek [EMAIL PROTECTED] http://blindtheory.cjb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User Authentication
Hi Jule: On Tue, Jun 04, 2002 at 09:48:36PM -0400, Jule Slootbeek wrote: What is the best way for user authentication (now i'm talking about the most secure and easiest way). Now i've been using sessions, and i was wondering if cookies were better and easier... Regardless of what you do, I strongly suggest not using cookies. Not everyone accepts them. I accept them for a very limited number of sites (like my bank). The rest can drop dead. The remaining options are URL query strings and HTTP Authentication. Enjoy, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating pop-up window and passing variable to it?
This is how I do it. I fire a javascript when the link is clicked, which in turn submits a form targetting the page you openned (named of course). function donewpage(){ open window named mywindow submit form targetting mywindow blah blah blah } sorry to be so brief but the hockey game is on. w0ot! Igor Portnoy wrote: How can I create a pop up window in my index.php (for example) when user clicks on the link and pass value of the variable from my index.php to this new window? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] error handler
I got an error handler setup, and Im using trigger_error() to do certain things. function errorhandler($type, $msg, $file, $line) { switch ($type) { /* case E_NOTICE: $exit = FALSE; break; */ case E_USER_WARNING: pretty_error_display($msg); $exit = TRUE; break; case E_USER_ERROR: error_display($msg); break; default: return; } $date = date('D, M d Y H:i:s'); $msg = sprintf([%s]: %s in %s on line %d\n, $date, $msg, $file, $line); $test = error_log($msg, 3, './error/error.log'); if ($exit === TRUE) exit; } When I trigger and error with E_USER_ERROR, it executes error_display() but it continues to display the rest of the content for the page. I thought E_USER_ERROR stops execution of the script. Thanks for any input. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] install php as CGI?
how can i install php as CGI? Brian Feliciano EMC-Tech I know that there are people in this world who do not love their fellow man, and I hate people like that. - Tom Lehrer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] findin colors in gif files
hi you will need to find the hex values for each individual number which i think should be (without the hash) 76763636 Tom At 05:06 PM 5/06/2002, johannes reichardt wrote: hi everybody, i am new to this list php and i have a big question that i would love to be answered ;) i have a small gif file that has a part in #ff3366 colored - so what i thought is to do a mean hack for my website: instead of opening all images in a graphicseditor and change the color manually i could look up for that color (ff3366) in the image files and replace it with something else, unfortunatly i got stuck with this approach pretty soon. here is my problem: if i open the gif file in php (its attached to this mail) and convert it to hex: $filetext1 = implode(,(file(vcd_1.gif))); $filetext1 = bin2hex($filetext1); } like this i get a string that looks like hex - but i cant find my ff3366 anymore, did i miss something really obvious? if i look up the gif file with an hexeditor (i use textpad) i can see it - with php its not findable any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP as HTML
you know, that's a good question. How would I determine that on the server? Peter wrote: Tom, this does work fine... doing what Kevin says... ie the AddType application/x-httpd-php .html AddType application/x-httpd-php .htm is PHP installed as a module or cgi ver? Cheers -Original Message- From: Tom Ray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 5 June 2002 9:49 AM To: Kevin Stone; [EMAIL PROTECTED] Subject: Re: [PHP] PHP as HTML I tried this, and it just prompts me to download the file from the server. I can't see what the issue is. - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 5:35 PM Subject: Re: [PHP] PHP as HTML AddType application/x-httpd-php .html AddType application/x-httpd-php .htm - Original Message - From: Tom Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 2:41 PM Subject: [PHP] PHP as HTML Hey there- I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. any suggestions would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] install php as CGI?
./configure --prefix=/rstc/user1/erc/pushkar/php-4.0.6 --with-regex=system --enable-discard-path --enable-dbase Actually you just need one --enable-discard-path for security reasons, others are customized for my use and yes prefix is also a must. how can i install php as CGI? Brian Feliciano EMC-Tech I know that there are people in this world who do not love their fellow man, and I hate people like that. - Tom Lehrer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -Pushkar S. Pradhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP as HTML
If you do a phpinfo() you get a columen Server API, mine lists CGI as it is what I installed php as. you know, that's a good question. How would I determine that on the server? Peter wrote: Tom, this does work fine... doing what Kevin says... ie the AddType application/x-httpd-php .html AddType application/x-httpd-php .htm is PHP installed as a module or cgi ver? Cheers -Original Message- From: Tom Ray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 5 June 2002 9:49 AM To: Kevin Stone; [EMAIL PROTECTED] Subject: Re: [PHP] PHP as HTML I tried this, and it just prompts me to download the file from the server. I can't see what the issue is. - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 5:35 PM Subject: Re: [PHP] PHP as HTML AddType application/x-httpd-php .html AddType application/x-httpd-php .htm - Original Message - From: Tom Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 2:41 PM Subject: [PHP] PHP as HTML Hey there- I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. any suggestions would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -Pushkar S. Pradhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing variable to the next page
Here is scenario that I am working on but have a problem. I have 10 thumbnail images on the page with information for them created from database. For example: + + + Some Image + + + Name of Image: Blah Author of Image: Blah (I am pulling more info about that image from database, but on this page I only display Name of Image and Author of image, the rest of the info is stored in variables.) I want my users to click on the thumbnail. When they do I want a new window to open and I want information for that particular image that they clicked (along with other info that stored in variables for the same image) to be passed to that new opened page. How can I pass information about that particular image to the new page? Any ideas? Please Help.
Re: [PHP] Passing variable to the next page
Tag the variables onto the url: http://mysite.com/newpage.php?firstvar=somevaluesecondvar=othervalue;. for arrays ?layer[]=alayer[]=blayer[]=c. or use sessions. Here is scenario that I am working on but have a problem. I have 10 thumbnail images on the page with information for them created from database. For example: + + + Some Image + + + Name of Image: Blah Author of Image: Blah (I am pulling more info about that image from database, but on this page I only display Name of Image and Author of image, the rest of the info is stored in variables.) I want my users to click on the thumbnail. When they do I want a new window to open and I want information for that particular image that they clicked (along with other info that stored in variables for the same image) to be passed to that new opened page. How can I pass information about that particular image to the new page? Any ideas? Please Help. -Pushkar S. Pradhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Passing variable to the next page
Here is scenario that I am working on but have a problem. I have 10 thumbnail images on the page with information for them created from database. (I am pulling more info about that image from database, but on this page I only display Name of Image and Author of image, the rest of the info is stored in variables.) I want my users to click on the thumbnail. When they do I want a new window to open and I want information for that particular image that they clicked (along with other info that stored in variables for the same image) to be passed to that new opened page. How can I pass information about that particular image to the new page? Any ideas? Speaking personally, I'd only extract the data you actually need to display - it will lower your overheads (even if just a little) and you won't be in a situation where you have to keep data around on the off-chance that they click the thumbnail for more info. Then if they do click the thumbnail get the data you need from the database. In this scenario about the only thing you'd need to pass your new page would be the ID number from the database - then just do a query for what you need on the new page. The more images you're dealing with, and the more information you extract per image, the more effective this will be at saving you overheads. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP as HTML
Thanks. I got the issue figured out. There was an .htaccess file in the root of the website that I had forgotten about, it was affecting everything due to it's bad config. Pushkar Pradhan wrote: If you do a phpinfo() you get a columen Server API, mine lists CGI as it is what I installed php as. you know, that's a good question. How would I determine that on the server? Peter wrote: Tom, this does work fine... doing what Kevin says... ie the AddType application/x-httpd-php .html AddType application/x-httpd-php .htm is PHP installed as a module or cgi ver? Cheers -Original Message- From: Tom Ray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 5 June 2002 9:49 AM To: Kevin Stone; [EMAIL PROTECTED] Subject: Re: [PHP] PHP as HTML I tried this, and it just prompts me to download the file from the server. I can't see what the issue is. - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 5:35 PM Subject: Re: [PHP] PHP as HTML AddType application/x-httpd-php .html AddType application/x-httpd-php .htm - Original Message - From: Tom Ray [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 2:41 PM Subject: [PHP] PHP as HTML Hey there- I'm trying to use an .htaccess file to parse .php files as .html does anyone know how to do this? It doesn't work with the same structure as parsing the .shtml files. any suggestions would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -Pushkar S. Pradhan
[PHP] Retrieving Info from Cookies
I've been playing with cookies, and I've been able to write information to a cookie, but now what I want to do is pull that information from the cookie. Is there something special I need to do to pull that info or should I just be to get that data by delcaring a variable in the php script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookies?
Dear PHP-People: Anybody knows why when I configure in my Explorer that uses a proxy, the value of the cookie that I has set with setcookie(...) is lost. When I disable the proxy, the cookie value is remained. Anybody has had the same problem? Thanks a lot. Emiliano Marmonti
[PHP] Apache+PHP+mod_perl configures ok, but Apache won't build
Scenario: Red Hat Linux 7.3 minimal install (no X, no daemons except the bare essentials) Apache 1.3.24 source PHP 4.2.1 source mod_perl 1.26 source Steps taken: 1. /opt/src/apache_1.3.24/configure --with-layout=RedHat 2. /opt/src/mod_perl-1.26/perl Makefile.PL EVERYTHING=1 USE_APACI=1 3. /opt/src/mod_perl-1.26/make 4. /opt/src/mod_perl-1.26/make install 5. /opt/src/php-4.2.1/configure --with-apache=../apache_1.3.24 --with-mysql=/us r --enable-track-vars --enable-versioning --enable-bcmath --with-gd=/usr/loc al/gd-1.8.4 --enable-ftp 6. /opt/src/php-4.2.1/make 7. /opt/src/php-4.2.1/make install 8. /opt/src/apache_1.3.24/configure --with-layout=RedHat --enable-module=rewrit e --enable-module=info --enable-module=expires --enable-module=unique_id --e nable-suexec --suexec-caller=www --suexec-docroot=/www --activate-module=src /modules/perl/libperl.a --enable-module=include --activate-module=src/module s/php4/libphp.a ** 9 ** This is where I try to make apache, at this point, it builds for a while and returns this error: - a - Table.o : libperl.a === src/modules/perl === src/modules/php4 gcc -c -I../.. -I/usr/lib/perl5/5.6.1/i386-linux/CORE -I../../os/unix -I../. ./include -DLINUX=22 -I/usr/include/db1 -DMOD_PERL -DUSE_PERL_SSI -fno-str ict-aliasing -I/usr/local/include -DUSE_HSREGEX -DNO_DL_NEEDED `../../apaci` mod_php4.c mod_php4.c:28:18: zend.h: No such file or directory mod_php4.c:29:17: php.h: No such file or directory mod_php4.c:30:27: php_variables.h: No such file or directory mod_php4.c:47:21: php_ini.h: No such file or directory mod_php4.c:48:25: php_globals.h: No such file or directory mod_php4.c:49:18: SAPI.h: No such file or directory mod_php4.c:50:22: php_main.h: No such file or directory mod_php4.c:52:26: zend_compile.h: No such file or directory mod_php4.c:53:26: zend_execute.h: No such file or directory mod_php4.c:54:28: zend_highlight.h: No such file or directory mod_php4.c:55:25: zend_indent.h: No such file or directory mod_php4.c:57:39: ext/standard/php_standard.h: No such file or directory make[4]: *** [mod_php4.o] Error 1 make[3]: *** [all] Error 1 make[2]: *** [subdirs] Error 1 make[2]: Leaving directory `/opt/src/apache_1.3.24/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/opt/src/apache_1.3.24' make: *** [build] Error 2 - NOTE: In the above examples, I was in the actual directories, I've just included the directory paths for illustrative purposes only. I have tried removing most of the configuration options from each configure call. I have removed the source directories multiple times and tried again from scratch. I've tried googling for answers but it seems to me many people run into this issue, but no answers are to be found. (just do a search for 'mod_php4.c:50:22: php_main.h: No such file or directory ') I haven't bothered copying the missing files over because most people have had problems later. Where can I begin looking for answers, what modifications must I make? Thank you, Dan
Re: [PHP] Secure File Upload
From: Christoph Starkmann [EMAIL PROTECTED] Hi There! When uploading a file with PHP, AFAIK I can only control what will be stored on the server. So if someone sends me 100 MB, these will be deleted immediately. But, unfortunately, the traffic is produced nevertheless. Is there any way to check the file size before uploading the file or any other way to keep the traffic under a certain limit? Last think I would like to have is a script that disables all uploads after a certain traffic has been produced, I would like to be able to really PREVENT uploads, let's say bigger than 10 MB?! Add this to your HTML form: input type=hidden name=MAX_FILE_SIZE value=1024 HTH -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP.INI Lockdown
Hi All, Is there anyway to lockdown PHP so that only the INI file from C:\WinNT\ is used? Currently, you can place an INI file into the same directory as the php script your viewing through a browser and instead of loading the INI file located in the C:\WinNT\ directory, it will load the INI file that is in the current working directory. Same thing applies to putting the INI file in the directory where the PHP executable is stored. Using the -c dir command line switch forces PHP to check the directory that you've specified for the INI file, however setting up the following in IIS Application Mappings fails to work, although running it from the command line works fine. e:\php\php.exe -c C:\WinNT\ %s %s I've also tried a multitude of variants using 's, forward-slashes, etc. without any luck. Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieving Info from Cookies
when I do that it comes up with Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' Justin French wrote: you should be able to access it via $_COOKIE['name'], or what I do, $cookie = $_COOKIE['name']. Justin French on 05/06/02 2:19 PM, Tom Ray ([EMAIL PROTECTED]) wrote: I've been playing with cookies, and I've been able to write information to a cookie, but now what I want to do is pull that information from the cookie. Is there something special I need to do to pull that info or should I just be to get that data by delcaring a variable in the php script? .
Re: [PHP] Retrieving Info from Cookies
On Wednesday 05 June 2002 13:22, Tom Ray wrote: when I do that it comes up with Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' Justin French wrote: you should be able to access it via $_COOKIE['name'], or what I do, $cookie = $_COOKIE['name']. Justin French on 05/06/02 2:19 PM, Tom Ray ([EMAIL PROTECTED]) wrote: I've been playing with cookies, and I've been able to write information to a cookie, but now what I want to do is pull that information from the cookie. Is there something special I need to do to pull that info or should I just be to get that data by delcaring a variable in the php script? You're probably using it inside a double-quoted string in which case you need to use: echo Cookie is $_COOKIE[name]; -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* It is your destiny. - Darth Vader */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User Authentication
On Wednesday 05 June 2002 10:05, Analysis Solutions wrote: Hi Jule: On Tue, Jun 04, 2002 at 09:48:36PM -0400, Jule Slootbeek wrote: What is the best way for user authentication (now i'm talking about the most secure and easiest way). Now i've been using sessions, and i was wondering if cookies were better and easier... Regardless of what you do, I strongly suggest not using cookies. Not everyone accepts them. I accept them for a very limited number of sites (like my bank). The rest can drop dead. I disagree. If your site has compelling enough content that encouraged the user to register in the first place then I'm pretty sure they won't mind a cookie or two. Just make sure you don't store any sensitive info in the cookie. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Your reasoning is . (fill in the blank) - Russell King on the linux-arm mailing list */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Converting non latin characters
'ð' is an accented 'o' - just like these are: 'ò', 'ó', 'ô', 'õ', 'ö' I've never seen an 'o' accented that why before, so I have no idea how you're meant to pronounce it. But going from Tokyo then I guess it's pronounced oe as in toe I dunno what function (built-in or otherwise) you can use to convert it back to a normal letter. -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 3:31 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Converting non latin characters Hi there, I have a table containing cities of the world. Now I am running into problems because people are starting to complain that some mayor cities are not in the db like Tokyo. After checking my table I discovered that there lots of cities are written with some non latin characters. Tokyo is written like this: Tðkyð Should, and if how, I convert this characters into latin ones. And what happens if somebody from Japan with a different keyboard tries to find Tokyo? Anyway what type of character is this 'ð' anyway? It does not look Japanese to me :-) Thank you for any help on that, Andy http://www.globosapiens.net Global Travellers Network! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Converting non latin characters
Hi there, I have a table containing cities of the world. Now I am running into problems because people are starting to complain that some mayor cities are not in the db like Tokyo. After checking my table I discovered that there lots of cities are written with some non latin characters. Tokyo is written like this: Tðkyð Should, and if how, I convert this characters into latin ones. And what happens if somebody from Japan with a different keyboard tries to find Tokyo? Anyway what type of character is this 'ð' anyway? It does not look Japanese to me :-) Thank you for any help on that, Andy http://www.globosapiens.net Global Travellers Network! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cyber Cafe software
Bret Thanks for the reply. I put that message up on three list (PHP, MySQL, RedHat) and this has been the only reply. There are a lot of software packages that I found searching google.com, but they are all for cyber cafe's that have the computers all ready set up for people to log into. I have found none that would allow someone to bring in their own laptop and be able to just hook it up and also keep track of the time. I was hoping to find one that would run the server on RedHat/PHP/MySQL and do what is needed. The customer is not actually going to be running a regular cyber cafe. But for the things that they want to do, it is pretty much the same thing. I guess they have some clients that travel a lot and want to come in and use their network when they are in town. From what I understand, it is getting pretty annoying but they don't want to tell the people NO. I don't know all of the details about that, I just know that they want it, so I am going to try and get it for them. I have not tried to connect my laptop in an airport yet, but from the way it sounds, that is part of the type of setup that we want. If I can ever figure out how to do this, I will try to post the results to the lists so other people can use it and improve it as they see fit. Thanks Steve At 09:08 PM 6/3/2002 -0500, Bret Hughes wrote: On Mon, 3 Jun 2002, Steve Buehler wrote: Does anybody know of any software all ready written or what would have to be done, to allow us to run a cyber cafe style setup. What we need the software to do is to allow someone to come in and plug in their computer to our network (actually a customers network). They want the following: 1. A customer comes in and signs up starting a clock so they could charge the customer for the time. 2. They want it to work for wired or wireless networks. So when they sign in, it would either have to set their IP address on their machine automatically, or we would have to give them an IP address to put in to their system. 3. It would have to send a report once a day to an email address (or multiple email addresses) with the days summary of time used and amount of money made. 4. A regular customer could come in and use the same login each time so that they could track everything over long periods of time, on a per customer basis. They might want to give discounts to these people and/or give away free stuff. Kind of likefor every minute someone has been on, they get one credit point. Those credit points can be used for purchasing extra time, or other products in the business. Now, if it is kept in a mysql database, than that would not be hard to pull. I know that there are cyber cafe's out there now, so I am assuming that I should not have to reinvent the wheel for this software. If not, how would somebody go about setting this up. Basically, if I could get it set up so that ALL IP addresses on the local network are not allowed in unless they sign in first, than what file would it have to put that IP address in and what would have to be restarted to allow that customer access? Preferably, I would like the program to work with RedHat Linux, PHP and MySQL. Thanks In Advance Steve Buehler Steve I am sitting in a cyber cafe right now in Las Vegas, and no inspite of what the reservations people tell you there is no highspeed internet connectivity in the Flamingo Hilton. Pisses me off but I will leave that for tomorrow. Any way I have used these types of thing occationally while traveling probably 3 or four times but have yet to see anyone do this cleverly. It is usually writting your name on a peice of paper with the time and then paying as you leave. However If I was going to try to do this I would probably start with a simple php generated html form that everyone should be able to use and have them obtain an address via dhcp but have the firewall setup to block all outgoing except for those that have logged in vi the php page. THe phph script would of course have the ipaddress since that is part of the http packet and could then build a FW rule that would allow the machine to hit the net. Then logging off via the same page would then kill the rule and tell them how much they owe. I don't know what happens when the shut down the machine without logging off but I am sure some business pratice could be put in place mabye a $2 stupid charge. If you wanted to get real fancy , I guess the php page could take a credit card and bill them automatically after verifying of course. Now, having said all that I have not seen this anywhere but would start as you have asking qestions and probably googling and freshmeat. Bret ___ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list -- This message has been scanned for viruses and dangerous content by
Re: [PHP] Cronjob security
If you go to the URL I receive a mail telling me if anybody of my DB has birthday. Nothing special. Thanks! Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sire: ... but I've read it is un-secure. Is this true? Depends. What happens if I go to that URI and try to run the script? If it would cause problems, then yes, it's insecure. If it doesn't matter, than no, it's not. So, what would happen if I hit your script with my web browser? --Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bot?!
Hello! Perhaps you know the programms called Bot, which allows the user to ask questions just by writing it in natural speak or which guides the user in some process. I wonder if there is a (free?) solution of this somewhere in the net. Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] email attachments and PHP
I was wondering if there is a way to attach files to emails sent via a PHP script. I just checked the 'mail functions' chapter of the php manual, but it doesn't seem to mention attachments. The attached files will come from the same server that php is running on BTW. check my reply and homegrown effort to the Probs with MIME multipart/alternative generated with PEAR mime.php thread a little while back. cheers Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] keep alive refresh
thanx for your reply I had already tryed that one but it didn't work. It's not the script which times out but rather the web server (apache), and I can't touch apache configuration. cheers mauro From: John Holmes [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: 'Mauro' [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: RE: [PHP] keep alive refresh Date: Mon, 3 Jun 2002 19:59:42 -0400 Raise the max execution time for your script. Either do it in PHP.ini or I think there is a function for it you can use in your script... ---John Holmes... -Original Message- From: Mauro [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 4:35 PM To: [EMAIL PROTECTED] Subject: [PHP] keep alive refresh Hello, I looked for some old questions about my problem in the m.l. archive but I did not find anything. I'm writing a php script which takes a couple of values from the web interface and then passes these values to a program which writes it's output on a file. Then the output of the file is published on the web page. The problem is that this program may take 1 minute up to 1 hour to write all the output on the file and the browser times out. Any suggestion on how to solve this? Many thanx Mauro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bot?!
And what exactly has this got to do with PHP? - Original Message - From: Martin Thoma [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 3:14 PM Subject: [PHP] Bot?! Hello! Perhaps you know the programms called Bot, which allows the user to ask questions just by writing it in natural speak or which guides the user in some process. I wonder if there is a (free?) solution of this somewhere in the net. Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] File Appended can not be viewed properly in Windows
Some tricky things are happening : Our local network environment : server - Win2K, my computer Win 98 and Linux Red Hat. I have map network drive to Linux and working on File Append / Write programs. I am creating the file in append / write mode. It is getting appended / created properly. But I can not view further changes in the file once I opened it on my system. But changes are appearing on Linux. I am wondering how come I see the changes on Linux and not on Windows once I open to see it (even if I close it). It is not possible for me to go to Linux server and see the changes in file every time. Can anybody help ? Manisha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bot?!
Well, the bot should work on a webpage and obviously php would be the best solution. And what exactly has this got to do with PHP? - Original Message - From: Martin Thoma [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 3:14 PM Subject: [PHP] Bot?! Hello! Perhaps you know the programms called Bot, which allows the user to ask questions just by writing it in natural speak or which guides the user in some process. I wonder if there is a (free?) solution of this somewhere in the net. Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Hex Numbers
You might consider using BCMath Arbitrary Precision Mathematics Functions cid:[EMAIL PROTECTED] Jason Teagle wrote: - Original Message - From: Jonathan Rosenberg [EMAIL PROTECTED] To: Jason Teagle [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, June 03, 2002 3:18 PM Subject: RE: [PHP] Re: PHP Hex Numbers When doing arithmetic in code, you should always be prepared to handle signed and unsigned. Thanks for the reply. I figured something like this was going on. But, how does one become prepared to handle signed unsigned integers? Is PHP consistent regarding signed/unsigned when it does arithmetic on integers? I don't know the answer to that question (yet). What I meant was, we should always be thinking about numbers possibly being negative when treated as signed (which I believe is the default when using numbers for arithmetic), and if necessary account for it. For example, testing if $result 0 would alert us to the fact that it is probably too large for a signed 32-bit integer, and needs special handling. I don't know if PHP supports a larger integer type (64 bits, for example) - if it does, that helps since you can cast to that type to ensure it is added correctly. _ _ o oJason Teagle [EMAIL PROTECTED] v
[PHP] Logic -- conditional statements
Hi to all, I'm trying to echo a neat table with values from a form, depending on the values it echoes a table with one row with two or with three: Then I have conditional nested statements, to validate these variables and wrote the table with the proper values in each case, the problem is the table is displayed 3 times instead of 1 each time it finds a value TRUE! I need it to display only once, I mean in the first instance the table, has 1 row, the second 2 rows, the third 3 rows, and they are independent. The code is something like: //Value1 is always 1 if ($value1 == 0) { exit } if ($value2 ==0) { echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... } if($value2 == 0) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . } if($value3 == 3) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . .td ... $variable9 ... .td ... $variable10... .td ... $variable11 ... .td ... $variable12 ... ./tr . . //and then closes the php script, TIA Regards, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File Appended can not be viewed properly in Windows
On Tuesday 04 June 2002 15:20, Manisha wrote: Some tricky things are happening : But have nothing to do with PHP. Our local network environment : server - Win2K, my computer Win 98 and Linux Red Hat. I have map network drive to Linux and working on File Append / Write programs. Are you sharing a directory on your linux system using Samba? I am creating the file in append / write mode. It is getting appended / created properly. But I can not view further changes in the file once I opened it on my system. But changes are appearing on Linux. I am wondering how come I see the changes on Linux and not on Windows once I open to see it (even if I close it). It is not possible for me to go to Linux server and see the changes in file every time. Can anybody help ? If so see whether changing the oplocks option helps, if it doesn't help, ask on the Samba list. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Humor in the Court: Q: (Showing man picture.) That's you? A: Yes, sir. Q: And you were present when the picture was taken, right? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download Script - Newbie Alert
You can also check $HTTP_REFERER, it's much simpler Marek Clay Loveless wrote: Something else along these lines -- I really, really wish that more sites that use this method would test across multiple browsers and platforms. I agree with everything John is saying regarding testing access/permissions -- I've used this technique many times myself. However, if a user with Internet Explorer on Mac OS X clicks this link: www.domain.dom/file.php?id=23 They'll wind up with a file on their desktop called file.php. Not every browser pays close enough attention to the filename in the Content-Disposition header. Solution? www.domain.com/file.php/23/docname.xls I believe this will run file.php, which can then pull in the $PATH_INFO to determine what file is being requested, check session permissions, etc., can then spit out the right headers as John suggests, AND users will definitely wind up with a downloaded file called docname.xls. If your pages are dynamically generated, you can even do tricks like this to thwart external linking: ?php $bootLeech = date(U) / 2; echo a href=\http://www.domain.com/file.php/23/$bootLeech/docname.xls;download/a ; ? Then in your file.php script, do the following: - explode $PATH_INFO on / - check the $bootLeach array position with the same calculation ... Where you can allow a plus/minus error tolerance of 10 minutes. We use this trick on http://www.imagescentral.com ... Kids frequently want to build Geocities sites that leech all our images. Our image file URLs work *just* long enough for them to build their pages, and test that they look good. 30 hours later, all the leeched images are replaced with Images Central logos. : ) Fun! -Clay From: John Holmes [EMAIL PROTECTED] Organization: U.S. Army Reply-To: [EMAIL PROTECTED] Date: Mon, 3 Jun 2002 20:06:42 -0400 To: 'Philip Hess' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] Download Script - Newbie Alert Store the files above your web root and use a PHP script to control access. Use header to set the appropriate header for the file, header(Content-Type: application/vnd.ms-excel; name='excel'); header(Content-Disposition: attachment; filename= . $filename . .xls); then use passthru() to send the contents of the file. Use a path for passthru that's above the web root. The key to this though, is to do some checking with PHP to make sure the person is authorized to download the file. Simply doing the above will still allow someone to link directly to file.php?id=23 or whatever, and get the contents. Start a session on another page, the one before the download, and then check for the session in this page, before you send the file. If the session doesn't exist (or a certain variable within it) then don't send the file. ---John Holmes... -Original Message- From: Philip Hess [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 6:09 PM To: [EMAIL PROTECTED] Subject: [PHP] Download Script - Newbie Alert Hello, I would like to allow visitors to my site to download documents created with MS office and .PDF files as well. In order to prevent linking from other sites I'd like to make or modify a script that hides the actual location of the files. A pointer in the right direction would be most appreciated. Thanks --- Philip Hess - Pittsburgh, PA USA - Computer Teacher E-mail: pjh_at_zoominternet.net Phil's Place (my web site) http://phil.mav.net/ PA School District Database: http://phil.mav.net/district.hts --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing IPTC tags
Dirk Bonenkamp - Bean IT wrote: Just wanted to know if it's possible to write iptc tags with php, and, if so, how? http://www.php.net/manual/en/function.iptcembed.php Ulf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Download Script - Newbie Alert
That can be spoofed, though, and not all browsers set it, and will not stop anyone from just typing in the URL... http://www.example.com/files/mydoc.doc ---John Holmes... -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 3:58 AM To: PHP Subject: Re: [PHP] Download Script - Newbie Alert You can also check $HTTP_REFERER, it's much simpler Marek Clay Loveless wrote: Something else along these lines -- I really, really wish that more sites that use this method would test across multiple browsers and platforms. I agree with everything John is saying regarding testing access/permissions -- I've used this technique many times myself. However, if a user with Internet Explorer on Mac OS X clicks this link: www.domain.dom/file.php?id=23 They'll wind up with a file on their desktop called file.php. Not every browser pays close enough attention to the filename in the Content-Disposition header. Solution? www.domain.com/file.php/23/docname.xls I believe this will run file.php, which can then pull in the $PATH_INFO to determine what file is being requested, check session permissions, etc., can then spit out the right headers as John suggests, AND users will definitely wind up with a downloaded file called docname.xls. If your pages are dynamically generated, you can even do tricks like this to thwart external linking: ?php $bootLeech = date(U) / 2; echo a href=\http://www.domain.com/file.php/23/$bootLeech/docname.xls;downlo ad /a ; ? Then in your file.php script, do the following: - explode $PATH_INFO on / - check the $bootLeach array position with the same calculation ... Where you can allow a plus/minus error tolerance of 10 minutes. We use this trick on http://www.imagescentral.com ... Kids frequently want to build Geocities sites that leech all our images. Our image file URLs work *just* long enough for them to build their pages, and test that they look good. 30 hours later, all the leeched images are replaced with Images Central logos. : ) Fun! -Clay From: John Holmes [EMAIL PROTECTED] Organization: U.S. Army Reply-To: [EMAIL PROTECTED] Date: Mon, 3 Jun 2002 20:06:42 -0400 To: 'Philip Hess' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] Download Script - Newbie Alert Store the files above your web root and use a PHP script to control access. Use header to set the appropriate header for the file, header(Content-Type: application/vnd.ms-excel; name='excel'); header(Content-Disposition: attachment; filename= . $filename . .xls); then use passthru() to send the contents of the file. Use a path for passthru that's above the web root. The key to this though, is to do some checking with PHP to make sure the person is authorized to download the file. Simply doing the above will still allow someone to link directly to file.php?id=23 or whatever, and get the contents. Start a session on another page, the one before the download, and then check for the session in this page, before you send the file. If the session doesn't exist (or a certain variable within it) then don't send the file. ---John Holmes... -Original Message- From: Philip Hess [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 6:09 PM To: [EMAIL PROTECTED] Subject: [PHP] Download Script - Newbie Alert Hello, I would like to allow visitors to my site to download documents created with MS office and .PDF files as well. In order to prevent linking from other sites I'd like to make or modify a script that hides the actual location of the files. A pointer in the right direction would be most appreciated. Thanks --- Philip Hess - Pittsburgh, PA USA - Computer Teacher E-mail: pjh_at_zoominternet.net Phil's Place (my web site) http://phil.mav.net/ PA School District Database: http://phil.mav.net/district.hts --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cronjob security
You should put a check in your script to see if the mail has already been sent for the day and don't send another if it has. That way someone can't go to the page and hit refresh a bunch of times and cram your inbox full of mails. ---John Holmes... -Original Message- From: Edgard Berendsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 2:14 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Cronjob security If you go to the URL I receive a mail telling me if anybody of my DB has birthday. Nothing special. Thanks! Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sire: ... but I've read it is un-secure. Is this true? Depends. What happens if I go to that URI and try to run the script? If it would cause problems, then yes, it's insecure. If it doesn't matter, than no, it's not. So, what would happen if I hit your script with my web browser? --Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] running php on console
how can i run my php scripts on the command line just like perl scripts? how can i do this on a linux/apache server and windows/iis4 server? any help would be appreciated. thanks in advance.. I know that there are people in this world who do not love their fellow man, and I hate people like that. - Tom Lehrer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Logic -- conditional statements
The problem here is that you have defined three different variables $value1,$value2,$value3. Keep only one variable (say,$valueChk) that can take values 1,2 or 3. Then check for the condition. And there's another mistake in the script, you are checking ---if ($value2 ==0)--- twice, you probably mean to check for $value1 ==1 (for the first of the $value2 ==0 checks). Once you are through with these changes, your script will work perfectly. And if you feel like improving it you need not repeat the td statements. You can merely append the additional rows depending on the value of the variable you set (say, $valueChk). the following isn't the actual script, but mainly the logic. $table=table if($valueChk==0) exit if($valueChk==1) { //.append the first TRTD statement to $table variable $table .= TRTD ; } if($valueChk==2) { //.append the second TRTD statement to $table variable } if($valueChk==3) { //.append the third TRTD statement to $table variable } //now close the table tag and echo the $table variable you'll get the table with the desired number of rows. -Naintara -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of Ricardo Fitzgerald Sent: Friday, July 10, 2893 3:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Logic -- conditional statements Hi to all, I'm trying to echo a neat table with values from a form, depending on the values it echoes a table with one row with two or with three: Then I have conditional nested statements, to validate these variables and wrote the table with the proper values in each case, the problem is the table is displayed 3 times instead of 1 each time it finds a value TRUE! I need it to display only once, I mean in the first instance the table, has 1 row, the second 2 rows, the third 3 rows, and they are independent. The code is something like: //Value1 is always 1 if ($value1 == 0) { exit } if ($value2 ==0) { echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... } if($value2 == 0) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . } if($value3 == 3) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . .td ... $variable9 ... .td ... $variable10... .td ... $variable11 ... .td ... $variable12 ... ./tr . . //and then closes the php script, TIA Regards, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] Logic -- conditional statements
One correction, Ricardo for appending the rows, you will have to change the condition //for 1st row if($valueChk = 1 $valueChk = 3) //for 2nd row if($valueChk = 2 $valueChk = 3) //for 3rd row if($valueChk == 3) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of Naintara Jain Sent: Tuesday, June 04, 2002 2:37 PM To: Ricardo Fitzgerald; [EMAIL PROTECTED] Subject: RE: [PHP] Logic -- conditional statements The problem here is that you have defined three different variables $value1,$value2,$value3. Keep only one variable (say,$valueChk) that can take values 1,2 or 3. Then check for the condition. And there's another mistake in the script, you are checking ---if ($value2 ==0)--- twice, you probably mean to check for $value1 ==1 (for the first of the $value2 ==0 checks). Once you are through with these changes, your script will work perfectly. And if you feel like improving it you need not repeat the td statements. You can merely append the additional rows depending on the value of the variable you set (say, $valueChk). the following isn't the actual script, but mainly the logic. $table=table if($valueChk==0) exit if($valueChk==1) { //.append the first TRTD statement to $table variable $table .= TRTD ; } if($valueChk==2) { //.append the second TRTD statement to $table variable } if($valueChk==3) { //.append the third TRTD statement to $table variable } //now close the table tag and echo the $table variable you'll get the table with the desired number of rows. -Naintara -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of Ricardo Fitzgerald Sent: Friday, July 10, 2893 3:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Logic -- conditional statements Hi to all, I'm trying to echo a neat table with values from a form, depending on the values it echoes a table with one row with two or with three: Then I have conditional nested statements, to validate these variables and wrote the table with the proper values in each case, the problem is the table is displayed 3 times instead of 1 each time it finds a value TRUE! I need it to display only once, I mean in the first instance the table, has 1 row, the second 2 rows, the third 3 rows, and they are independent. The code is something like: //Value1 is always 1 if ($value1 == 0) { exit } if ($value2 ==0) { echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... } if($value2 == 0) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . } if($value3 == 3) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . .td ... $variable9 ... .td ... $variable10... .td ... $variable11 ... .td ... $variable12 ... ./tr . . //and then closes the php script, TIA Regards, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Printing Large Blocks of Text
What is the best way to print large blocks of text within a PHP function? JJ Harrison[EMAIL PROTECTED]www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running php on console
On Tuesday 04 June 2002 16:51, Brian Feliciano wrote: how can i run my php scripts on the command line just like perl scripts? how can i do this on a linux/apache server and windows/iis4 server? You need to compile a CGI (standalone) version of PHP. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Almost anything derogatory you could say about today's software design would be accurate. -- K.E. Iverson */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing Large Blocks of Text
On Tuesday 04 June 2002 17:34, [EMAIL PROTECTED] wrote: What is the best way to print large blocks of text within a PHP function? echo(), print()? Perhaps you can elaborate on what you want to do and what you want to know. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* In Tulsa, Oklahoma, it is against the law to open a soda bottle without the supervision of a licensed engineer. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL - Creating The Database
Sorry if this is an ignorant question, but I want to do one simple thing - create an empty MySQL-type database to upload to the server so I can start using PHP to access it... how can I do this? I don't really want to have to download the whole MySQL product just to create an empty database! If this is impossible, and I have to download MySQL, then any (preferably direct) links for downloading the bare minimum to create a new database (and possibly create tables ready for use) would be most appreciated. Development platform = Win2K Pro I went to www.mysql.com but they seem to require downloading the full server - I don't _need_ the server, only a way to create a DB {:v( _ _ o oJason Teagle [EMAIL PROTECTED] v -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Logic -- conditional statements
Switches come in handy here... Switch($valueChk) { case 1: do_whatever1(); case 2: do_whatever2(); case 3: do_whatever3(); break; } If the variable is 1, then all three functions will be called. I don't remember what the original question was or if this even applies, but it's a better solution than all of the IFs that was just posted... ---John Holmes... -Original Message- From: Naintara Jain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 5:47 PM To: Ricardo Fitzgerald Cc: Php-General@Lists. Php. Net Subject: FW: [PHP] Logic -- conditional statements One correction, Ricardo for appending the rows, you will have to change the condition //for 1st row if($valueChk = 1 $valueChk = 3) //for 2nd row if($valueChk = 2 $valueChk = 3) //for 3rd row if($valueChk == 3) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of Naintara Jain Sent: Tuesday, June 04, 2002 2:37 PM To: Ricardo Fitzgerald; [EMAIL PROTECTED] Subject: RE: [PHP] Logic -- conditional statements The problem here is that you have defined three different variables $value1,$value2,$value3. Keep only one variable (say,$valueChk) that can take values 1,2 or 3. Then check for the condition. And there's another mistake in the script, you are checking ---if ($value2 ==0)--- twice, you probably mean to check for $value1 ==1 (for the first of the $value2 ==0 checks). Once you are through with these changes, your script will work perfectly. And if you feel like improving it you need not repeat the td statements. You can merely append the additional rows depending on the value of the variable you set (say, $valueChk). the following isn't the actual script, but mainly the logic. $table=table if($valueChk==0) exit if($valueChk==1) { //.append the first TRTD statement to $table variable $table .= TRTD ; } if($valueChk==2) { //.append the second TRTD statement to $table variable } if($valueChk==3) { //.append the third TRTD statement to $table variable } //now close the table tag and echo the $table variable you'll get the table with the desired number of rows. -Naintara -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of Ricardo Fitzgerald Sent: Friday, July 10, 2893 3:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Logic -- conditional statements Hi to all, I'm trying to echo a neat table with values from a form, depending on the values it echoes a table with one row with two or with three: Then I have conditional nested statements, to validate these variables and wrote the table with the proper values in each case, the problem is the table is displayed 3 times instead of 1 each time it finds a value TRUE! I need it to display only once, I mean in the first instance the table, has 1 row, the second 2 rows, the third 3 rows, and they are independent. The code is something like: //Value1 is always 1 if ($value1 == 0) { exit } if ($value2 ==0) { echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... } if($value2 == 0) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . } if($value3 == 3) { . . echo // echoes the table . . .td ... $variable1 ... .td ... $variable2... .td ... $variable3 ... .td ... $variable4 ... .tr /next row . .td ... $variable5 ... .td ... $variable6... .td ... $variable7 ... .td ... $variable8 ... ./tr . . .td ... $variable9 ... .td ... $variable10... .td ... $variable11 ... .td ... $variable12 ... ./tr . . //and then closes the php script, TIA Regards, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 05/21/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL - Creating The Database
Sorry if this is an ignorant question, but I want to do one simple thing - create an empty MySQL-type database to upload to the server so I can start using PHP to access it... how can I do this? I don't really want to have to download the whole MySQL product just to create an empty database! Ummm, not sure exactly what you're asking but you can use mysql_query to issue the relevant sql commands to create your database and tables and so on. In cases where I want to package something that kicks off I usually create an install script that looks for the database I need and if it doesn't exist then create it. Obviously if you actually want to test code on your development box then you're going to need an actual sql server to do it. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL - Creating The Database
- Original Message - From: David Freeman [EMAIL PROTECTED] To: 'PHP Mailing List' [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 11:50 AM Subject: RE: [PHP] MySQL - Creating The Database Ummm, not sure exactly what you're asking but you can use mysql_query to issue the relevant sql commands to create your database and tables and Am I correct in saying that none of the SQL functions in PHP can actually create a database file when no file existed before? In other words, an empty database file must exist before SQL functions can be called on it? so on. In cases where I want to package something that kicks off I usually create an install script that looks for the database I need and if it doesn't exist then create it. This is the problem - how _do_ you create it? What does your install script do? Copy a blank template of a DB from a file in your installation package, or literally create a new file? I have no existing databases to work with... (what's the file extension for a MySQL-type database anyway [i.e., MS Access = .MDB, MySQL = ?] ?) Obviously if you actually want to test code on your development box then you're going to need an actual sql server to do it. That's no problem for me - I'm testing directly on the (remote) host anyway. Better to test where it's going to be finally then get it all working perfectly here and find it doesn't work there {:v) _ _ o oJason Teagle [EMAIL PROTECTED] v -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php