[PHP] Refresh PHP
Hi people! Did anyone get this situation? I'm creating a Site that uses 3 session variables. One of them I always print at the top of the page, it's the name of the user. There is a link that calls the function session_destroy(). Everytime that I follow this link and log in with another user, that session variable printed doesn't change, but if I press F5 in IE or Netscape them it brings the right user. I can't make the page return the current user login, it always came with the last user logged. I tried to add some headers to set no cache in all php pages, but it doesn't work. Anyone can help me??? Thanks PS: Sorry about my poor english... Maurício Valente -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Refresh PHP
Hello Ralph, Actually, after calling session_destroy() I reset those variables assigning an empty value like you said. But it still doesn't work. I did a test after destroying session variables, printing them. They are empty. Another weird thing is that when a login as "joao" them logoff, exclude IE cache, going in Tools >> Internet Option..., and login again with another user, this way the variable are printed correctly. It happens in any windows version (95,98,ME,2K,XP) using IE 6.0 and Netscape 7. - Original Message - From: "Ralph Guzman" <[EMAIL PROTECTED]> To: "'Mauricio'" <[EMAIL PROTECTED]> Sent: Tuesday, July 08, 2003 2:11 PM Subject: RE: [PHP] Refresh PHP > Rather than using session_destroy() reset the session variable by > assigning it an empty value. For example, lets say your url looks > something like this: > > http://www.mydomain.com/?url_variable=Mauricio > > then do the following: > > if($_GET['url_variable'] != $url_variable){ >$url_variable = ""; >session_register('url_variable') > } > > > -Original Message- > From: Mauricio [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 08, 2003 7:02 AM > To: PHP > Subject: [PHP] Refresh PHP > > Hi people! > > Did anyone get this situation? > > I'm creating a Site that uses 3 session variables. One of them I always > print at the top of the page, it's the name of the user. There is a link > that calls the function session_destroy(). Everytime that I follow this > link > and log in with another user, that session variable printed doesn't > change, > but if I press F5 in IE or Netscape them it brings the right user. I > can't > make the page return the current user login, it always came with the > last > user logged. I tried to add some headers to set no cache in all php > pages, > but it doesn't work. > > Anyone can help me??? > > Thanks > > PS: Sorry about my poor english... > > > Maurício Valente > > > > -- > 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] Refresh PHP
Doing this, it works. The variable 'url_variable' is changed when it pass over the if. But I don't want to use a get variable, it could be easily changed by the users... its my problem... Maurício Valente - Original Message - From: "Ralph Guzman" <[EMAIL PROTECTED]> To: "'Mauricio'" <[EMAIL PROTECTED]>; "'PHP'" <[EMAIL PROTECTED]> Sent: Tuesday, July 08, 2003 4:05 PM Subject: RE: [PHP] Refresh PHP > How about: > > if($_GET['url_variable'] != $url_variable){ >$url_variable = $_GET['url_variable']; >session_register('url_variable') > } > > > -Original Message- > From: Mauricio [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 08, 2003 11:14 AM > To: PHP > Subject: Re: [PHP] Refresh PHP > > Hello Ralph, > > Actually, after calling session_destroy() I reset those variables > assigning > an empty value like you said. But it still doesn't work. I did a test > after > destroying session variables, printing them. They are empty. > > Another weird thing is that when a login as "joao" them logoff, exclude > IE > cache, going in Tools >> Internet Option..., and login again with > another > user, this way the variable are printed correctly. > > It happens in any windows version (95,98,ME,2K,XP) using IE 6.0 and > Netscape > 7. > > > > - Original Message - > From: "Ralph Guzman" <[EMAIL PROTECTED]> > To: "'Mauricio'" <[EMAIL PROTECTED]> > Sent: Tuesday, July 08, 2003 2:11 PM > Subject: RE: [PHP] Refresh PHP > > > > Rather than using session_destroy() reset the session variable by > > assigning it an empty value. For example, lets say your url looks > > something like this: > > > > http://www.mydomain.com/?url_variable=Mauricio > > > > then do the following: > > > > if($_GET['url_variable'] != $url_variable){ > >$url_variable = ""; > >session_register('url_variable') > > } > > > > > > -Original Message- > > From: Mauricio [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, July 08, 2003 7:02 AM > > To: PHP > > Subject: [PHP] Refresh PHP > > > > Hi people! > > > > Did anyone get this situation? > > > > I'm creating a Site that uses 3 session variables. One of them I > always > > print at the top of the page, it's the name of the user. There is a > link > > that calls the function session_destroy(). Everytime that I follow > this > > link > > and log in with another user, that session variable printed doesn't > > change, > > but if I press F5 in IE or Netscape them it brings the right user. I > > can't > > make the page return the current user login, it always came with the > > last > > user logged. I tried to add some headers to set no cache in all php > > pages, > > but it doesn't work. > > > > Anyone can help me??? > > > > Thanks > > > > PS: Sorry about my poor english... > > > > > > Maurício Valente > > > > > > > > -- > > 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] Refresh PHP
Ralph, Before anything, I would like to thank you for the time you are spending with my problem! Ok. I changed using $_SESSION and the problem still happens. I printed both, $_SESSION and $HTTP_SESSION_VARS and they are the same... not the current user, but the last logged. It's funny that in the next page, after login, if I print $_SESSION or $HTTP_SESSION_VARS they are right, but when I call another page (using a link), like some report, it appears the wrong user. All pages has the same header, setting no cache... any ideas? Thank you Mauricio Valente - Original Message - From: "Ralph Guzman" <[EMAIL PROTECTED]> To: "'Mauricio'" <[EMAIL PROTECTED]> Sent: Tuesday, July 08, 2003 6:57 PM Subject: RE: [PHP] Refresh PHP > I though you were passing the variable through the url. If you have this > stored in a session, then try replacing $_GET with $_SESSION > > -Original Message- > From: Mauricio [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 08, 2003 1:56 PM > To: 'PHP' > Subject: Re: [PHP] Refresh PHP > > Doing this, it works. The variable 'url_variable' is changed when it > pass > over the if. But I don't want to use a get variable, it could be easily > changed by the users... its my problem... > > Maurício Valente > > - Original Message - > From: "Ralph Guzman" <[EMAIL PROTECTED]> > To: "'Mauricio'" <[EMAIL PROTECTED]>; "'PHP'" > <[EMAIL PROTECTED]> > Sent: Tuesday, July 08, 2003 4:05 PM > Subject: RE: [PHP] Refresh PHP > > > > How about: > > > > if($_GET['url_variable'] != $url_variable){ > >$url_variable = $_GET['url_variable']; > >session_register('url_variable') > > } > > > > > > -Original Message- > > From: Mauricio [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, July 08, 2003 11:14 AM > > To: PHP > > Subject: Re: [PHP] Refresh PHP > > > > Hello Ralph, > > > > Actually, after calling session_destroy() I reset those variables > > assigning > > an empty value like you said. But it still doesn't work. I did a test > > after > > destroying session variables, printing them. They are empty. > > > > Another weird thing is that when a login as "joao" them logoff, > exclude > > IE > > cache, going in Tools >> Internet Option..., and login again with > > another > > user, this way the variable are printed correctly. > > > > It happens in any windows version (95,98,ME,2K,XP) using IE 6.0 and > > Netscape > > 7. > > > > > > > > - Original Message - > > From: "Ralph Guzman" <[EMAIL PROTECTED]> > > To: "'Mauricio'" <[EMAIL PROTECTED]> > > Sent: Tuesday, July 08, 2003 2:11 PM > > Subject: RE: [PHP] Refresh PHP > > > > > > > Rather than using session_destroy() reset the session variable by > > > assigning it an empty value. For example, lets say your url looks > > > something like this: > > > > > > http://www.mydomain.com/?url_variable=Mauricio > > > > > > then do the following: > > > > > > if($_GET['url_variable'] != $url_variable){ > > >$url_variable = ""; > > >session_register('url_variable') > > > } > > > > > > > > > -Original Message- > > > From: Mauricio [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, July 08, 2003 7:02 AM > > > To: PHP > > > Subject: [PHP] Refresh PHP > > > > > > Hi people! > > > > > > Did anyone get this situation? > > > > > > I'm creating a Site that uses 3 session variables. One of them I > > always > > > print at the top of the page, it's the name of the user. There is a > > link > > > that calls the function session_destroy(). Everytime that I follow > > this > > > link > > > and log in with another user, that session variable printed doesn't > > > change, > > > but if I press F5 in IE or Netscape them it brings the right user. I > > > can't > > > make the page return the current user login, it always came with the > > > last > > > user logged. I tried to add some headers to set no cache in all php > > > pages, > > > but it doesn't work. > > > > > > Anyone can help me??? > > > > > > Thanks > > > > > > PS: Sorry about my poor english... > > > > > > > > > Maurício Valente > > > > > > > > > > > > -- > > > 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 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/JavaScript/HTML
Hello folks I wrote a JavaScript to set the values of a Select html object by client side. The values are copied from another Select that I create getting the values from the database. After the user set the values he/she wants to add it in another form, for example, then press submit button, the values of the "user" Select object doesn't appears on the next page. What can I do to get the user selected values in the another page? Someone could help me? Thanks! .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Maurício Alegre Valente AGP5 Tecnologia da Informação Ltda. (48) 439-3004 Visite nosso site: www.agp5.com.br .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. - Original Message - From: "Nicholas Robinson" <[EMAIL PROTECTED]> To: "skate" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, August 05, 2003 4:26 AM Subject: Re: [PHP] easier than switch > As, in this case, only one of the variables is non-null, then you could use > the string concatenation operator and this would return what you want. > > i.e. type = $_POST['news'] . $_POST['dreams'] . $_POST['storys']... > > I think I've used the same variable name in different forms on the same page, > as only one form submission occurs at any one time there can't be a conflict > and PHP doesn't care where the POST'ed variable came from.. So, you could > rename news, dreams, etc. to be type and extract the result directly without > having to fiddle around. > > HTH > > Nick > > On Monday 04 Aug 2003 11:19 pm, skate wrote: > > okay, so i know there's an easy way to do this, and i've seen it done, sure > > of it. so please forgive the stupidity of my question, i don't even know > > where to begin to look in the archives either... > > > > i have several forms on one page, they all submit a different variable, i > > then want to set one variable depending on that... okay, now i'm confusing > > myself, lets try explain it with some code... > > > > > > > if(isset($_POST)) > > { > > $type = $_POST['news'] || $_POST['dreams'] || $_POST['storys'] || > > $_POST['words'] || $_POST['chat']; } > > > > ?> > > > > obviously this doesn't work. but i wanna set $type depending on which > > $_POST variable was sent. only one of these will ever be sent. rather than > > doing a big ass switch statement, is there no way i can get this into one > > line? > > > > i hope this isn't too confusing... > > > -- > 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/JavaScript/HTML
Ok! Now I can see the values in the another page. But each value are passed with the same name. How can I get all values using PHP script? On the Address Bar I can see: index.php?slcAdd=1&slcAdd=2&slcAdd=3 But when I get the value using $HTTP_GET_VARS['slcAdd']; it returns just the last value. What can I do to get them all? Thanks! .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Maurício Alegre Valente AGP5 Tecnologia da Informação Ltda. (48) 439-3004 Visite nosso site: www.agp5.com.br .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. - Original Message - From: "CPT John W. Holmes" <[EMAIL PROTECTED]> To: "Mauricio" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, August 05, 2003 10:05 AM Subject: Re: [PHP] PHP/JavaScript/HTML > From: "Mauricio" <[EMAIL PROTECTED]> > > I wrote a JavaScript to set the values of a Select html object by client > > side. The values are copied from another Select that I create getting the > > values from the database. After the user set the values he/she wants to > add > > it in another form, for example, then press submit button, the values of > the > > "user" Select object doesn't appears on the next page. What can I do to > get > > the user selected values in the another page? > > Well, if I understand that correctly, you need to use Javascript to "select" > all of the options that the user selected to add to the second select box. > If they aren't selected, then they won't be passed to the next page. > > ---John Holmes... > > > -- > 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
RES: [PHP] PHP/JavaScript/HTML
Perfect! That's all I had to do. Thanks! Maurício -Mensagem original- De: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 5 de agosto de 2003 16:30 Para: Mauricio; [EMAIL PROTECTED] Assunto: Re: [PHP] PHP/JavaScript/HTML From: "Mauricio" <[EMAIL PROTECTED]> > On the Address Bar I can see: index.php?slcAdd=1&slcAdd=2&slcAdd=3 > But when I get the value using $HTTP_GET_VARS['slcAdd']; it returns just the > last value. What can I do to get them all? Name your select box as "slcAdd[]" and you'll have all of the values in an array. ---John Holmes... -- 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.510 / Virus Database: 307 - Release Date: 14/8/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/8/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: [apache-br] extension no RH9
Hello All! I installed Oracle 9i and it's working perfectly. I use a linux server to connect using a client in this other machine. I need to put HTTPD 2.0.40, PHP 4.2.2, Oracle 9i working together on a RedHat 9... Hardly, searching on the web, I could compile the oracle.so module using the same version of php and httpd I have. It compiled with no errors and I got the oracle.so and oracle.la on modules directory. Looking for what I should do next, I read .ini of PHP on how to make that module works. So, as it says, a copied the module in the extension_dir (/usr/lib/php4) and created a oracle.ini in /etc/php.d. Even when I restart the service or restart the computer I still get the same error message: Fatal error: Call to undefined function: ocilogon() in /var/www/html/teste_db.php on line 18 I compiled the module, in this case, because I would like to let apache with all modules that it is installed now. Am I forgeting someting here to make it works? Somebody could help me with it??? Thanks people! Maurício - Original Message - From: "Mauricio" <[EMAIL PROTECTED]> To: Sent: Wednesday, December 17, 2003 9:25 PM Subject: [apache-br] extension no RH9 > Olá Todos! > > Estou com o Oracle 9i instalado e funcionando corretamente sendo acessado de > uma outra máquina Linux; > RedHat 9.0 > A versão do httpd é a 2.0.40 e o PHP é o 4.2.2. > > Com muito custo, consegui compilar a biblioteca do oracle como uma extension > para o php/apache. O módulo é criado sem problemas e ele encontra todas as > bibliotecas do oracle no $ORACLE_HOME. > > Meu problema é que não estou conseguindo carregar este módulo nem pelo > APACHE e nem pelo PHP. > > Lendo os comentarios dos .conf e .ini do PHP vi que é necessário criar um > arquivo chamado oracle.ini no diretório /etc/php.d e colocar o módulo > oracle.so no extension_dir (/usr/lib/php4). > > Mas mesmo assim reiniciando o httpd o Apache/PHP relata o mesmo erro: > > Fatal error: Call to undefined function: ocilogon() in > /var/www/html/teste_db.php on line 18 > > Será que existe mais alguma coisa a ser feita para que o Apache/Php > encontrem as bibliotecas compartilhadas do Oracle? > > Alguém pode me ajudar? > > Obrigado! > > Maurício > > > > http://linuxserver.linuxsecurity.com.br > > Para cancelar sua assinatura envie um e-mail para: > [EMAIL PROTECTED] > > Para mandar e-mail ao Moderador: > [EMAIL PROTECTED] ou > [EMAIL PROTECTED] > > > > > Seu uso do Yahoo! Grupos é sujeito às regras descritas em: http://br.yahoo.com/info/utos.html > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] extension in RH9
Hello All! I installed Oracle 9i and it's working perfectly. I use a linux server to connect using a client in this other machine. I need to put HTTPD 2.0.40, PHP 4.2.2, Oracle 9i working together on a RedHat 9... Hardly, searching on the web, I could compile the oracle.so module using the same version of php and httpd I have. It compiled with no errors and I got the oracle.so and oracle.la on modules directory. Looking for what I should do next, I read .ini of PHP on how to make that module works. So, as it says, a copied the module in the extension_dir (/usr/lib/php4) and created a oracle.ini in /etc/php.d. Even when I restart the service or restart the computer I still get the same error message: Fatal error: Call to undefined function: ocilogon() in /var/www/html/teste_db.php on line 18 I compiled the module, in this case, because I would like to let apache with all modules that it is installed now. Am I forgeting someting here to make it works? Somebody could help me with it??? Thanks people! Maurício -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] suscribir
_ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php+oracle
Hi for all. I have php+apache+win2000+client oracle in my machine. I configured my php.ini with: extension_dir and uncomment extensions in php_oci8.dll But, when I restart my apache, I receive the following error: Unable to load dynamic library "c:\php\extensions/php_oci8.dll". It was not possible to find the specified procedure. Can anyone help me with the configuration of php+oracle? -- Mauricio +55 - (041) - 219-5246 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems compiling PHP 5.0.0b1
Hello, I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using this configure command: ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 And I get the following error: configure: error: libxml2 version 2.5.1 or greater required. Then, I downloaded and compiled libxml 2.5.7 and the same error appears. I've compiled several diffrent versions of PHP before without problems. Has anyone had a similar problem ? TIA, _ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: move_uploaded_file > 1MB
- Original Message - From: "Yves Daemen" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Tuesday, June 03, 2003 7:27 PM Subject: Re: [PHP] Re: move_uploaded_file > 1MB > No it's not possible, you have to see the error to actually believe it ;-) > It goes like this: > > You have a form with a file input field, you select a file on your HD, and > almost the "exact" moment you press the "submit"-button, you get a "Page not > found 404". > > It's very weird when you see it actually, because it's about the last kind > of output you would expect ;-) > > "Electroteque" <[EMAIL PROTECTED]> schreef in bericht > news:[EMAIL PROTECTED] > > move_uploaded_file is copying the temp file to a permanent directory right > ? > > thats on the server , check if the temp file is there with > > $_POST['tmp_name'] or its size value > > > > -Original Message- > > From: Yves Daemen [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 04, 2003 7:44 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Re: move_uploaded_file > 1MB > > > > > > I got the same error some time ago, and I almost went nuts trying to find > > the cause of this seemingly "insoluble" problem. But it has actually > nothing > > at all to do with your script or the max_file_size in PHP or the one you > > give with the HTML form. Those are offcourse 2 limits which are important, > > but there's another limit that counts here, and it's around 1Mb for > > standard... > > > > I can't recall how it was exactly done, but it's some default > > max_body_request or something in Linux or Apache (thought it was Linux > > though, I encountered the problem on a Redhat distribution, but someone > else > > fixed it for me).. Try looking in Linux's or Apache's settings... > > > > > > > > "MauríCio Valente" <[EMAIL PROTECTED]> schreef in bericht > > news:[EMAIL PROTECTED] > > > Hello everybody! > > > > > > I'm trying to upload a file using the move_uploaded_file function, > > everyting > > > works fine when the files have less than 1MB but when I upload one more > > than > > > this, IE returns the error The page cannot be displayed and in it's > title > > > shows Cannot find server. I alreary edit php.ini setting > > UPLOAD_MAX_FILESIZE > > > to 8388608 (8M), post_max_size = 8388608 and file_uploads = On > > (memory_limit > > > is 8388608 too). > > > > > > Someone could help me? > > > > > > Thanks in advance! > > > > > > Maurício Valente > > > > > > > > > > > > > > > > > -- > > 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] PEAR Documentation
Hello, I just started to use some PEAR classes, by now, I'm dealing with PEAR::DB that has a lot of examples and documentation but I can't find anything similar for PEAR::HTML_QuickForm. Where can I find documentation about this class ? I'm trying to learn it just by trial and error but a list of functions, methods and properties would be very nice. Thanks, _____ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions with register_globals = off
Hello, I'm working with register_globals turned off. I'm setting this session cookie: if ($nresult) { if (mysql_numrows($nresult)) { session_start(); $_SESSION['auth'] = 'TRUE'; } } And then I'm checking if the cookie is set, but it doesn't work: if ($_SESSION['auth'] == 'TRUE') { show_menu(); } Is there any error on my code ? What am I doing wrong ? I read this on http://www.php.net/release_4_1_0.php: "Another neat trick is that creating new entries in the $_SESSION array will automatically register them as session variables, as if you called session_register(). This trick is limited to the session module only - for example, setting new entries in $_ENV will *not* perform an implicit putenv()." That's what I am not using sessione_register($variable). TIA, _ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions with register_globals = off
Sessions are now being registered, but I have a problem unregistering them. This is the code that I'm using to test it: kill.php session_start(); print("ID = ".$_SESSION['id']); //The value is printed print("PERMISOS = ".$_SESSION['permisos']); //The value is printed unset($_SESSION['id']); unset($_SESSION['permisos']); print("ID = ".$_SESSION['id']); //The value is NOT printed print("PERMISOS = ".$_SESSION['permisos']); //The value is NOT printed ---kill.php- If the page is reloaded, the result is exactly the same. But if I keep reloading the page $_SESSION['id'] and $_SESSION['permisos'] have the same value. Is there any other way to unregister session variables ??? Thank you very much. _ Mauricio Cuenca - Original Message - From: "Daniel Guerrier" <[EMAIL PROTECTED]> To: "Mauricio Cuenca" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, September 06, 2002 2:11 PM Subject: Re: [PHP] Sessions with register_globals = off > Here you go > > http://www.zend.com/manual/function.session-is-registered.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Crontab
Hello, I need to run a daily script on our website but I'm trying to avoid using CRONTAB. Is there any way that I can run this daily ? Is there any equivalent to ASP's Application_OnStart for PHP ? Thanks, _ Mauricio Cuenca [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR::Pager examples
Hello, I've been using the PEAR::DB_Pager class for a while, but looking at the PEAR documentation I saw that there is another database paging class. PEAR::Pager (http://pear.php.net/package/Pager/). It seems to be good, but I couldn't find any documentation about it. Has anyone had any experiencie with this package that can share ? TIA, ____ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Setlocale() not working
Hello, I'm trying to print the full date in spanish using the following lines: setlocale(LC_TIME, 'es_ES'); strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, 12, 31, 2002)); But my sysadmin tells me that the server doesn't have the spanish locale installed. Is there a way that I can write the date in other language without the need to harcode the weekday names ??? Using only the strftime function ??? Thanks, ____ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Red Hat 7.0
I am trying to start the server and it returns the following in the interbase.log. ns1.mautec.com (Client) Sat Apr 14 22:06:05 2001 INET/inet_error: connect errno = 111 ns1.mautec.com (Client) Sat Apr 14 22:06:05 2001 /opt/interbase/bin/ibguard: guardian starting bin/ibserver ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001 INET/inet_error: read errno = 104 ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001 INET/inet_error: receive in try_connect errno = 104 ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001 /opt/interbase/bin/ibguard: bin/ibserver normal shutdown. I have been using interbase super server before but in the SuSe 7.1 with 2.2.18 without any problems. I have tried the rpm and the tar installation with the same results... Can anyone help me out? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php3 work partially
Hello I update my server from php 3.016 to php 4.0.4pl1 and it's work partially, because some of file called php3 that work perfect in php 3.0.16 now dont'w show anything, How can I solve this problem? Any Ideas? Thanks -- Mauricio Alarcon Rincon Webmaster - Webdepot Linux Registered User # 157093 CF-18 Hornet \ / \ _ / /_\ x--( . )--x x|x | |_|\_/|_| | x|x xx xx http://www.merlinux.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Email Attachment
Hello, I'm new in php development... I was wondering how can I attach a Word (.doc) Document in an email sent with the mail() function (if I can do it just with it). I know it has to see with the additional headers of the email, but I would be grateful If anyone could tell where can i go to for this specific information. I couldn't find it in PHP manual (.pdf version). Thanxs ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Email Attachment
Thanxs... I couldn't use your script (because of my lack of experiencie maybe) but you gave me a very good hint about what to look for. I sent an attachment (with a class located in this URL : http://renoir.vill.edu/~ylee/mailfile.txt), but that wasn't what my boss was thinking of. (Now he tells !) Anyway, is useful and I repeat my gratitude. "Frank Hertogs" <[EMAIL PROTECTED]> escribió en el mensaje 000401c1ab7e$4b2e7790$3400a8c0@fritzzz57619dp">news:000401c1ab7e$4b2e7790$3400a8c0@fritzzz57619dp... > This should do the trick, experiment wit hit; > > function mail_attachment($email, $buffer) > { > //subject > $subject = "Testing pdf attachment.." > //sender > $x_sender = "F. Hertogs"; > //extra (optional) headers > $x_headers = "From: [EMAIL PROTECTED]\n"; > $x_headers .= "PHP mailer\n"; > $x_headers .= "MIME-version: 1.0\n"; > //tell mail program it's multipart/mixed > $x_headers .= "Content-type: multipart/mixed; "; > //tell mail program what boundary looks like > $x_headers .= "boundary=\"Message-Boundary\"\n"; > //encoding > $x_headers .= "Content-transfer-encoding: 7BIT\n"; > //to prevent error in case email is empty (I only use this for testing > //normally; use php or javascript to check forms before submitting > if(!IsSet($email)) > $email = "[EMAIL PROTECTED]"; > //first boundary > $body = "--Message-Boundary\n"; > //start text message > $body .= "Content-type: text/plain; charset=US-ASCII\n"; > $body .= "Content-transfer-encoding: 7BIT\n"; > $body .= "Content-description: Mail message body\n\n"; > //text for message > $body .= "Dear sir,\n\nHere is the requested file blabla" > //end text message > $body .= "\n\n--Message-Boundary\n"; > //start application pdf in this example > $body .= "Content-type: application/pdf name=\"attach.pdf\"\n"; > $body .= "Content-Transfer-Encoding: base64\n"; > $body .= "Content-disposition: attachment; filename=\"attach.pdf\"\n\n"; > $enc_pdf = chunk_split(base64_encode($buffer)); > $body .= $enc_pdf . "\n"; } > $body .= "--Message-Boundary--\n"; > //mail actual message > mail($email, $subject, $body, $x_headers); > } > > I hope this helps you. > > Frank. > > -Oorspronkelijk bericht- > Van: Mauricio Sthandier [mailto:[EMAIL PROTECTED]] > Verzonden: vrijdag 1 februari 2002 20:45 > Aan: [EMAIL PROTECTED] > Onderwerp: [PHP] Email Attachment > > Hello, I'm new in php development... I was wondering how can I attach a > Word > (.doc) Document in an email sent with the mail() function (if I can do > it > just with it). > > I know it has to see with the additional headers of the email, but I > would > be grateful If anyone could tell where can i go to for this specific > information. > > I couldn't find it in PHP manual (.pdf version). > > Thanxs ! > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PATH_INFO in CGI Mode
Hello, I'm trying to work with the environment variable $PATH_INFO in a website that has PHP as CGI, not as an Apache module. The differences are these: 1. As an Apache module when I get into this URL: http://foo/script.php/path/info everything works fine and $PATH_INFO equals to "/path/info" 2. But as CGI (the case of my Hosting Provider), the server sends a 500 Error and says "premature end of script headers". Is this a normal behavior or its a problem with the server ? I'm hosting my website on VERIO and can not change provider. This is the answer that they gave me: -- The above URL is not a valid path, and will not work when PHP is running as a cgi. Please be advised that we have upgraded to PHP 4.1.2, so the error coding is different. The above path is displaying an Internal Server error because the php cgi is attempting to parse a path that does not exist. Are they right ? TIA, _ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing an array as an argument
Hello, I've built a function that receives an array as an argument to create an HTML drop-down list, but when I try to print the list this is all I got: Array[1] Array[1] This is my code: --- Function TextList($sName, $aOptions) { $nCount = Count($aOptions); //Counts the elements of the array Print("\n"); For ($i = 1; $i <= $nCount; $i++) { Print(" $aOptions[1][1]\n"); } Print("\n"); } */ Now I build the array */ $my_array = Array( Array(0,0), Array(1,"Enero"), Array(2,"Febrero"), Array(3,"Marzo"), Array(4,"Abril"); */ And call the function */ TextList("my_list", $my_array); I need to know how exaclty can I pass and receive an array as a function argument. Hope you can help me, TIA. -- Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing an array as an argument
Hello, I've built a function that receives an array as an argument to create an HTML drop-down list, but when I try to print the list this is all I got: Array[1] Array[1] This is my code: --- Function TextList($sName, $aOptions) { $nCount = Count($aOptions); //Counts the elements of the array Print("\n"); For ($i = 1; $i <= $nCount; $i++) { Print(" $aOptions[1][1]\n"); } Print("\n"); } */ Now I build the array */ $my_array = Array( Array(0,0), Array(1,"Enero"), Array(2,"Febrero"), Array(3,"Marzo"), Array(4,"Abril"); */ And call the function */ TextList("my_list", $my_array); I need to know how exaclty can I pass and receive an array as a function argument. Hope you can help me, TIA. -- Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include_once()
Hello, I have a very long script with several functions in it. I wanted to split the script into several files, so I created two sub-scripts and one main script. This is the code from the main script: MyFunction() is contained in the file "sub_script_1.php" which is properly enclosed with valid PHP start and end tags. But When I try to run the main script, I get this error: Fatal error: Call to undefined function: MyFunction()in /main_script.php on line 4. How can I properly "divide" my script into several ones ??? TIA, ______ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include_once()
Yes, I read the documentation and took close note to include the start and end tags... Thanks, __ Mauricio Cuenca - Original Message - From: "anders nawroth" <> To: "Mauricio Cuenca" ; <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 2:26 PM Subject: Re: [PHP] include_once() > Have you put > Anders > > - Ursprungligt meddelande - > Från: "Mauricio Cuenca" <> > Till: <> > Skickat: den 19 mars 2002 17:43 > Ämne: [PHP] include_once() > > > > Hello, > > > > I have a very long script with several functions in it. I wanted to split > > the script into several files, so I created two sub-scripts and one main > > script. This is the code from the main script: > > > > > > > include_once("sub_script_1.php"); > > incude_once("sub_script_2.php"); > > > > $temp = MyFunction(); > > > > ?> > > > > MyFunction() is contained in the file "sub_script_1.php" which is properly > > enclosed with valid PHP start and end tags. > > > > But When I try to run the main script, I get this error: > > Fatal error: Call to undefined function: MyFunction()in /main_script.php on > > line 4. > > > > How can I properly "divide" my script into several ones ??? > > > > TIA, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include_once()
No I haven't. Wouldn't this affect my entire web site ? I just need to include the files into a single script. Thanks, __ Mauricio Cuenca - Original Message - From: "Neil Freeman" To: "Mauricio Cuenca" Cc: <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 12:30 PM Subject: Re: [PHP] include_once() > Have you remembered to set up PHP's include_path to point to the area where > your scripts are located? > > Neil > > Mauricio Cuenca wrote: > > > Hello, > > > > I have a very long script with several functions in it. I wanted to split > > the script into several files, so I created two sub-scripts and one main > > script. This is the code from the main script: > > > > > > > include_once("sub_script_1.php"); > > incude_once("sub_script_2.php"); > > > > $temp = MyFunction(); > > > > ?> > > > > MyFunction() is contained in the file "sub_script_1.php" which is properly > > enclosed with valid PHP start and end tags. > > > > But When I try to run the main script, I get this error: > > Fatal error: Call to undefined function: MyFunction()in /main_script.php on > > line 4. > > > > How can I properly "divide" my script into several ones ??? > > > > TIA, > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Append to the beginning of a file...
I guess thist must be really silly... but how can I append text to the beginning of a file ??? I've been trying since a while... but all I get is overwriting !. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Append to the beginning of a file...
I already seen it... I used "r+" and "aw". I saw and example in www.php.net, in the fopen function description, but it is incomplete... this is taking me hours !!!. Well, if I can preappend... how can I read, for example, the first 8 chars of the last line I inserted ?. They have no fixed length. I'm starting to feel silly :(. "Chris Boget" <[EMAIL PROTECTED]> escribió en el mensaje news:01bd01c1d0f6$3fc51f60$[EMAIL PROTECTED]... > > I guess thist must be really silly... but how can I append text to the > > beginning of a file ??? > > I've been trying since a while... but all I get is overwriting !. > > Check out fopen(). There is an argument that you can use in that function > call to determine how the data is sent to the file. > > Chris > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Append to the beginning of a file...
I guess I should do that. I need the plain file because is just a log of users registering in a Club, in a csv format. Using a database is just too much and not intended for this page... even when I would prefer using mysql. At least, I can handle that rather than the fopen and fwrite !. I could append but then I need to read the first 8 chars of the last line I appended... neither something I know how to do. If they were fixed I could... maybe I can fill it with blank chars the line until a given size ? Thanxs everyone for your replies. "Miguel Cruz" <[EMAIL PROTECTED]> escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 21 Mar 2002, Mauricio Sthandier wrote: > > I guess thist must be really silly... but how can I append text to the > > beginning of a file ??? > > I've been trying since a while... but all I get is overwriting !. > > Open a temporary file, write your new data to it, copy the old file on to > the end of it, remove the old file, rename the temporary file with the old > file's name. > > Obviously this is not very efficient. Explore whether you really need to > prepend. Perhaps you can append and then read the file backwards a la tac? > Or perhaps a database is more useful. Or multiple files. > > miguel > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Append to the beginning of a file...
Well, here's a lousy solution to a lousy problem : (please don't crucify my code since I know it's not depurated) --- $archivo = fopen("./registrados.txt", "a+"); if ($archivo) { $posicion = fseek($archivo, -512, SEEK_END); $datos = fread($archivo, 7); $entero = intval(substr($datos, 2, 5)); If (empty($entero) || !is_int($entero)) { $entero = 1000; } $entero++; $socio = str_repeat("0", 5 - strlen(strval($entero))).strval($entero); $linea = "\n\"$socio\";\"$fecha\";\"$nombre $apellido\";\"$rut\";\"$fono\";\"$direccion\";\"$comuna\";\"$ciudad\";\"$pai s\";\"$edad\";\"$email\";\"$select_familiares\";\"$select_lugar_compra\";\"$ cocina\";\"$select_personas_cocinan\";\"$recetario\""; $linea = $linea . str_repeat(" ", 512 - strlen($linea)); fseek($archivo, 0, SEEK_END); fwrite ($archivo, $linea, 512); fclose($archivo); ----- It does works... sounds amazing after this hours... helps everybody, you are fine people !!! "Miguel Cruz" <[EMAIL PROTECTED]> escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thu, 21 Mar 2002, Mauricio Sthandier wrote: > > I could append but then I need to read the first 8 chars of the last line I > > appended... neither something I know how to do. > > Seek to the end of the file minus typical record length, read, > look for the penultimate end-of-record delimiter (\n, probably) in there, > and you've found your final record. If you don't find a delimiter, read > some more and tack it onto the beginning of your string, then check again. > Repeat until batter contains no large lumps. > > miguel > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Exit();
Hello, I'm using recursive functions and call a function from inside another one. The problem is that when I call the Exit(); function the whole program is aborted. How can I quit just the current function, not the whole program ? Function One() { If (!$var) { Exit(); } } Function Two(); { One();//This line kills the program Print("Hello"); //This is not printed =( } TIA, __ Mauricio Cuenca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How can I persist a session ?
Hi... i'm trying to authenticate users in my pages. But every time it gives me a different session_id ! And I can't use my previously registered variables... I started sessions with this code : session_start(); include "config.php"; $db_handler = @mysql_connect($db_server,$db_username,$db_password); @mysql_select_db($db_database,$db_handler); $resultado = mysql_query("SELECT password FROM $db_table WHERE login = '$login';",$db_handler); If (mysql_num_rows($resultado) == 1){ If (mysql_result($resultado, 0) == $password){ session_name("taag"); session_register("login"); which I use in other pages like this : // to continue session, I know I don't have to use it when its on session_autostart session_start(); echo "Registrada: ".session_is_registered("login"); echo "Sesion : ".session_id(); echo "Login : ".$login; echo "Login :".$_SESSION["login"]; echo "Login :".$HTTP_SESSION_VARS["login"]; // al of them are empty // I also used isset and isempty but neither works. If (!session_is_registered("login")) { die("You don't exist !"); } else { header("Location : products.htm"); } --- This is my php.ini config : [Session] session.save_handler = files session.save_path = C:\PHP\pruebas\taag\sesiones session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = session.cookie_domain = session.serialize_handler = php session.gc_probability = 1 session.gc_maxlifetime = 1440 session.referer_check = 1 session.entropy_length = 0 session.entropy_file = ;session.entropy_length = 16 ;session.entropy_file = /dev/urandom session.cache_limiter = nocache session.cache_expire = 20 session.use_trans_sid = 0 url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" I also use register_globals=on. What's wrong -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP.ini Session section
Does anybody have a Session section of the php.ini working on Windows 2000 ? I'm not able to make my session persistent along pages... perhaps a bad configuration of IIS ? Should I move to Linux ? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: session problem?
I have the same problem... I thought it was for a different reason... If you got a solution please email me !!! "Bob" <[EMAIL PROTECTED]> escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 1.php?2.php > session_start(); session_start(); > .. .. > $_SESSION['a'] =$a;echo $_SESSION['a']; > $_SESSION['b'] =$b; echo $_SESSION['b']; > header("location: 2.php"); > > there is an warning: undefined index a ,b. > > > after change > > 1.php 2.php > session_start(); session_start(); > .. .. > $_SESSION['a'] =$a;echo $_SESSION['a']; > $_SESSION['b'] =$b; echo $_SESSION['b']; > go on > > it works well? > why? > > > thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Discover about php.ini
I couldn't get my site working por two days... and finally I discover the reason. I copied (I guess for developing testing reason) php.ini into the site folder... so I discover I can have different php.ini in every virtual directory... and I find it damn good !. is so for each webserver ? (currently running IIS 5.0). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mssql
Hello I want to connect to a Microsoft SQL Server, I try with mssql_connect but the script don't work, it always say Call to unsupported or undefined function What I do worng? Thanks -- Mauricio Alarcon Rincon Webmaster - Webdepot Linux Registered User # 157093 CF-18 Hornet \ / \ _ / /_\ x--( . )--x x|x | |_|\_/|_| | x|x xx xx http://www.merlinux.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php4 but dont work with php3
Hello Thanks t all people that reply my last message about a msSQL server, But now I got a new problem, my server was running php3 and today i try to update to php4 with apache 1.3.19 and all file .php3 and php4 don't work, the php only make a echo with all code and the php3 ask for a application or save to disk. I put this line sin httpd.conf but dont'work AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps AddType application/x-httpd-php .php Action application/php4script /cgi-bin/php What I'm doing wrong? Thanks -- Mauricio Alarcon Rincon Webmaster - Webdepot Linux Registered User # 157093 CF-18 Hornet \ / \ _ / /_\ x--( . )--x x|x | |_|\_/|_| | x|x xx xx http://www.merlinux.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php4 but dont work with php3
Well it work partial, the .php now works but .php3 doesn't work Any other ideas? Thanks Mauricio Alarcon [EMAIL PROTECTED] wrote: > Hi, > > I`m not sure if this is 100% the right method but you can try it and see. > Change httpd.conf to the following. > > AddType application/x-httpd-php .php .php3 > > Ade > -- Mauricio Alarcon Rincon Webmaster - Webdepot Linux Registered User # 157093 CF-18 Hornet \ / \ _ / /_\ x--( . )--x x|x | |_|\_/|_| | x|x xx xx http://www.merlinux.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] escape sequences not recognized inside an .html
Hi, I believe I am missing some configuration regarding my apache becouse I can only get php to work inside a file .php. If my page extension is .html, nothing happend with the php script; but just changing from .html to .php everthing works fine. Anyone? Anyhelp? I'm new over php. I usually do stuff with Delphi/Builder and now I'm moving to web oriented programs. Thanks for looking! Mauricio Junqueira Mautec Corp. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] escape sequences not recognized inside an .html
I've check the other articles and came up with the following: 1- take out the extension, html or php, inside the links in way that I can change from .html to .php and vice-versa without worrie to change all links. 2- and to add the .html to httpd.conf in order to all files to be parsed. Not too beatifull but so far, I'm a litte too short in html/php and this is going to help me to finish the job. At first, I though that the apache it itself called php and it finds the escape sequence, not that the entirely file has to be parsed by php. Thanks for your replays Mauricio Junqueira wrote: > Hi, > I believe I am missing some configuration regarding my apache becouse > I can only get php to work inside a file .php. > If my page extension is .html, nothing happend with the php script; but > just changing from .html to .php everthing works fine. > Anyone? Anyhelp? > > I'm new over php. I usually do stuff with Delphi/Builder and now I'm > moving to web oriented programs. > > Thanks for looking! > > Mauricio Junqueira > Mautec Corp. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Interbase error code = -504 Cursor unknow
Hello, this is my first attempt to query and print a result coming from a database, in this case interbase6. I got the following error: InterBase: Dynamic SQL Error SQL error code = -504 Cursor unknown in maingeral.htm on line 8 Here's the code: alert('" . ibase_errmsg() . "'); "); $stmt = "select count(*) from soldcars"; $query= ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); "); $result = ibase_fetch_row($query);// THIS IS LINE 8 $TOTSOLD = $result; ibase_free_result($query); $stmt="select Total from monthsold"; $query = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); "); $result = ibase_fetch_row($query); $TOTMONTH = $result[0]; ibase_free_result($query); $stmt= "select count(*) from deal where available = 1"; $query = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); "); $result = ibase_fetch_row($query); $TOTAVAIL= $result[0]; ibase_free_result($query); ibase_commit(); ibase_close(); ?> I have 3 query blocks. the result shows the contents of 2nd and 3rd block variable:TOTMONH and TOTAVAIL but nothing from the first block, TOTSOLD. If I comment the first block entirely, I got the same error (ibase_fetch_row line) on the 2nd block and the only result that appear is from the 3rd block. What I am doing wrong? I've put this statement before the first block to see if $query was empty but the statement return true and the same error occured in the ibase_fetch_row line and the echo $query shows everytime Resource id#4 if (isset($query)) { echo($query); $result = ibase_fetch_row($query); $TOTSOLD = $result; ibase_free_result($query); } else echo "query not set"; If just comment the following lines, everything works Please help... I'm getting nut !! alert('" . ibase_errmsg() . "'); "); $stmt = "select count(*) from soldcars"; $query= ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); "); // $result = ibase_fetch_row($query); // $TOTSOLD = $result[0]; // ibase_free_result($query); $TOTSOLD ="COMMENTED"; $stmt="select Total from monthsold"; $query = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); "); $TOTMONTH = $result[0]; ibase_free_result($query); $stmt= "select count(*) from deal where available = 1"; $query = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); "); $result = ibase_fetch_row($query); $TOTAVAIL= $result[0]; ibase_free_result($query); ibase_close(); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Interbase error code = -504 Cursor unknow
Since ibase_query returns true if the query succeeds I've tried this, but with the same problem with ibase_fetch_row: $stmt = "select count(*) from soldcars"; if ($query= ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ")){ $result = ibase_fetch_row($query); $TOTSOLD = $result[0]; ibase_free_result($query);} -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] column names
HI, does anyone knows how to retrive information about the columns names of a table? I know that is possible to use show table mytable using isql but I need to get information about the columns using sql. that information is to be accessed with a php script. so, I'm looking for something resembling "select info from table" How may I supposed to do that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] column names
Steve Werby wrote: > "Tim Ward" <[EMAIL PROTECTED]> wrote: >> SHOW COLUMNS FROM tablename >> is the MySQL query > > That works well from the MySQL commandline, but isn't as useful from > within a PHP script if Mauricio wants to control the formatting of it, > limit the > fields displayed and use it within the logic of the PHP script. Depends > what he needs to do. I still think mysql_field_name() / pg_fieldname() > are the way to go, though Mauricio never mentioned which DBMS he's using. > > -- > Steve Werby > President, Befriend Internet Services LLC > http://www.befriend.com/ > > > I am using interbase6 By now , using this query over the system tables solved my problem: SELECT RDB$FIELD_NAME FROM RDB$RELATION_FIELDS WHERE RDB$RELATION_NAME = 'mytable' I need to do this way because the table might be empty and I'll not be able to use ibase_field_info on each column returned by one query like select * from mytable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to add zlib support
Hi , On March 9th this year I 've compiled and installed php 4.3.4 on SuSe linux Server with apache 1.3. The configure command was this: './configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs' '-enable-dbase' Nowadays I'm urged to install zlib support in order to let the developers to make use of compressed files. It's a requisite that the compression library has to be zlib. I don't know how to do that. I guess I should reconfigure with './configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs' '--with-zlib' '-enable-dbase' then run ./make and ./make install But I'm afraid tha something could go wrong and end-up with a whole useless installation Could someone point me in the right direction? Thanks Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to add Zlib support
Hi , On March 9th this year I 've compiled and installed php 4.3.4 on SuSe linux Server with apache 1.3. The configure command was this: './configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs' '-enable-dbase' Nowadays I'm urged to install zlib support in order to let the developers to make use of compressed files. It's a requisite that the compression library has to be zlib. I don't know how to do that. I guess I should reconfigure with './configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs' '--with-zlib' '-enable-dbase' then run ./make and ./make install But I'm afraid tha something could go wrong and end-up with a whole useless installation Could someone point me in the right direction? Thanks Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to add Zlib support
Curt Zirzow wrote: > * Thus wrote Mauricio Pellegrini: >> >> It's a requisite that the compression library has to be zlib. >> >> I don't know how to do that. >> >> I guess I should reconfigure with >> >> './configure' >> '--with-mysql' >> '--with-apxs=/usr/local/apache/bin/apxs' >> '--with-zlib' >> '-enable-dbase' >> >> then run ./make and ./make install >> >> But I'm afraid tha something could go wrong and end-up >> with a whole useless installation > > These procdures should go without any flaws. If you're extra parnoid, > the best thing to do is back up your current stuff so incase there > is something wrong, you can restore them: > > php module for apache should be located in: > /usr/local/apache/libexec/libphp.so > > php config files: > /usr/local/lib/php*.ini > > php misc files (aka pear, headers, etc.): > /usr/local/lib/php/* > > And finaly the executables for php: > /usr/local/bin/php* > > > HTH, > > Curt Ok, Thanks . But should I recompile only php or do I have to recompile apache,mysql,etcetera,etcetera? -- Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error with DOMDocument in php's functions
Hi Guys, I want to ask you about this problem: I have a FUNCTION where is a DOMDocument element, that DOMDocument element is "Load" from a string (With well formed XML structure) stored in a param, this is code: loadXML($text); ... /* REST of function's code */ Now in the line number 63 (in the function) I have this code: ... Line 62: $arrDocChilds = $doc->childNodes; Line 63: if ($arrDocChilds->item($i)->nodeType != '3') ... I have that function in one .php file (the function is the unique code in that file, and the file name is xml_match.php); Now, the problem is, when I try to execute that file from command line, I'm getting this error: [ad...@server xml]$ php xml_match.php PHP Parse error: parse error in /var/www/vhosts/default/htdocs/spytest/share/xml/xml_match.php on line 63 Content-type: text/html X-Powered-By: PHP/4.3.2 My question is, why is php launching this error, if the code is in a function that is not called? Regards Mauricio M.
[PHP] How can I know if a browser is cookies enables?
Hello. How can I know if a web browser is cookies enables? Regards Mauricio M.
[PHP] How to upload files up to 40MB with a html post form?
How can I upload files up to 40MB with a html post form? (without a ftp client) Please, remember 1. My hosting provider has up to 120 seconds apache timeout 2. My hosting provider has up to 10MB to upload files in php.ini Any kind of ideas? Regards Mauricio M.
[PHP] Cannot retrieve KRB5CCNAME if logged in with kerberos ticket
Quick-n-easy question: I have my apache virtual host configured to use kerberos authentication: AuthType KerberosV5 KrbAuthRealms DOMAIN.COM KrbServiceName HTTP Krb5Keytab /etc/apache2/krb5.keytab KrbMethodNegotiate on KrbMethodK5Passwd on KrbAuthoritative off KrbSaveCredentials on Require valid-user And then I created the following test page: PHP Test PHP Kerberos Test "; echo "REMOTE_USER={$_SERVER['REMOTE_USER']}"; putenv("KRB5CCNAME={$_SERVER['KRB5CCNAME']}"); echo "KRB5CCNAME={$_SERVER['KRB5CCNAME']}"; exit(); ?> And I have mod_auth_kerb php5 modules enabled in apache. When I try to connect to the above test page using a kerberos ticket, I do see the PHP_AUTH_USER and REMOTE_USER (which are the same). But I get nothing in KRB5CCNAME. Now, if I destory my kerberos ticket and login using kerberos user/pw, At first I do get the filename associated with KRB5CCNAME. But, if I wait less than 15s to refresh the page, I get nothing for KRB5CCNAME; if I wait more than 15s, I will get the filename for KRB5CCNAME. Does anyone know what I may be doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [modauthkerb] Cannot retrieve KRB5CCNAME if logged in with kerberos ticket
On Mon, Aug 27, 2012 at 7:14 PM, Benjamin Kahn wrote: > Maybe you are hitting this bug? > > https://bugzilla.redhat.com/show_bug.cgi?id=687975 > mod_auth_kerb using krb5passwd and keepalive and credential delegation > loses delegation after first request on connection > Good question, because it sure looks rather similar. > On Mon, 2012-08-27 at 17:29 -0400, Mauricio Tavares wrote: >> Quick-n-easy question: I have my apache virtual host configured to use >> kerberos authentication: >> >> >> AuthType KerberosV5 >> KrbAuthRealms DOMAIN.COM >> KrbServiceName HTTP >> Krb5Keytab /etc/apache2/krb5.keytab >> KrbMethodNegotiate on >> KrbMethodK5Passwd on >> KrbAuthoritative off >> KrbSaveCredentials on >> Require valid-user >> >> >> And then I created the following test page: >> >> >> >> PHP Test >> >> >> PHP Kerberos Test >> > echo "user = {$_SERVER['PHP_AUTH_USER']}"; >> echo "REMOTE_USER={$_SERVER['REMOTE_USER']}"; >> putenv("KRB5CCNAME={$_SERVER['KRB5CCNAME']}"); >> echo "KRB5CCNAME={$_SERVER['KRB5CCNAME']}"; >> >> exit(); >> ?> >> >> >> >> And I have mod_auth_kerb php5 modules enabled in apache. When I try to >> connect to the above test page using a kerberos ticket, I do see the >> PHP_AUTH_USER and REMOTE_USER (which are the same). But I get nothing >> in KRB5CCNAME. Now, if I destory my kerberos ticket and login using >> kerberos user/pw, At first I do get the filename associated with >> KRB5CCNAME. But, if I wait less than 15s to refresh the page, I get >> nothing for KRB5CCNAME; if I wait more than 15s, I will get the >> filename for KRB5CCNAME. >> >> Does anyone know what I may be doing wrong? >> >> -- >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> ___ >> modauthkerb-help mailing list >> modauthkerb-h...@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/modauthkerb-help > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fopen function and charset
Hi. I want to know, what charset is applied to every file when is created with the fopen function and how can I to manage the charset when I use the fopen function? For example: If i want to create an ISO-8859-2 file, how can I to force, the fopen function to create it? Regards -- Mauricio Muriel [EMAIL PROTECTED] Cel 1: +57 300 784-0345 Cel 2: +57 311 733-0934 SIBA S.A. Calle 81 No.8-39 Ofc. 703 Bogotá, Colombia Tel: +57 (1) 211-1934 http://www.siba.com.co
[PHP] Instalation problem
I have a problem with PHP5, I'm using Apache1.3 as web server in winXP SP2 , y change the httpd file: LoadModule php5_module "C:/php/php5apache.dll" also AddModule mod_php5.c then TypesConfig conf/mime.types AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps I also change the directory root. to htdocs Then I copy and rename the php.ini file to my c:\windows also copy the php5ts.dll file to the bin directory of apache. then save the file and restart the server.. but it just not work. I create the file phpinfo.php containig: From the browser I tried: "http://localhost/phpinfo.php"; and the server work 'cause y searches the file, but do not reconigze PHP, it just show the same code in a white screen. I shut down de SP2 firewall, also the AV(just in case) and throw the same result. then modify some things form the php.ini, but still doesn't work. so, please, anyone have the solution? or I just better use IIS? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to execute multiples querys
Hi all I'm trying to execute two querys and they execute perfectly in fact, but after the execution of the first query there suposed to be some variable setted to a certain value. The problem is this variable is not available at the time the second query runs. I`ll try to explain a little bit further //This is my first query $quer1=" SET @var1=3 ";//Here I`m suposed to set the value for var1 to 3 mysql_query($quer1); // This is query #2 $query2="SELECT * from table1 where [EMAIL PROTECTED] "//Here @var1 doesn`t exist That wasn't really my first attempt. Originally I've tryied the whole thing in just one single query but mysql gave me an error message complinning about the semicolon Please look at this $quer1 = "SET @var1=3 ; SELECt * from table1 Where [EMAIL PROTECTED] " ; This gave a syntax error from MySQL inmmediately before the ";" (semicolon), Please any help greatefully appreciated Thanks Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to execute multiples querys
On Wed, 2006-04-26 at 10:32, nicolas figaro wrote: > Mauricio Pellegrini a écrit : > > Hi all > > > > I'm trying to execute two querys and they execute perfectly in fact, > > but after the execution of the first query there suposed to be some > > variable setted to a certain value. > > > > The problem is this variable is not available at the time the second > > query runs. > > > > I`ll try to explain a little bit further > > > > //This is my first query > > > > $quer1=" SET @var1=3 ";//Here I`m suposed to set the value for var1 to 3 > > mysql_query($quer1); > > > > // This is query #2 > > > > $query2="SELECT * from table1 where [EMAIL PROTECTED] "//Here @var1 doesn`t > > exist > > > > > why don't you build the second query directly with the value ? > $query2 = "SELECT * from table where col1=".$value; > > why do you need a query to set @VAR1=3 ? > (do you plan to use @VAR in another query ?). > > N F > > > That wasn't really my first attempt. Originally > > I've tryied the whole thing in just one single query but mysql gave me > > an error message complinning about the semicolon > > > > Please look at this > > > > $quer1 = "SET @var1=3 ; > > SELECt * from table1 Where [EMAIL PROTECTED] " ; > > > > > > This gave a syntax error from MySQL inmmediately before the ";" > > (semicolon), > > > > > > Please any help greatefully appreciated > > > > Thanks > > Mauricio > > > > Yes, I need to do it exactly this way. I mean , SET the value for the variable @var1 first. Then execute an undefined number of querys that reference this variable and its value. Thanks Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to execute multiples querys
On Wed, 2006-04-26 at 11:04, chris smith wrote: > On 4/26/06, Mauricio Pellegrini <[EMAIL PROTECTED]> wrote: > > On Wed, 2006-04-26 at 10:32, nicolas figaro wrote: > > > Mauricio Pellegrini a écrit : > > > > Hi all > > > > > > > > I'm trying to execute two querys and they execute perfectly in fact, > > > > but after the execution of the first query there suposed to be some > > > > variable setted to a certain value. > > > > > > > > The problem is this variable is not available at the time the second > > > > query runs. > > > > > > > > I`ll try to explain a little bit further > > > > > > > > //This is my first query > > > > > > > > $quer1=" SET @var1=3 ";//Here I`m suposed to set the value for var1 to 3 > > > > mysql_query($quer1); > > > > > > > > // This is query #2 > > > > > > > > $query2="SELECT * from table1 where [EMAIL PROTECTED] "//Here @var1 > > > > doesn`t > > > > exist > > If you try this through a mysql console or through something like > phpmyadmin does it work? Yes, It works perfectly!. >From Mysql console or MysqlCC or EMS MySQLmanager > -- > Postgresql & php tutorials > http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to execute multiples querys
On Wed, 2006-04-26 at 11:09, nicolas figaro wrote: > Mauricio Pellegrini a écrit : > >>> $quer1 = "SET @var1=3 ; > >>> SELECt * from table1 Where [EMAIL PROTECTED] " ; > >>> > >>> > >>> This gave a syntax error from MySQL inmmediately before the ";" > >>> (semicolon), > >>> > >>> > did you try to run the query above > > ( SET @var1=3 ; SELECt * from table1 Where [EMAIL PROTECTED] ) > > directly from a mysql client ? Yes, I did and it Works perfectly. > perhaps the @ is interpreted and you have to put a \ before it. > try a print $quer1 once $quer1 is set. I've tried this too. The output is sintactically correct. I even copied the output of the query and pasted it to Mysqlcc an executed it perfectly. A few minutes ago I found that mysql_query() cannot execute more than one query at a time so the form mysql_query("SET @var1=3 ; SELECT * from ....") is invalid But the other way should work Thanks Mauricio > >>> Please any help greatefully appreciated > >>> > >>> Thanks > >>> Mauricio > >>> > >>> > >>> > > > > > > Yes, I need to do it exactly this way. > > I mean , SET the value for the variable @var1 first. > > Then execute an undefined number of querys that reference this variable > > and its value. > > > > Thanks > > Mauricio > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to execute multiples querys
On Wed, 2006-04-26 at 11:04, chris smith wrote: > On 4/26/06, Mauricio Pellegrini <[EMAIL PROTECTED]> wrote: > > On Wed, 2006-04-26 at 10:32, nicolas figaro wrote: > > > Mauricio Pellegrini a écrit : > > > > Hi all > > > > > > > > I'm trying to execute two querys and they execute perfectly in fact, > > > > but after the execution of the first query there suposed to be some > > > > variable setted to a certain value. > > > > > > > > The problem is this variable is not available at the time the second > > > > query runs. > > > > > > > > I`ll try to explain a little bit further > > > > > > > > //This is my first query > > > > > > > > $quer1=" SET @var1=3 ";//Here I`m suposed to set the value for var1 to 3 > > > > mysql_query($quer1); > > > > > > > > // This is query #2 > > > > > > > > $query2="SELECT * from table1 where [EMAIL PROTECTED] "//Here @var1 > > > > doesn`t > > > > exist > > If you try this through a mysql console or through something like > phpmyadmin does it work? > Yes, it works. > -- > Postgresql & php tutorials > http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to execute multiples querys,IT is SOLVED!!
On Wed, 2006-04-26 at 13:07, Martin Alterisio wrote: > You should be able to do this in two calls to the mysql_query() > function. > mysql_query("SET @var1=3"); > mysql_query("SELECT * from table1 Where [EMAIL PROTECTED]"); It worked this way! It seems I musta had some other problem somewhere else thank you Thank you all MAuricio > > 2006/4/26, Mauricio Pellegrini <[EMAIL PROTECTED]>: > Hi all > > I'm trying to execute two querys and they execute perfectly in > fact, > but after the execution of the first query there suposed to be > some > variable setted to a certain value. > > The problem is this variable is not available at the time the > second > query runs. > > I`ll try to explain a little bit further > > //This is my first query > > $quer1=" SET @var1=3 ";//Here I`m suposed to set the value for > var1 to 3 > mysql_query($quer1); > > // This is query #2 > > $query2="SELECT * from table1 where [EMAIL PROTECTED] "//Here @var1 > doesn`t > exist > > > That wasn't really my first attempt. Originally > I've tryied the whole thing in just one single query but mysql > gave me > an error message complinning about the semicolon > > Please look at this > > $quer1 = "SET @var1=3 ; > SELECt * from table1 Where [EMAIL PROTECTED] " ; > > > This gave a syntax error from MySQL inmmediately before the > ";" > (semicolon), > > > Please any help greatefully appreciated > > Thanks > Mauricio > > -- > 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] How to execute multiples querys
On Wed, 2006-04-26 at 13:48, Robert Cummings wrote: > On Wed, 2006-04-26 at 10:36, Mauricio Pellegrini wrote: > > On Wed, 2006-04-26 at 11:09, nicolas figaro wrote: > > > Mauricio Pellegrini a écrit : > > > >>> $quer1 = "SET @var1=3 ; > > > >>> SELECt * from table1 Where [EMAIL PROTECTED] " ; > > > >>> > > > >>> > > > >>> This gave a syntax error from MySQL inmmediately before the ";" > > > >>> (semicolon), > > > >>> > > > > > > > >>> > > > did you try to run the query above > > > > > > ( SET @var1=3 ; SELECt * from table1 Where [EMAIL PROTECTED] ) > > > > > > directly from a mysql client ? > > > > Yes, I did and it Works perfectly. > > > > > > > perhaps the @ is interpreted and you have to put a \ before it. > > > try a print $quer1 once $quer1 is set. > > > > I've tried this too. The output is sintactically correct. > > I even copied the output of the query and pasted it to Mysqlcc an > > executed it perfectly. > > > > > > > > A few minutes ago I found that mysql_query() cannot execute more than > > one query at a time > > so the form mysql_query("SET @var1=3 ; SELECT * from ") is invalid > > > > > > But the other way should work > > Try explicitly retrieving a resource ID from mysql_connect, and > explictly use that resource when making the query. Probably not the > problem, but sounds like something is being lost from one query to > another. Thank you that's true. Theres another module in the middle and that is getting only the last query Thanks to all Mauricio > > Cheers, > Rob. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] bcdiv() function not recognized
Hi all, I'm usuing bcdiv like this > $someVar=bcdiv($timedifference,86400); and it works perfectly on my local server apache 1.329 , php 4.34 and suse 8.2 But when I put that module on the production server I get this error Fatal error:Call to undefined function:bcdiv() in /www/tst.php on line 9 Production Server is Suse 8.2 apache 1.329 php 4.34 What could be the problem here ? Thanks Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need to recompile php 4.3.4
Hi , In order to enable bcmath I need to recompile php 4.3.4 on suse 8.2. but , I would like to preserve the actual installation just in case anything goes wrong ( as this is my production server) What files should I backup / restore if after compilation php is not working? My actual installation consists of php 4.3.4 With the Zend Optimizer and apache 1.329 Thanks MAuricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to recompile php 4.3.4
Well, this is what I've done. First, made a test on a Fedora Core 2 installation by running ./configure --with etc,etc and --enable-bcmath Then executed make in order to generate executables but *DID NOT* run make install After that, copied manually libphp4.so from the build directory to libexec under apache tree and restarted apache. It worked just fine!! after that bcmath was shown by phpinfo() as been loaded. Then, did the same steps on the production server ( the diference here is that the operating System is Suse 8.2 Not Fedora core 2.) Repeated all steps as before and bcmath was enabled. But phpinfo() does not show the correct Build date for Php ( which should be today ) neither shows the configure option with the --enable-bcmath switch but it does show a section below in wich states that bcmath support is enabled. And of course tested with some php module that wasn't running before, and now it works, so I think everything is fine. These are the steps i used 1. re-configure (./configure --enable-bcmath or what ever other switch) 2. then run the Make utility 3. after that manually copy libphp4.so to libexec under apache tree. One last comment: The Zend optimizer continues to work perfectly after the whole process I would like to hear some experienced user comments about this Thanks Mauricio On Fri, 2006-06-16 at 21:48, chris smith wrote: > On 6/17/06, Mauricio Pellegrini <[EMAIL PROTECTED]> wrote: > > Hi , > > In order to enable bcmath I need to recompile php 4.3.4 on suse 8.2. > > > > > > but , I would like to preserve the actual installation just in case > > anything goes wrong ( as this is my production server) > > > > What files should I backup / restore if after compilation php is not > > working? > > > > > > My actual installation consists of php 4.3.4 With the Zend Optimizer > > and apache 1.329 > > Install them in different paths (configure --prefix=...), it will make > it a lot easier. > > If you installed originally from rpms, you should be able to find > where it put stuff (rpm -qpl php I think).. If you compiled then > phpinfo will show you the original prefix and you can backup that > structure. > > Not sure whether ZO will cope with that, but I guess you'll soon find out ;) > > -- > Postgresql & php tutorials > http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to execute local applications on the client
Hi, sorry if what I am asking makes no sense, but here it goes.. Some one has asked me to set a web page from within wich users could launch local applications. Those applications are allready installed in the client PC. The link on the web page would act as a simple link to start the application. This page would be something that resembles the windows desktop with all its links on it. My question is would it be possible to start in example word or excel from a link in a web page? Thanks for your answers Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to execute local applications on the client
First, thanks to all who replied! and yes I was aware of that kind of security issues and expected no positive results upon my question. But I've forgotten about the wsh. Now I think I would use it in case it is *absolutely* necessary Thanks again Mauricio On Tue, 2005-06-07 at 21:28, Rory Browne wrote: > Sort of. There are two ways to do this(that I can think of, and > neither of them are too reliable. Consider this: how would you like if > any random website, could run any program they liked on your computer? > This could range from word/excel, to less amicable programs like ones > that control your speakers/microphone, etc. > > Having that said, you can use nsiProcess(in netscape/gecko based > browsers.), or wsh for MSIE. I'm not sure exactly how to do this. I > just remember reading some code that needed this. On > netscape/mozilla/gecko you'll have to tell the script to override the > security preventing this(the user will be shown a dialog box, asking > them to confirm this). I'm not sure what the situation is with MSIE, > but expect to encounter some security issues. > > I don't know any examples for nsIProcess off-hand, but you can check > out the PHUI Code for an example on doing this on MSIE. > > On 6/7/05, Mauricio Pellegrini <[EMAIL PROTECTED]> wrote: > > Hi, sorry if what I am asking makes no sense, but here it goes.. > > > > Some one has asked me to set a web page from within wich users could > > launch local applications. Those applications are allready installed in > > the client PC. > > > > The link on the web page would act as a simple link to start the > > application. > > > > This page would be something that resembles the windows desktop with all > > its links on it. > > > > My question is would it be possible to start in example word or excel > > from a link in a web page? > > > > Thanks for your answers > > Mauricio > > > > -- > > 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] Can I retrieve a stored php session variable from within a javascript function?
Hi , I wonder if it's possible to retrieve the value from a php session variable from within a javascript function. Does anyone have any ideas about this? Thank you Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I retrieve a stored php session variable from within a javascript function?
Thanks for your advice. I've heard of this technique before but wanted to know if there was another way to do it from Javascript. Regards Mauricio On Sat, 2005-08-06 at 11:05, Burhan Khalid wrote: > Mauricio Pellegrini wrote: > > Hi , > > I wonder if it's possible to retrieve the value from a php session > > variable from within a javascript function. > > > > Does anyone have any ideas about this? > > No. You cannot retrieve it, restore it, read it, send it, anything else. > > You can write it from PHP : > > echo 'var sess = > '.$_SESSION['somevar'].''; > > But that's it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I retrieve a stored php session variable from within a javascript function?
Thanks Rick, it helped. also I'll do some reading about AJAX (as soon as I can..) Regards Mauricio On Sat, 2005-08-06 at 11:58, Rick Emery wrote: > Quoting Mauricio Pellegrini <[EMAIL PROTECTED]>: > > > Hi , > > I wonder if it's possible to retrieve the value from a php session > > variable from within a javascript function. > > I'm no PHP expert, but I'll give it a try (there are plenty of smart > people on this list who will correct me if Im wrong :-) > > > Does anyone have any ideas about this? > > Yes, two of the top of my head. > > 1. You can send the session variable to the client along with the script. > > ex. > function doSomething() > { >sessVar = ; > >// Do some stuff. > } > > Of course, sessVar won't be updated if the session variable changes > unless the script is reloaded. > > 2. My favorite, but probably overkill. Write a php page that outputs > the session variables (as XML would be cool). Then use xmlhttprequest > to retrieve them from javascript (Google AJAX for more information). > > Hope this helps, > Rick > -- > Rick Emery > > "When once you have tasted flight, you will forever walk the Earth > with your eyes turned skyward, for there you have been, and there > you will always long to return" > -- Leonardo Da Vinci -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to add .zip or gzip compression to the php module
Hi , This time I'm trying to add support for compressed files into the PHP module version 4.3.4 running with Apache 1.3.29 I remember adding dbase and mysql support with the following command > './configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs' > '-enable-dbase' Now I need to be able to create .zip files from within my php scripts,so my questions are: 1 ) Which command should I use when recompiling ? 2 ) Is it possible to save my actual compiled module just in case the new one has any problem? Thanks a lot Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session expires randomly
Hi, I have this problem , When I start a Session everything seems to be ok but sometimes with no reason the session vanishes. I'm using PHP 4.3.4 as a Apache module. Apache version is 1.3 under Suse Linux 8.2 All settings are default , I mean session_cache_expire is 180 min. I understand that this setting should make sessions last for at least 3 hours but in my case it seems not to be true since the real duration varies from 20 minutes to an hour I use session_start() and then on any routine I verify the existence of certain session variables. Is the server expiring the session automatically for some reason? Thanks Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session expires randomly
You were right! That was exactly the problem after reading your message, I 've verified the value for gc_maxlifetime and found that it was set to 1440 secs in other words 24 minutes. Thank you for that. But, now I need to come up with something to avoid this behaviour. The problem is that there's a second php application ruuning on the same server and I don't want to change the default for gc_maxlilfetime, So I was thinking on implementing some sort of automatic session refresh after a short period, let's say every 20 minutes of inactivity. And of course I should provide the users with a manual way to make session end, sort of a logout from the application.( no problem with that) My question is: Is there a way to set sort of a timer as to invoke an hipothetical "refresh_session.php" without reloading the current page on the client? Thanks Mauricio. On Fri, 2005-09-02 at 14:20, [EMAIL PROTECTED] wrote: > > On Fri, 2 Sep 2005, Mauricio Pellegrini wrote: > > > > > Hi, I have this problem , When I start a Session everything seems to > be > > > ok but sometimes with no reason the session vanishes. > > > > > > All settings are default , I mean session_cache_expire is 180 min. > > > I understand that this setting should make sessions last for at least > 3 > > > hours but in my case it seems not to be true since the real duration > > > varies from 20 minutes to an hour > > I think the parameter you need to look at in php.ini is > session.gc_maxlifetime. It sets the session lifetime, not > session_cache_expire. The default lifetime is probably 1440 seconds, > roughly 20 minutes, so the behavior you are seeing is completely normal - > it's all working as it should. > > Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session expires randomly
On Tue, 2005-09-06 at 19:43, Philip Hallstrom wrote: > On Tue, 6 Sep 2005, Mauricio Pellegrini wrote: > > > You were right! That was exactly the problem > > after reading your message, I 've verified the value for gc_maxlifetime > > and found that it was set to 1440 secs in other words 24 minutes. > > > > Thank you for that. > > > > But, now I need to come up with something to avoid this behaviour. > > > > The problem is that there's a second php application ruuning on the same > > server and I don't want to change the default for gc_maxlilfetime, > > > Why not just change it on your pages? The manual says it can get changed > anywhere... so just make a call to ini_set() on your pages and other > scripts will remain unaffected. > > ? Well I`ve just tryed that but didn't work. I think that ini_set("session.gc_maxlifetime","28800") is useless, because after setting the value for gc.maxlifetime the scripts ends normally. I mean the html is displayed and the application waits for user input. But at that time ( after the script has finished ) the original value for session.gc_maxlifetime is restored (defaults to 1440). So , does any one have any other ideas? Thanks Mauricio > > > > > > > > So I was thinking on implementing some sort of automatic session refresh > > after a short period, let's say every 20 minutes of inactivity. > > > > And of course I should provide the users with a manual way to make > > session end, sort of a logout from the application.( no problem with > > that) > > > > My question is: > > > > Is there a way to set sort of a timer as to invoke an hipothetical > > "refresh_session.php" without reloading the current page on the client? > > > > Thanks > > Mauricio. > > > > > > > > On Fri, 2005-09-02 at 14:20, [EMAIL PROTECTED] wrote: > >>> On Fri, 2 Sep 2005, Mauricio Pellegrini wrote: > >>> > >>>> Hi, I have this problem , When I start a Session everything seems to > >> be > >>>> ok but sometimes with no reason the session vanishes. > >>>> > >>>> All settings are default , I mean session_cache_expire is 180 min. > >>>> I understand that this setting should make sessions last for at least > >> 3 > >>>> hours but in my case it seems not to be true since the real duration > >>>> varies from 20 minutes to an hour > >> > >> I think the parameter you need to look at in php.ini is > >> session.gc_maxlifetime. It sets the session lifetime, not > >> session_cache_expire. The default lifetime is probably 1440 seconds, > >> roughly 20 minutes, so the behavior you are seeing is completely normal - > >> it's all working as it should. > >> > >> Kirk > > > > -- > > 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] Help retrieving an HTML array
Hi , I have a HTML page with a form in which there are some inputs like these: input type=text name=xname value="3303" input type=text name=xname value="9854" input type=text name=xname value="n..." the name of the input is always the same ( xname ) This generates automatically generates an array named xname in HTML with all the diferent values assigned to a diferent position. My question is : How do I retrieve that array from within PHP ? I've tryed the following $xname=$_REQUEST['xname']; and then echo $xname[0][0] ; // this returns nothing echo $xname[0] ;// this returns only first digit of the first input None of the above seem to recognize that xname is ( in HTML ) an array . Any help greatly appreciated Thanks Mauricio On Sun, 2005-10-02 at 19:38, adriano ghezzi wrote: > if i understand well you need to get an array from html post > > > if you use the same name for your html fields you automatically have > an array in $_POST > > eg > > input type=text name=myfield value="field_1" > input type=text name=myfield value="field_2" > > you'll get the array ar_myfield = $_POS['myfield'] > > you should achieve the same result using myfield[key] in the name of html > > hyh > > by ag. > > > 2005/10/2, Martin van den Berg <[EMAIL PROTECTED]>: > > Newbe question: > > > > How does one convert an array into a HTML GET request easely? Are > > there any standard functions? > > > > Same for HTML POST requests. > > > > Thanks, > > > > 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help retrieving an HTML array
Thank you all for your valuable support. The problem is solved. Note: This kind of input definition (without the brackets) actually *DOES* create an array under HTML 4.x (and its subindexes are accesible thru javascript) You forgot the array append operator: > > > > I also took the liberty of adding double quotes to your attributes. There's no > excuse for writing slop. > > To see what that produces... get used to doing: > > echo ''."\n"; > print_r( $_POST ); > echo "\n".''; > > Cheers, > Rob. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP authentication : logout!!!
It dont work, what you have to do is that: In the logout.php: -- Logout Sucessful -- And you have to inform the user to clean the password field, click ok, then the pop-up will open again, then user click in cancel. I just know that way to do. If anyone know another way, Postit! elias wrote: > > Never tried it though...but can you try to empty or unset the > $PHP_AUTH_USER/PWD ? > > -elias > http://www.eassoft.cjb.net > > ""Thomas Edison Jr."" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > i'm using http authentication for my php pages > > (members area). Once you login correctly, than you can > > access anypage as the authentication box doesn't > > pop-up. > > > > Now i woul like to create a logout link after clicking > > on which, whenever you click on a page using auth, the > > auth box should pop-up again and you must feed in your > > user/pass. What should this logout page contain? what > > coding do i have to do? > > From what i understand, there is a $auth which is > > "False" by default. When auth is succesfull, it > > contains "True". And once it's true, the auth box > > doesn't pop-up. I understand that probably clicking on > > this "logout" link should again make $auth false. But > > then $auth is on a lot of pages, how does this $auth > > on logout.php3 make all the other $auth's false? > > > > or is there some other way? > > > > the code i'm using for auth is : > > > > *** > > > $auth = false; // Assume user is not authenticated > > if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) { > > > > mysql_connect('localhost','root') or die ( > > 'Unable to connect to server.' ); > > mysql_select_db( 'skynet' ) or die ( 'Unable > > to select database.' ); > > > > // Formulate the query > > > > $sql = "SELECT * FROM register WHERE > > username = '$PHP_AUTH_USER' AND > > password = '$PHP_AUTH_PW'"; > > > > // Execute the query and put results in $result > > > > $result = mysql_query( $sql ) or die ( 'Unable to > > execute query.' ); > > > > // Get number of rows in $result. > > $num = mysql_numrows( $result ); > > if ( $num != 0 ) { > > > > // A matching row was found - the user is > > authenticated. > > > > $auth = true; > > } > > } > > > > if ( ! $auth ) { > > > > header( 'WWW-Authenticate: Basic realm="Private"' > > ); > > header( 'HTTP/1.0 401 Unauthorized' ); > > echo 'Authorization Required.'; > > exit; > > > > } else { > > > > %%stuff 2 do%% > > > > } > > ?> > > *** > > > > Regards, > > T. Edison jr. > > > > > > > > = > > Rahul S. Johari (Director) > > ** > > Abraxas Technologies Inc. > > Homepage : http://www.abraxastech.com > > Email : [EMAIL PROTECTED] > > Tel : 91-4546512/4522124 > > *** > > > > __ > > Do You Yahoo!? > > Yahoo! Auctions - buy the things you want at great prices > > http://auctions.yahoo.com/ > > -- Mauricio Souza Lima Programador - Catho ONLINE [EMAIL PROTECTED] www.catho.com.br [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP authentication : logout!!!
Cool, you have found another way! So the realm make diference? A user loged in a realm isn't the same in other realm? Very cool... Explain better your solution to us. Regards, Don Read wrote: > > On 07-May-01 Mauricio Souza Lima wrote: > > > And you have to inform the user to clean the password field, click ok, > > then the pop-up will open again, then user click in cancel. > > > > I just know that way to do. If anyone know another way, Postit! > > > > create a tmp directory > > > logoff.php3: > > require('secure.php3'); > authuser("Logoff"); // validate user (possible Dos attack here) > > $fname="tmp/$PHP_AUTH_USER"; > touch($fname); > Header("Location: http://www.mydomain.com/index.html";); > > - > > secure.php3: > > function checklogin($user,$pass='',$realm='') { > if (! dbInit()) { > echo "\n\n"; > die("Unable to contact database server"); > } > > $fname="tmp/$user"; > if (file_exists($fname)) { > unlink($fname); > return(false); > } > $query="select login from users > where login='$user' and password=PASSWORD('$pass')"; > // echo $query .''; > $result = mysql_query( $query); > $row = mysql_fetch_object($result); > if ($row) { > return(true); > } > return(false); > } > > function authheader($realm) { > Header('WWW-authenticate: basic realm="'.$realm .'"'); > Header('HTTP/1.0 401 Unauthorized'); > echo "\n\n"; > } > > function authuser($realm='Access') { > global $PHP_AUTH_USER, $PHP_AUTH_PW; > > if (! (isset($PHP_AUTH_USER)) ) { > authheader($realm); > exit; > } > if (! (checklogin($PHP_AUTH_USER, $PHP_AUTH_PW, $realm)) ) { > authheader($realm); > echo 'Failed Login'; > exit; > } > } > > Regards, > -- > Don Read [EMAIL PROTECTED] > -- It's always darkest before the dawn. So if you are going to >steal the neighbor's newspaper, that's the time to do it. -- Mauricio Souza Lima Programador - Catho ONLINE [EMAIL PROTECTED] www.catho.com.br [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Php extensions
Hi! I wanted to know somehting. If my hosting provider does not inlude PEAR in their PHP installation, am I able to do it myself? I mean like you do with some Perl modules that are not installed and you use use lib 'path_to_lib' in Perl. Is there a way to do something similar with Php extensions? Thanks in advance, Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Suggest Table Structure
Hi, you have to break your table in pieces and create tables for items that occur more than once. For example: CREATE TABLE articles ( ID int(6) NOT NULL auto_increment, id_category UNSIGNED INT REFERENCES category, HEADING varchar(30) NOT NULL DEFAULT '' , BODY longblob , ...) CREATE TABLE pictures ( ID int(6) NOT NULL auto_increment, PICTURE longblob , id_article UNSIGNED INT REFERENCES articles) CREATE TABLE category ( ID int(6) NOT NULL auto_increment, category varchar(30)) So, if you want to list all the pictures of the article 'Linux Rules!' you have to write a query like: SELECT heading, picture FROM articles, pictures WHERE pictures.id_article = articles.id AND heading='Linux Rules!' PS: A create the table category to illustrate how to put things in order with some normal forms. On Thu, Jul 05, 2001 at 02:31:55PM +0530, kachaloo wrote: > Hi guys, > I am making a table which will store articles for a site > and the feilds are : > > ID int(6) NOT NULL auto_increment, > CATEORY varchar(10) NOT NULL DEFAULT 'EVENTS' , > HEADING varchar(30) NOT NULL DEFAULT '' , > BODY longblob , > PICTURE longblob , > KEYWORD varchar(30) NOT NULL DEFAULT '' , > FILENAME varchar(50) , > FILESIZE varchar(50) , > FILETYPE varchar(50) , > PRIMARY KEY (ID), > UNIQUE ID (ID) > > > But now I noticed some of the articles will have more than one > picture... so how do I structure my talbe ? > > Thanks in advance, > Vishal > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] new lines in text fields
Hi, I don't know what is exactly what you want to do, but I have a page with a tag, and a mySQL database with a TEXT field, that way I can use newline breaks. Bye. On Fri, Jul 06, 2001 at 04:06:58PM +0100, Mat Marlow wrote: > Hi all, > I am in desperate need for a solution to HTML text fields not storing new > lines. I'm storing news articles in a database but all the text just ends up > in a big block because it ignores line breaks. Is thre a way around this > without having to upload text files? > > Thanks, > > Mat > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Loading values from a tag
Hi all, I want to print all the text stored in a tag. For example: Hello World Again!!! This is the final select, but is created dinamically with javascript. So when the sumbit button is pressed, I want that my php script output the folowing: The number of options is: X(3 in that example) The options was: value=1, text=Hello value=2, text=World value=3, text=Again!!! and so on. Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Secure Access to Remote MySQL DB
I think that SSL is the more transparent choice. Cheers. On Wed, Jul 18, 2001 at 11:38:19AM -0600, Matthew Aznoe wrote: > Greetings, > > I am developing an application that will access a MySQL database remotely > from another server. I would like to be able to use a standard database > connection using the 3306 port if possible for ease of development, but I > certainly do not want to be sending unencrypted data between my application > and the database. > > Is there a way to encrypt the database transactions between PHP and a remote > MySQL database? > > Matt > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a goog "whatever you want" editor
What about Emacs? I think this is the most powerful, configurable and extensible. Not only good with PHP, but also pretty good for any programming language (C, C++, Java, Ada, Assembly, HTML, etc). You can compile your programs from Emacs, and even debug them. Also have a lot of add-on like calculator, email client, news reader, calendar, ftp mode, etc. In my opinion, the best choice for a serious programmer. On Thu, Jul 19, 2001 at 12:30:24PM +0200, Aniceto Lopez wrote: > My opinion: "UltraEdit" https://www.ultraedit.com > > cheap, powerfull, totally configurable, ftp included, > http://www.ultraedit.com/products/features.html > free tag list (any code), word files, macros > > I use it for html, xml, xsl, wml, php, javascript... > > > > Ani Lopez > http://www.lamundial.net > visit us, download, spread our music -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sorry... but a good PHP editor for Linux/Unix
I think EMACS is the best choice for any language you like. Just install de php suport for EMACS. Bye On Tue, Jul 31, 2001 at 11:07:14PM -0300, Augusto Cesar Castoldi wrote: > Sorry about talking about this subject, but a really wanna know if any one > nows a good editor for linux/unix. > > Sometimes I need to work by SSH and I have to use the program pico. > > I can't use vi, to use it, i'll need to see the manual!! > > thanks, > > Augusto > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Mauricio Téllez Jiménez Seguimiento Técnico EDUMEXICO [EMAIL PROTECTED] [EMAIL PROTECTED] Zamora No. 25, Col Centro C.P. 91000, Xalapa, Ver. Tel. 52(28)17-86-87, 17-73-80 Fax. 52(28)18-64-13 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Reload a page when a user press the back button
Hi all, I don't know if this is a PHP related question, but here it is: I'm developing a PHP / MySQL site, and, in one page the admin of the site has the power to add categories to the database in a field. To check if the entry is already set, there is a control with all the entries in the database. So, when the admin type the name of the categorie and press the submit button, another page load and tell if the insert operation was success or not. Then if the entry was add and press the back link ( [ back ] ) the option in the is not show after the user press the reload button. Is there a way that the page reaload automatically the data from the database without the user pressing the reload button? Thanks in advance. -- Mauricio Téllez Jiménez Seguimiento Técnico EDUMEXICO [EMAIL PROTECTED] [EMAIL PROTECTED] Zamora No. 25, Col. Centro C.P. 91000, Xalapa, Ver. Tel. 52(28)17-86-87, 17-73-80 Fax. 52(28)18-64-13 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]