[PHP] Dates problem
Hi! I have a problem with dates. I have a function that sum a duration in laboral days to an initial date. The problem come when the function reaches the last sunday of October, the data remains in the last sunday of October and make an infinite loop. The functions works fine i have test in all the cases and only fails in the last sunday of October. Can anyone help me? Thanks in advance. PD: Jochem home english is bad english :P -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dates problem
On Wednesday 27 April 2005 09:17, Mario de Frutos Dieguez wrote: Hi! I have a problem with dates. I have a function that sum a duration in laboral days to an initial date. The problem come when the function reaches the last sunday of October, the data remains in the last sunday of October and make an infinite loop. The functions works fine i have test in all the cases and only fails in the last sunday of October. So, let's see the function. Can anyone help me? Thanks in advance. PD: Jochem home english is bad english :P -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436 pgpcnojEYuGrX.pgp Description: PGP signature
Re: [PHP] component template questions
On Wednesday 27 April 2005 08:34, Evert|Rooftop wrote: Hi folks, I'm working on a component system for php forms and all, and I'm wondering about an issue I have. I have a few ideas on how to fix this problem, but I would like to hear your oppinions about it. These are my classes: Component FormElement extends Component ComboBox extends FormElement InteliComboBox extends ComboBox The problem is, I want the components to be able to work accross different platforms (for example XHTML, WML or XUL) and there should be an ability to add new platforms. How would you make a template system for this? I think the different platfoms have to be mapped to different templates for each class. Then you just construct the objects taking in mind the platform you need at the moment. A simple scenario: You have an aplication that is used via mobile users (WAP for instance), regular web users (XHTML), regular users with Mozilla (XUL) - when a user comes, you detect his platform, take the template for this platform and construct the object using it. Another client comes with different platform, you apply a different template, construct the object using it, etc. Just being abstract enough - don't hardcode such templates in the classes. Automatic management of the templates will be easy using a RDBMS. Or is there a better way? Thanks for your input on this, Evert -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436 pgpmQr3IMG7dO.pgp Description: PGP signature
Re: [PHP] Product details not being displayed, based on passed id
On Wednesday 27 April 2005 08:54, Mark Sargent wrote: Hi All, this page, http://webmonkey.wired.com/webmonkey/99/21/index3a_page3.html?tw=programmin g has code that is supposed to pass an id via the url string to the same page, and display info of a particular product, based on the id being passed. Everything works fine, until I click the link, and instead of the proudct's details being displayed, based on that id, I get the original page, with the lnks. I've right clicked the links, and viewed properties, where I see that the id=n is set. Why doesn't it pull the record based on the id being passed..? Cheers. Are you sure your webserver handles it's rewrite rules correctly? Maybe you use apache - check the mod_rewrite settings, rules, etc. Have in mind that the rewrite engine is being enabled using the RewriteEngine on directive. Mark Sargent. P.S. I've inserted, echo $id to display the id value. Nothing appears. html body ?php $db = mysql_connect(localhost, root, grunger); mysql_select_db(status,$db); // display individual record if ($id) { echo $id $result = mysql_query(SELECT * FROM Products WHERE product_id=$id,$db); $myrow = mysql_fetch_array($result); printf(Product Name: %s\nbr, $myrow[product_name]); printf(Product Model Number: %s\nbr, $myrow[product_model_number]); printf(Product Serial Number: %s\nbr, $myrow[product_serial_number]); printf(Product Price: %s\nbr, $myrow[product_price]); } else { // show employee list $result = mysql_query(SELECT * FROM Products,$db); if ($myrow = mysql_fetch_array($result)) { // display list if there are records to display do { printf(a href=\%s?id=%s\%s/abr\n, $PHP_SELF, $myrow[product_id], $myrow[product_name]); } while ($myrow = mysql_fetch_array($result)); } else { // no records to display echo Sorry, no records were found!; } } ? /body /html -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436 pgpFCCJrtXoI6.pgp Description: PGP signature
Re: [PHP] JavaScript - object property
Eli wrote: Hi, I know this is not the forum, but I googled and couldn't find it, so please try to help me with this. /*/ function MyCls(name) { this.name=name; } function SayHi() { alert('Hi, '+this.name+'!'); } var obj=new MyCls('PHP'); obj.name='JavaScript'; //this will call SayHi() function /*/ I have a class in JS with a property variable in it. How can I execute a function when the property value is changed? Sorry it's off-topic.. -thanks, Eli Look at Object's watch() method -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating ERD from an existing MySQL Table
Hi! I need to create an ERD from an existing MySQL table. Is there any such tool/script to do it automatically? Thanks in advance :) SayOrange.com How to choose the best web hosting? http://www.sayorange.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Product details not being displayed, based on passed id
Petar Nedyalkov wrote: On Wednesday 27 April 2005 08:54, Mark Sargent wrote: Hi All, this page, http://webmonkey.wired.com/webmonkey/99/21/index3a_page3.html?tw=programmin g has code that is supposed to pass an id via the url string to the same page, and display info of a particular product, based on the id being passed. Everything works fine, until I click the link, and instead of the proudct's details being displayed, based on that id, I get the original page, with the lnks. I've right clicked the links, and viewed properties, where I see that the id=n is set. Why doesn't it pull the record based on the id being passed..? Cheers. Are you sure your webserver handles it's rewrite rules correctly? Maybe you use apache - check the mod_rewrite settings, rules, etc. Have in mind that the rewrite engine is being enabled using the RewriteEngine on directive. Mark Sargent. P.S. I've inserted, echo $id to display the id value. Nothing appears. html body ?php $db = mysql_connect(localhost, root, grunger); mysql_select_db(status,$db); // display individual record if ($id) { echo $id $result = mysql_query(SELECT * FROM Products WHERE product_id=$id,$db); $myrow = mysql_fetch_array($result); printf(Product Name: %s\nbr, $myrow[product_name]); printf(Product Model Number: %s\nbr, $myrow[product_model_number]); printf(Product Serial Number: %s\nbr, $myrow[product_serial_number]); printf(Product Price: %s\nbr, $myrow[product_price]); } else { // show employee list $result = mysql_query(SELECT * FROM Products,$db); if ($myrow = mysql_fetch_array($result)) { // display list if there are records to display do { printf(a href=\%s?id=%s\%s/abr\n, $PHP_SELF, $myrow[product_id], $myrow[product_name]); } while ($myrow = mysql_fetch_array($result)); } else { // no records to display echo Sorry, no records were found!; } } ? /body /html Hi All, yes, using Apache2 as my test web server. I'm even more a novice with it. I'm not too sure I understand what you are asking me to check. I looked in apache2/conf/httpd.conf for somethig related to RewriteEngine, but found nothing. Could you explain a little more..? Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dates problem
Petar Nedyalkov escribió: On Wednesday 27 April 2005 09:17, Mario de Frutos Dieguez wrote: Hi! I have a problem with dates. I have a function that sum a duration in laboral days to an initial date. The problem come when the function reaches the last sunday of October, the data remains in the last sunday of October and make an infinite loop. The functions works fine i have test in all the cases and only fails in the last sunday of October. So, let's see the function. Can anyone help me? Thanks in advance. PD: Jochem home english is bad english :P -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo function aCalculaFechas($oSqlBDGestion,$fecFechaIniProyecto,$iDuracion) { $iCont=0; //Descomponemos los argumentos y pasamos las fechas a formato Y/m/d $aFecIniTemp=split(/,$fecFechaIniProyecto); $fecFechaInicio=date(Y/m/d,mktime(0,0,0,$aFecIniTemp[1],$aFecIniTemp[0],$aFecIniTemp[2])); if ($iDuracion0) { //Generamos una fecha temporal sobre la que haremos los cálculos $fecFechaFinTemp=$fecFechaInicio; //Sumamos uno a la fecha para iniciar la cuenta de la duración un día despues de la fecha de inicio $fecFechaFinTemp=$this-SumarFechas($fecFechaFinTemp,1); //Ejecutamos un bucle que irá calculando la duración total (incluyendo sabados y domingos) a partir de la duración //laboral while ($iCont($iDuracion)) { //Obtenemos el día de la semana del día que estamos mirando $aFecTempCalculo=split('/',$fecFechaFinTemp); $iDiaSemanaTemp=date(w,mktime(0,0,0,$aFecTempCalculo[1],$aFecTempCalculo[2],$aFecTempCalculo[0])); //Si el día es distinto de domingo o sabado aumentamos el contador de duración laboral if ($iDiaSemanaTemp!=6 $iDiaSemanaTemp!=0) { $iCont++; } //Se añade uno más a la fecha $fecFechaFinTemp=$this-SumarFechas($fecFechaFinTemp,1); //Siempre se añade uno al número de días totales. $iNumDiasTotales++; //echo $iNumDiasTotales.'br'; } //Sumamos al a fecha temporal el número de dias totales (solo incluidos sabados y domingos) $fecFechaFinTemp=$this-SumarFechas($fecFechaInicio,$iNumDiasTotales); //Hacemos un bucle obteniendo los días festivos usando la fecha final temporal y hasta que no se obtengan dias //festivos sigue sumandolos. do { //echo SELECT * FROM festivos WHERE dia_festivo BETWEEN '.$fecFechaInicio.' AND '.$fecFechaFinTemp.'; //Obtenemos los dias festivos entre el rango de fechas $iObtenDiasFest=$oSqlBDGestion-iEjecutarConsulta(SELECT * FROM festivos WHERE dia_festivo BETWEEN '.$fecFechaInicio.' AND '.$fecFechaFinTemp.'); $iNumDiasFestivos=$oSqlBDGestion-iNumeroFilasResultadoConsulta($iObtenDiasFest); $fecFechaInicio=$this-SumarFechas($fecFechaFinTemp,1); $fecFechaFinTemp=$this-SumarFechas($fecFechaFinTemp,$iNumDiasFestivos); }while ($iNumDiasFestivos0); $aFecTempCalculo=split('/',$fecFechaFinTemp); $iDiaSemanaTemp=date(w,mktime(0,0,0,$aFecTempCalculo[1],$aFecTempCalculo[2],$aFecTempCalculo[0])); if ($iDiaSemanaTemp==6) $fecFechaFin=$this-SumarFechas($fecFechaFinTemp,3); else if ($iDiaSemanaTemp==0) $fecFechaFin=$this-SumarFechas($fecFechaFinTemp,2); else $fecFechaFin=$fecFechaFinTemp; $aFecFin=split(/,$fecFechaFin); $fecFechaFin=date(d/m/Y,mktime(0,0,0,$aFecFin[1],$aFecFin[2],$aFecFin[0])); } else $fecFechaFin=$fecFechaIniProyecto; return $fecFechaFin; } -- Mario de Frutos Dieguez División de Ingeniería del Software y Comunicaciones CARTIF -Parque Tecnológico Boecillo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] JavaScript - object property
Richard Lynch wrote: On Tue, April 26, 2005 7:51 pm, Eli said: I know this is not the forum, but I googled and couldn't find it, so please try to help me with this. /*/ function MyCls(name) { this.name=name; } function SayHi() { alert('Hi, '+this.name+'!'); } var obj=new MyCls('PHP'); obj.name='JavaScript'; //this will call SayHi() function /*/ I have a class in JS with a property variable in it. How can I execute a function when the property value is changed? I don't think JavaScript has any way to hook into a property being changed and take some action on that... It *MIGHT* have 'private' properties, that can't be changed by child classes, and then you'd have to use a function to change the property, and then your function that changes the property can do whatever it wants... But that all assumes JavaScript even has private properties, which it may not have. ..it has closures - which allow you to create/emulate private properties as you know them from other langs, I abuse this occasionally but I hardly understand it. (so what Richard described can be done in JS) a couple of points about JavaScript: 1. everything is a object! 2. the object model is prototype based, which is quite orthoganol to PHP's object model (for instance) - something that is liable to bite you in the ass a few times. 3. is a _lot_ more powerful (and well thought out) than its given credit for. 4. in terms of being a 'dynamic' language it makes PHP look like its statically typed compiled ;-) - which is in no way a dig at PHP (which is lovely just the way it is :-) nice one Marek for the heads up on the watch() method, much obliged to you! here is a link that explains the watch method for those too lazy to google: http://www.devguru.com/Technologies/ecmascript/quickref/watch.html now lets get back to PHP on this list shall we ;-) Your only other option is to just DOCUMENT that nobody should ever alter .name directly, but should always use your changeName() function which does whatever you want it to do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: handling a user pressing browser's back button
Perhaps it might help to think about this from the point of view of what you are trying to prevent. Is the most important thing to make sure that your data integrity is intact? For example, - you allow users to add a record on page 1 - on page 2, check that the record does not already exist, if it doesn't then insert it - you allow users to update or delete a record on page 1 - the only problem here is if they are trying to update a record they have already deleted, then pressed back to see it again. Once again, you just need to check for its existence on page before running the update query. This way, you don't need to worry about what the browser does when the user hits back, or which page it serves Mark -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: 27 April 2005 06:03 To: Matthew Weier O'Phinney Cc: php-general@lists.php.net Subject: Re: [PHP] Re: handling a user pressing browser's back button On Tue, April 26, 2005 7:02 pm, Matthew Weier O'Phinney said: 1. Display form on page 1. Page 1 has Cache-Control: no-cache header. 2. User submits form to page 2 3. Page 2 processes form, stores required variables in session, and then redirects to page 3. 4. Page 3 displays results (success page, search results, etc.) At this point, when you hit the back button, you *should* get to page 1... which, because of the no-cache header, is forced to reload. Except that if you're fast enough, and can hit the ALT-left_arrow, and then escape fast enough to get to page 2. Or, with some browsers, you can't get back to page 1 AT ALL, unless you hit back twice rapidly in succession, or use the popup back menu to skip the middle page that does the re-direct. I *hate* sites that do this to me! I've even been known to just stop using a site if it annoys me often enough in this regard. YMMV NATAU (Not applicable to all users) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, Cisco, Sun Microsystems, 3Com GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 2000' REGISTERED COMPANY ** CONFIDENTIALITY NOTICE: This Email is confidential and may also be privileged. If you are not the intended recipient, please notify the sender IMMEDIATELY; you should not copy the email or use it for any purpose or disclose its contents to any other person. GENERAL STATEMENT: Any statements made, or intentions expressed in this communication may not necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no content herein may be held binding upon Gamma Global (UK) Ltd or any associated company unless confirmed by the issuance of a formal contractual document or Purchase Order, subject to our Terms and Conditions available from http://www.gammaglobal.com EOE ** ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] appending to a file using ftp functions
Hi, I'm developing an application that uploads file to a server using http. the app calls a php on the server sending all the data just like a web form post. It works just fine uploading little files, now i'm concerning about having the apllication split large files in little chunks ( about 256 KB os so ) and sending them with multiple post. Wanna do that to avoid possible problems with php temporary files max size. No problem on the client side ( is sends the form with some info and the firts chunk, waits for server response and then repost a form with succesive chunk of file, and so on ), and also on the php side should be quite easy to store a file with the first post, and keep on adding to it the subsequent chunks of file posted, at least using the filesystem functions. My problem is that I'm using, to make the system as general as possible, and make it work even on servers where php doesn't have write privileges, ftp functions instead of filesystem functions, and using ftp it seems that it's not possible to append to a file. I also thinked to use the fopen function with an ftp address, but reading the docs it says that fseek function ( to position the pointer at eof to go on appending ) may not work if the file is opened using ftp or http. Suggestion about this issue? thank you in advance, Giulio Cantoberon Multimedia srl http://www.cantoberon.it Tel. 06 39737052 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] beginner volunteer
Hi, I've been reading up on php for a while now and would like to get involved in a small open source LAMP project. I don't have any real coding experience to speak of but could bring proofreading, bug-reporting, testing and documentation skills to the project. What I'd like to get out of working on it is: experience working with a variety of other individuals over the internet on a common application; real life knowledge of CVS and the development process; some experience writing simple code. If anyone knows of any opportunities like this or would like to discuss what I could add to one of their own projects please contact me. Regards, Malcolm. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to a file using ftp functions
Giulio wrote: Hi, I'm developing an application that uploads file to a server using http. the app calls a php on the server sending all the data just like a web form post. It works just fine uploading little files, now i'm concerning about having the apllication split large files in little chunks ( about 256 KB os so ) and sending them with multiple post. Wanna do that to avoid possible problems with php temporary files max size. No problem on the client side ( is sends the form with some info and the firts chunk, waits for server response and then repost a form with succesive chunk of file, and so on ), and also on the php side should be quite easy to store a file with the first post, and keep on adding to it the subsequent chunks of file posted, at least using the filesystem functions. My problem is that I'm using, to make the system as general as possible, and make it work even on servers where php doesn't have write privileges, ftp functions instead of filesystem functions, and using ftp it seems that it's not possible to append to a file. I also thinked to use the fopen function with an ftp address, but reading the docs it says that fseek function ( to position the pointer at eof to go on appending ) may not work if the file is opened using ftp or http. Suggestion about this issue? ftp_put() has startpos parameter. I think you need to turn FTP_AUTOSEEK off, because you have only partial file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mac OS X compilation problem
In the past I've had success compiling PHP4 on OS X. However, now I'm trying to get PHP5 working and not having much luck. I'm getting configure to work, and make goes ok until the final linking stage at which point I get this error: ld: unknown flag: -export-symbols make: *** [libs/libphp5.bundle] Error 1 It seems that that flag must be set in a make file somewhere (it's not in my environment), and it's certainly not documented in the OS X ld man pages. Not sure if it makes any difference, but most of the external modules that PHP uses are built from fink. I need some modules that are not supported in any of the pre-built fink PHP5 packages, and I'm used to compiling it without difficulty on Linux and OpenBSD. Anyone else run into this or have any idea how I might fix it? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to a file using ftp functions
Marek, thank you for your answer, Il giorno 27/apr/05, alle 1:28 PM, Marek Kilimajer ha scritto: Giulio wrote: My problem is that I'm using, to make the system as general as possible, and make it work even on servers where php doesn't have write privileges, ftp functions instead of filesystem functions, and using ftp it seems that it's not possible to append to a file. I also thinked to use the fopen function with an ftp address, but reading the docs it says that fseek function ( to position the pointer at eof to go on appending ) may not work if the file is opened using ftp or http. Suggestion about this issue? ftp_put() has startpos parameter. I think you need to turn FTP_AUTOSEEK off, because you have only partial file. I see... but startpos was added on 4.3.0, that's why I did't find it on my ( quite old, now i realize ) manual. do you think that i should use it and be confident that php 4.3 is at the moment widely installed? Regards, Giulio Cantoberon Multimedia srl http://www.cantoberon.it Tel. 06 39737052 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: beginner volunteer
Malcolm Mill wrote: Hi, I've been reading up on php for a while now and would like to get involved in a small open source LAMP project. I don't have any real coding experience to speak of but could bring proofreading, bug-reporting, testing and documentation skills to the project. What I'd like to get out of working on it is: experience working with a variety of other individuals over the internet on a common application; real life knowledge of CVS and the development process; some experience writing simple code. If anyone knows of any opportunities like this or would like to discuss what I could add to one of their own projects please contact me. Regards, Malcolm. Look in any of your favorite PHP classes / scripts. It seems that TODO is the most popular word in the Open Source language and there is always something you can add to a project. I'm not a code maintainer, but you might consider browsing PEAR packages and just looking to see which projects could use some help. Or maybe you could write to the pear.php.general newsgroup and offer up your services. Or if you just want to get involved with general PHP stuff then you might consider the php.doc list (or any of the sublists for your language of choice). They can always use more help and it's a great way to learn PHP inside and out. Last but not least... you can answer questions on this list. The key here is that you focus on answering questions that you already know how to answer. Then you leave the other questions to people that *do* understand that problem. noteIf you try to answer a problem that you don't understand well at all then you occasionally end up giving out boneheaded answers. And trust me, I've wiped many eggs off of my face because of this list :P /note -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML language for database schema definitions
Hello I am developing a PHP-implemented library which would allow a PHP programmer to write pre-defined data to a database. The library would be able to work with different database schemas and I need a way to inform the library with what kind of database schema it has to work with. I thought a good way to do that would be to describe the database schemas in XML. Because I don't want to write a new DTD just for this application, do you have any idea whether a database schema definition DTD already exists which allows XML documents to describe how a database is structured? -- NSK http://portal.wikinerds.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting Credit card details
Ross wrote: Here's what I want to do.. Uh-Oh, here we go again. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to a file using ftp functions
I tryied using ftp_put() with startpos parameter, but I receive an error Appen/Restart not permitted, try again I tryed both FTP_AUTOSEEK on and off, and both pasv true and false I imagine that this is an ftp server error message, and not a php error, since I have searched it on php documentation with no success, is startpos option depending on the ftp server supporting append commands? Il giorno 27/apr/05, alle 1:56 PM, Giulio ha scritto: ftp_put() has startpos parameter. I think you need to turn FTP_AUTOSEEK off, because you have only partial file. I see... but startpos was added on 4.3.0, that's why I did't find it on my ( quite old, now i realize ) manual. do you think that i should use it and be confident that php 4.3 is at the moment widely installed? Regards, Giulio Cantoberon Multimedia srl http://www.cantoberon.it Tel. 06 39737052 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to a file using ftp functions
Giulio wrote: I tryied using ftp_put() with startpos parameter, but I receive an error Appen/Restart not permitted, try again I tryed both FTP_AUTOSEEK on and off, and both pasv true and false I imagine that this is an ftp server error message, and not a php error, since I have searched it on php documentation with no success, is startpos option depending on the ftp server supporting append commands? yes, it is. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to a file using ftp functions
Giulio wrote: I tryied using ftp_put() with startpos parameter, but I receive an error Appen/Restart not permitted, try again http://www.proftpd.org/docs/faq/linked/faq-ch4.html#AEN408 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Designer 2005
Thanks for all the suggestions, I think I've fixed the problem. I downloaded and licensed PHPEdit by waterproof. Just in case you were wondering, i have a P4 2.8 GHz system with 512 MB of RAM. WinXP Home Fedora Core 3 Dual-Boot. I couldn't find any settings that needed changing, so I just got rid of it and found something better... Thanks again! On 4/26/05, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, April 25, 2005 7:43 pm, The Disguised Jedi said: another process tries to do something, phpDesigner shrinks into the background, and uses almost no CPU, only to crawl back up to 100% after the other process is finished. Not to be alarmist, but that almost sounds like some kind of well-written virus that has attached itself to the .exe somehow... Maybe just try downloading it fresh. [shrug] Also check in all the menus for any kind of keep alive setting or something for, like, connections to remote (or even local) sites. Perhaps it's freaking out trying to keep your FTP/SCP connection open or something like that... Just wild guesses at this point. -- Like Music? http://l-i-e.com/artists.htm -- The Disguised Jedi [EMAIL PROTECTED] Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm world-wide BABY! PHP rocks! Knowledge is Power. Power Corrupts. Go to school, become evil Disclaimer: Any disclaimer attached to this message may be ignored. However, I must say that the ENTIRE contents of this message are subject to other's criticism, corrections, and speculations. This message is Certified Virus Free
[PHP] Re: XML language for database schema definitions
Hello, on 04/27/2005 10:04 AM Nsk said the following: I am developing a PHP-implemented library which would allow a PHP programmer to write pre-defined data to a database. The library would be able to work with different database schemas and I need a way to inform the library with what kind of database schema it has to work with. I thought a good way to do that would be to describe the database schemas in XML. Because I don't want to write a new DTD just for this application, do you have any idea whether a database schema definition DTD already exists which allows XML documents to describe how a database is structured? That is an old idea introduced by Metabase in 1999: http://www.phpclasses.org/metabase -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: beginner volunteer
Jason Barnett wrote: Malcolm Mill wrote: Hi, I've been reading up on php for a while now and would like to get involved in a small open source LAMP project. I don't have any real coding experience to speak of but could bring proofreading, bug-reporting, testing and documentation skills to the project. What I'd like to get out of working on it is: experience working with a variety of other individuals over the internet on a common application; real life knowledge of CVS and the development process; some experience writing simple code. If anyone knows of any opportunities like this or would like to discuss what I could add to one of their own projects please contact me. Regards, Malcolm. Look in any of your favorite PHP classes / scripts. It seems that TODO is the most popular word in the Open Source language and there is always something you can add to a project. there should a language keyword called 'todo', maybe we could ask the devs to add this 'feature' - which if accepted would be put on someones todo list... hmmm, that smells like recursion or something ;-) you put a smile on my face Jason! I'm not a code maintainer, but you might consider browsing PEAR packages and just looking to see which projects could use some help. Or maybe you could write to the pear.php.general newsgroup and offer up your services. Or if you just want to get involved with general PHP stuff then you might consider the php.doc list (or any of the sublists for your language of choice). They can always use more help and it's a great way to learn PHP inside and out. Last but not least... you can answer questions on this list. The key here is that you focus on answering questions that you already know how to answer. Then you leave the other questions to people that *do* understand that problem. noteIf you try to answer a problem that you don't understand well at all then you occasionally end up giving out boneheaded answers. And trust me, I've wiped many eggs off of my face because of this list :P /note knowing the answer is also no assurance of giving out boneheaded answers, ... I have a permanent tab at the dry-cleaners to prove it ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] step by step learning
Paul Kain wrote: Hi there are there any sites online that show one how to learn php in a step by step fashion? I am really lost and would need to start at the very beginning I already know and understand html maybe start here: http://php.net/tut.php also google for tutorials, there are plenty out there. and when you get stuck - just mail this list! as long as you can show that you have/are making an effort to research your problems (and you ask concise,clear questions) you'll find _plenty_ of people willing to help. sidenote it pays to know who this guy (same goes for other developers of php) is: http://lerdorf.com/bio.php. so that... a, you know to read anything he posts to this list (which must to my continual amazement he continues to do occasionally, much respect for that!) - I always learn something from his posts, chances are you will too, although sometimes it may go over you head :-) b, you know not to argue with him offhand if he does post :-) /sidenote also don't be afraid to try stuff out, to go out of your depth... cos thats the best way to learn! lastly - welcome to php-land :-) have fun! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LDAP and .htaccess
Hello all- I am looking for a way to protect a directory's contents by authenticating against Active Directory via LDAP. I currently have a nice little php script that tries to bind to LDAP via a username and password entered in a form. If it fails to bind, the user is denied access. If it succeeds in binding, it then checks to make sure the user is part of a specified group. It works wonderfully, but the problem I've run in to (obviously) is that the plain files (.pdf, images, etc) are not protected in any manner. I know you can use php to authenticate against a .htaccess file, and that you can use mod_auth_ldap (I'm using apache 1.3) to authenticate against LDAP. I would like to avoid using mod_auth_ldap if possible because it requires credentials to be stored in it, thus making the code less portable and more insecure. Is there any way to use some type of php trickery to protect all of the contents of a given directory? Thanks! Bret Walker smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] LDAP and .htaccess
Bret Walker wrote: Hello all- I am looking for a way to protect a directory's contents by authenticating against Active Directory via LDAP. I currently have a nice little php script that tries to bind to LDAP via a username and password entered in a form. If it fails to bind, the user is denied access. If it succeeds in binding, it then checks to make sure the user is part of a specified group. It works wonderfully, but the problem I've run in to (obviously) is that the plain files (.pdf, images, etc) are not protected in any manner. I know you can use php to authenticate against a .htaccess file, and that you can use mod_auth_ldap (I'm using apache 1.3) to authenticate against LDAP. I would like to avoid using mod_auth_ldap if possible because it requires credentials to be stored in it, thus making the code less portable and more insecure. auth_ldap doesn't require credentials to be stored in the .htaccess file or anywhere else. It can work the same way as you described your php login page (even supports group lookups). Is there any way to use some type of php trickery to protect all of the contents of a given directory? store the files outside of the directory and use something like download.php?file=readme.txt to serve them. Kenny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: handling a user pressing browser's back button
Richard Lynch mailto:[EMAIL PROTECTED] on Tuesday, April 26, 2005 10:03 PM said: Or, with some browsers, you can't get back to page 1 AT ALL, unless you hit back twice rapidly in succession, or use the popup back menu to skip the middle page that does the re-direct. I think that only applies when redirection is being done by javascript. I've never experienced this or had any complaints if I use the Location header to perform redirection. I *hate* sites that do this to me! So do I. I've even been known to just stop using a site if it annoys me often enough in this regard. Your self-will is incredible! :P Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LDAP and .htaccess
Well, the download.php script would allow me to protect certian files, but is there a way to protect all files? For example, images that I would like to include in my php pages. Could I silently pass a username and password to htaccess? Can htaccess be set to use a php script instead of a htpasswd file? Thanks, Bret Kenny Austin wrote: Bret Walker wrote: Hello all- I am looking for a way to protect a directory's contents by authenticating against Active Directory via LDAP. I currently have a nice little php script that tries to bind to LDAP via a username and password entered in a form. If it fails to bind, the user is denied access. If it succeeds in binding, it then checks to make sure the user is part of a specified group. It works wonderfully, but the problem I've run in to (obviously) is that the plain files (.pdf, images, etc) are not protected in any manner. I know you can use php to authenticate against a .htaccess file, and that you can use mod_auth_ldap (I'm using apache 1.3) to authenticate against LDAP. I would like to avoid using mod_auth_ldap if possible because it requires credentials to be stored in it, thus making the code less portable and more insecure. auth_ldap doesn't require credentials to be stored in the .htaccess file or anywhere else. It can work the same way as you described your php login page (even supports group lookups). Is there any way to use some type of php trickery to protect all of the contents of a given directory? store the files outside of the directory and use something like download.php?file=readme.txt to serve them. Kenny -- Bret Walker Technical Support Consultant Medill School of Journalism Northwestern University 847-467-7845 847-491-2370 fax [EMAIL PROTECTED] http://www.it.medill.northwestern.edu/ smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] LDAP and .htaccess
Bret Walker wrote: I'm not too sure, but it seems to be having an effect you any text showing up in your emails. John Hinton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL PHP issue?
OK, I have check all the mysql doc and php docs on using exists in the query, but it seems I still can not get the query to work. Here it is: SELECT * FROM icisp.account WHERE id in (select oldaccountID from BillMax.account) Or Using sELECT * FROM icisp.account WHERE id exists(select oldaccountID from BillMax.account) Anyone have any idea what I'm doing wrong? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[Fwd: Re: [PHP] LDAP and .htaccess]
Re: John Hinton Perhaps my S/MIME cert. was preventing the text from coming through. This message is unsigned. Bret Original Message Subject: Re: [PHP] LDAP and .htaccess Date: Wed, 27 Apr 2005 14:08:14 -0500 From: Bret Walker [EMAIL PROTECTED] To: php-general@lists.php.net References: [EMAIL PROTECTED] [EMAIL PROTECTED] Well, the download.php script would allow me to protect certian files, but is there a way to protect all files? For example, images that I would like to include in my php pages. Could I silently pass a username and password to htaccess? Can htaccess be set to use a php script instead of a htpasswd file? Thanks, Bret Kenny Austin wrote: Bret Walker wrote: Hello all- I am looking for a way to protect a directory's contents by authenticating against Active Directory via LDAP. I currently have a nice little php script that tries to bind to LDAP via a username and password entered in a form. If it fails to bind, the user is denied access. If it succeeds in binding, it then checks to make sure the user is part of a specified group. It works wonderfully, but the problem I've run in to (obviously) is that the plain files (.pdf, images, etc) are not protected in any manner. I know you can use php to authenticate against a .htaccess file, and that you can use mod_auth_ldap (I'm using apache 1.3) to authenticate against LDAP. I would like to avoid using mod_auth_ldap if possible because it requires credentials to be stored in it, thus making the code less portable and more insecure. auth_ldap doesn't require credentials to be stored in the .htaccess file or anywhere else. It can work the same way as you described your php login page (even supports group lookups). Is there any way to use some type of php trickery to protect all of the contents of a given directory? store the files outside of the directory and use something like download.php?file=readme.txt to serve them. Kenny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mailform and mailit.php problem.
Hello, I have a problem. I downloaded the form mailer dynaform1.4 and it looks like it works perfectly. I mad a form en adjusted te mailit scrit to my mailadress. When i test the form it is send eand i get the thanks message. But the mail will never come in to my mailbox? what shout i do? Please help me. Jim van den Noort ? // ## // ## // // DynaForm v1.4 - Created by the Webligo Group // http://www.webligo.com // // YOUR USE OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES YOUR ACCEPTANCE // OF THE FOLLOWING LICENSE AGREEMENT: // // THIS SCRIPT AND ALL OF ITS CONTENTS ARE LICENSED UNDER THE // GPL FREEWARE LICENSE. IT MAY NOT BE RESOLD OUR USED COMMERCIALLY // WITHOUT EXPRESSED PERMISSION OF THE WEBLIGO GROUP. IT MAY, HOWEVER, // BE DISTRIBUTED FREELY WITHOUT CHARGE. THIS SOFTWARE IS INTELLECTUAL // PROPERTY OF THE WEBLIGO GROUP. ANYONE VIOLATING THIS AGREEMENT WITHOUT // THE EXPRESSED PERMISSION OF THE WEBLIGO GROUP MAY BE LEGALLY PROSECUTED. // YOUR DOWNLOAD AND USE OF THIS SOFTWARE ALSO SIGNIFIES THAT YOU UNDERSTAND // AND AGREE TO THE DOWNLOAD AGREEMENT YOU READ UPON DOWNLOAD. // // The Webligo Group, its management, or any of its employees, associates, or // partners cannot be held liable for any damages that this software may cause. // As the Licensee and user of the software, you agree to accept full liability // for any damages or risk involved with using this software. // // If you need help installing or using this software, please // read the readme.txt file that was provided with it. // // This file and all related content are the intellectual // property of the Webligo Group and are under copyright. // // If you plan to use this script for your clients, sell it as a service, // or utilize it in any other commercial manner, you must purchase a commercial // license. Please see this page for more information: // http://webligo.com/products_dynaform.php // // We do not provide support for this script, unless you have purchased a // commercial license. // // Feel free to visit our website (http://www.webligo.com) // if you wish to send us any comments, etc. // // ### // ### // ### // CONFIGURE FROM: ADDRESS ## // THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE // DOING. PLEASE READ README.TXT FOR MORE INFORMATION. // If you would like to specify the From: address of emails sent by DynaForm, // enter it between the double quotes below. If you leave this blank, the // server will assign the default email address. $from_address = ; // ### // ### // ### // ACTIVATE REQUIRED FIELDS? // THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE // DOING. PLEASE READ README.TXT FOR MORE INFORMATION. // // If you would like to make some fields of your form required, change no to // yes below. $required_on = yes; // If you have set $required_on to yes above, you can make fields required // by beginning their name with r_. For example, if you want to require // a user to enter their name, use the following HTML: // // input type='text' name='r_Name' // // If a user fails to enter a required field, they will be taken to a page // where a message such as You have not completed all the required fields. // will be displayed. Please specify the URL to this file below: $required_errorpage = error.html; // ### // ### // ### // OVERRIDE REQUIRED VARIABLES? # // THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE // DOING. PLEASE READ README.TXT FOR MORE INFORMATION. NOTE: THIS WILL NOT // AFFECT YOUR 'TURN ON REQUIRED FIELDS?' SECTION SETTINGS ABOVE. // // If you would like to override the three required variables in // order to hide your email address, email subject, and thank you page // URL from your email form, change no to yes below. $override = no; // If override is set to yes, the hidden variables on your HTML // email form named rec_mailto, rec_subject, and rec_thanks will be // overridden and can therefore be removed from
RE: [PHP] MySQL PHP issue?
[snip] OK, I have check all the mysql doc and php docs on using exists in the query, but it seems I still can not get the query to work. Here it is: SELECT * FROM icisp.account WHERE id in (select oldaccountID from BillMax.account) Or Using sELECT * FROM icisp.account WHERE id exists(select oldaccountID from BillMax.account) Anyone have any idea what I'm doing wrong? [/snip] Asking a MySQL question on a PHP list? *slaps knee!* What version of MySQL are you running, does it allow sub queries? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailform and mailit.php problem.
Your PHP server could be wrong configured. Open your php.ini and check the mail settings. If you run a homeserver the easiest way is to set it to your smtp server. Greeting, Cas On 4/27/05, Jim van den Noort [EMAIL PROTECTED] wrote: Hello, I have a problem. I downloaded the form mailer dynaform1.4 and it looks like it works perfectly. I mad a form en adjusted te mailit scrit to my mailadress. When i test the form it is send eand i get the thanks message. But the mail will never come in to my mailbox? what shout i do? Please help me. Jim van den Noort ? // ## // ## // // DynaForm v1.4 - Created by the Webligo Group // http://www.webligo.com // // YOUR USE OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES YOUR ACCEPTANCE // OF THE FOLLOWING LICENSE AGREEMENT: // // THIS SCRIPT AND ALL OF ITS CONTENTS ARE LICENSED UNDER THE // GPL FREEWARE LICENSE. IT MAY NOT BE RESOLD OUR USED COMMERCIALLY // WITHOUT EXPRESSED PERMISSION OF THE WEBLIGO GROUP. IT MAY, HOWEVER, // BE DISTRIBUTED FREELY WITHOUT CHARGE. THIS SOFTWARE IS INTELLECTUAL // PROPERTY OF THE WEBLIGO GROUP. ANYONE VIOLATING THIS AGREEMENT WITHOUT // THE EXPRESSED PERMISSION OF THE WEBLIGO GROUP MAY BE LEGALLY PROSECUTED. // YOUR DOWNLOAD AND USE OF THIS SOFTWARE ALSO SIGNIFIES THAT YOU UNDERSTAND // AND AGREE TO THE DOWNLOAD AGREEMENT YOU READ UPON DOWNLOAD. // // The Webligo Group, its management, or any of its employees, associates, or // partners cannot be held liable for any damages that this software may cause. // As the Licensee and user of the software, you agree to accept full liability // for any damages or risk involved with using this software. // // If you need help installing or using this software, please // read the readme.txt file that was provided with it. // // This file and all related content are the intellectual // property of the Webligo Group and are under copyright. // // If you plan to use this script for your clients, sell it as a service, // or utilize it in any other commercial manner, you must purchase a commercial // license. Please see this page for more information: // http://webligo.com/products_dynaform.php // // We do not provide support for this script, unless you have purchased a // commercial license. // // Feel free to visit our website (http://www.webligo.com) // if you wish to send us any comments, etc. // // ### // ### // ### // CONFIGURE FROM: ADDRESS ## // THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE // DOING. PLEASE READ README.TXT FOR MORE INFORMATION. // If you would like to specify the From: address of emails sent by DynaForm, // enter it between the double quotes below. If you leave this blank, the // server will assign the default email address. $from_address = ; // ### // ### // ### // ACTIVATE REQUIRED FIELDS? // THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE // DOING. PLEASE READ README.TXT FOR MORE INFORMATION. // // If you would like to make some fields of your form required, change no to // yes below. $required_on = yes; // If you have set $required_on to yes above, you can make fields required // by beginning their name with r_. For example, if you want to require // a user to enter their name, use the following HTML: // // input type='text' name='r_Name' // // If a user fails to enter a required field, they will be taken to a page // where a message such as You have not completed all the required fields. // will be displayed. Please specify the URL to this file below: $required_errorpage = error.html; // ### // ### // ### // OVERRIDE REQUIRED VARIABLES? # // THIS AREA IS OPTIONAL. ONLY TOUCH THESE SETTINGS IF YOU KNOW WHAT YOU ARE // DOING. PLEASE READ README.TXT FOR MORE INFORMATION. NOTE: THIS WILL NOT // AFFECT YOUR 'TURN ON REQUIRED FIELDS?' SECTION SETTINGS ABOVE. // // If you would like to override the three required variables in //
[PHP] Re: Creating ERD from an existing MySQL Table
Dasmeet Singh wrote: Hi! I need to create an ERD from an existing MySQL table. Is there any such tool/script to do it automatically? Thanks in advance :) SayOrange.com How to choose the best web hosting? http://www.sayorange.com Just an update.. i was able to do what i want through dbvisualizer http://www.minq.se/products/dbvis/ SayOrange.com How to choose the best web hosting? http://www.sayorange.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] editor that typesets the php code
Hi! I have just completed coding for a script... i want to take a printout of the code.. but the code is very hotch potch.. Is there any software to automatically set the code with proper spacing/tabs extra..and possibly give colors to it too...?? Thanks in advance :) SayOrange.com How to choose the best web hosting? http://www.sayorange.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL PHP issue?
Dustin Wish wrote: snip Anyone have any idea what I'm doing wrong? /snip Asking on the wrong list. -- John C. Nichel berGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL PHP issue?
Jay Blanchard wrote: snip Asking a MySQL question on a PHP list? *slaps knee!* /snip I bet you think you're funny. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL PHP issue?
[snip] Jay Blanchard wrote: snip Asking a MySQL question on a PHP list? *slaps knee!* /snip I bet you think you're funny. ;) [/snip] I know that you think I am. Yuk-yuk! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL PHP issue?
It is version 3.23.56 -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 2:44 PM To: php-general@lists.php.net Subject: Re: [PHP] MySQL PHP issue? Jay Blanchard wrote: snip Asking a MySQL question on a PHP list? *slaps knee!* /snip I bet you think you're funny. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- 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.859 / Virus Database: 585 - Release Date: 2/14/2005 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL PHP issue?
[snip] It is version 3.23.56 [/snip] Sub-queries are not supported in that version of MySQL. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL PHP issue?
SH^*^t Thanks guys. Figured something like that. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 2:53 PM To: Dustin Wish; php-general@lists.php.net Subject: RE: [PHP] MySQL PHP issue? [snip] It is version 3.23.56 [/snip] Sub-queries are not supported in that version of MySQL. -- 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.859 / Virus Database: 585 - Release Date: 2/14/2005 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL PHP issue?
Dustin Wish wrote: It is version 3.23.56 snip Know thy software. 3.x doesn't support sub-queries. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simple Question: Reading exec(locate) results into an array
Hello all, I'm sure this is very rudimentary, sorry if this sounds ignorant. I've only dabbled a bit in other languages and I'm working with a small knowledge of php since I only use it on-and-off at my job. I scribbled up this script today at work off the top of my head for a customer who was looking for a printout of my company's PEAR location. I wanted something quick and easy that would be adaptable to find other items. I was surprised it even worked since I haven't really had a chance to dig into PHP yet: ?php $temp = exec(which pear); $temp2 = exec(locate pear); echo which = $temp BRBR locate = $temp2; ? When executing the commands directly within Unix, without the php script: 'which' yields 1 line: the path to the pear module for PHP 'locate' yields dozens of lines, paths to everything with 'pear' in it. However, this is the printout when running the script from a browser (same via command line) : --- which = /usr/local/bin/pear locate = /usr/ports/www/pear-HTTP_Upload/pkg-descr --- It's only printing out a single line for locate. I'm assuming i'd need to run a loop to read all the lines of locate from an array. My question is: what sort of general syntax can I use to get the results from locate stored in an array so it can be read out? I don't need a script written for me; a general nudge in the right direction or the right website would be incredibly helpful. I've had trouble finding anything relevant thus far. Thanks! -Karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LDAP and .htaccess
Bret Walker wrote: Well, the download.php script would allow me to protect certian files, but is there a way to protect all files? For example, images that I would like to include in my php pages. you can serve images through through download.php.. but that's just a bad idea :) Could I silently pass a username and password to htaccess? Can htaccess be set to use a php script instead of a htpasswd file? why are your username/passwords safer in script.php then .htpasswd? I still think your best route would be auth_ldap. If you directory server doesn't allow anonymous searches, have the admin create a low privileged account that only has access to search the required attributes. Kenny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Retrieving query from MSSQL Table
I have a form where I can submit a Query to be run against a MSSQL 2000 Server. The query is stored correctly in a text (DataType) column. I can retrieve it echo it back to the screen, copy-n-paste into Query Analyzer and the query works. What I cannot do is get the query to be returned from the recordset and used to build a new recordset. Confused? function preview_report(){ //Get the query $s = SELECT rptsql \n; $s .= FROM rpt_mas\n; $s .= WHERE id={$_POST['frm_rptid']}\n; $r = $this-db-Execute($s); $r_arr = $r-GetArray(); $sql1 = $r_arr[0][0]; //I can echo this to the screen and run it in Query Analyzer $sql2 = SELECT id, rptname, rptdesc, rptfile, rpttype, rptsql FROM rpt_mas; if($sql!=){ $this-xq = $sql; $r = $this-db-Execute($sql1);//This doesn't work $r = $this-db-Execute($sql2);//This does work } } $sql1 $sql2 are one and the same. Any ideas what I'm missing? Thanks, Mike Smith -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple Question: Reading exec(locate) results into an array
Karl Fry wrote: Hello all, I'm sure this is very rudimentary, sorry if this sounds ignorant. I've only dabbled a bit in other languages and I'm working with a small knowledge of php since I only use it on-and-off at my job. I scribbled up this script today at work off the top of my head for a customer who was looking for a printout of my company's PEAR location. I wanted something quick and easy that would be adaptable to find other items. I was surprised it even worked since I haven't really had a chance to dig into PHP yet: ?php $temp = exec(which pear); $temp2 = exec(locate pear); echo which = $temp BRBR locate = $temp2; ? When executing the commands directly within Unix, without the php script: 'which' yields 1 line: the path to the pear module for PHP 'locate' yields dozens of lines, paths to everything with 'pear' in it. However, this is the printout when running the script from a browser (same via command line) : --- which = /usr/local/bin/pear locate = /usr/ports/www/pear-HTTP_Upload/pkg-descr --- It's only printing out a single line for locate. I'm assuming i'd need to run a loop to read all the lines of locate from an array. My question is: what sort of general syntax can I use to get the results from locate stored in an array so it can be read out? I don't need a script written for me; a general nudge in the right direction or the right website would be incredibly helpful. I've had trouble finding anything relevant thus far. http://us4.php.net/manual/en/function.shell-exec.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] editor that typesets the php code
hi Dasmeet From: Dasmeet Singh I have just completed coding for a script... i want to take a printout of the code.. but the code is very hotch potch.. Is there any software to automatically set the code with proper spacing/tabs extra..and possibly give colors to it too...?? Check out the PEAR PHP_Beautifier package http://pear.php.net/package/PHP_Beautifier R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What's changed between version 4.2.2 and 4.3.4 regarding POSTing?
I've used the simple password script in the past to password protect pages with a session. http://www.phpbuddy.com/article.php?id=23 Now that I have installed Fedora Core 2 and 3 the new version of php (4.3.4) doesn't like this script any more. Any ideas why? Thanks Matthew
[PHP] Re: What's changed between version 4.2.2 and 4.3.4 regarding POSTing?
* [EMAIL PROTECTED] [EMAIL PROTECTED]: I've used the simple password script in the past to password protect pages with a session. http://www.phpbuddy.com/article.php?id=23 Now that I have installed Fedora Core 2 and 3 the new version of php (4.3.4) doesn't like this script any more. Any ideas why? Yes. It's using the global arrays HTTP_POST_VARS and HTTP_SESSION_VARS arrays, and 4.3.x has the directive register_globals set to off by default. It's safer to leave it off. You can easily update the script by replacing these with $_POST and $_SESSION, respectively. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:[EMAIL PROTECTED] | http://vermontbotanical.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] temp tables
hi, im working with php 4 and postgresql 8 and in my php script id like to create a temp table on my database server. how do i do this? how do i verify it was created? i tried the following: $sql = create temp table s_info(a int, b text) on commit delete rows ; pg_query($dbh,$sql); $dbh is my connection. any help will be highly appreciated.
Re: [PHP] temp tables
On Wed, April 27, 2005 9:45 pm, Cima said: im working with php 4 and postgresql 8 and in my php script id like to create a temp table on my database server. how do i do this? how do i verify it was created? i tried the following: $sql = create temp table s_info(a int, b text) on commit delete rows ; pg_query($dbh,$sql); $dbh is my connection. Did it print an error message? What was the return value of pg_query()? Did you check http://php.net/pg_last_error What happens if you then do: $sql = insert into s_info(a, b) values(1, 'Test'); pg_query($dbh, $sql) or die(pg_last_error()); $sql = select * from s_info; $sinfo = pg_query($dbh, $sql) or die(pg_last_error()); $srow = 0; while (list($a, $b) = @pg_fetch_row($sinfo, $srow++)){ echo a: $a b: $bbr /\n; } What makes you think it didn't work? -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] editor that typesets the php code
On Wed, April 27, 2005 5:09 pm, Rob Agar said: hi Dasmeet From: Dasmeet Singh I have just completed coding for a script... i want to take a printout of the code.. but the code is very hotch potch.. Is there any software to automatically set the code with proper spacing/tabs extra..and possibly give colors to it too...?? Check out the PEAR PHP_Beautifier package http://pear.php.net/package/PHP_Beautifier You may also want to investigate http://php.net/syntax_highlight and friends. Or just copy your hodgepodge.php to pretty.phps and surf to that. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Avoiding Error : Maximum execution time of 30 seconds exceeded
I Have a script that need more than 30 second to complete. How to avoid *Fatal error*: Maximum execution time of 30 seconds exceeded in *\det.php* on line *66. Thanks * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieving query from MSSQL Table
On Wed, April 27, 2005 1:29 pm, Mike Smith said: I have a form where I can submit a Query to be run against a MSSQL 2000 Server. The query is stored correctly in a text (DataType) column. I can retrieve it echo it back to the screen, copy-n-paste into Query Analyzer and the query works. What I cannot do is get the query to be returned from the recordset and used to build a new recordset. Confused? function preview_report(){ //Get the query $s = SELECT rptsql \n; $s .= FROM rpt_mas\n; $s .= WHERE id={$_POST['frm_rptid']}\n; $r = $this-db-Execute($s); $r_arr = $r-GetArray(); $sql1 = $r_arr[0][0]; //I can echo this to the screen and run it in Query Analyzer $sql2 = SELECT id, rptname, rptdesc, rptfile, rpttype, rptsql FROM rpt_mas; if($sql!=){ $this-xq = $sql; if ($sql1 == $sql2){ echo They really are the same...br /\n; } else{ echo They're not REALLY the same!br /\n; for ($i = 0; $i = strlen($str1); $i++){ $c1 = $str1[$i]; $c2 = $str2[$i]; $o1 = ord($c1); $o2 = ord($c2); if ($c1 != $c2){ echo At position $i, c1 is $c1 ($o1), and c2 is $c2 ($o2)br /\n; } } } $r = $this-db-Execute($sql1);//This doesn't work echo mssql_error(); //Or whatever this should be. $r = $this-db-Execute($sql2);//This does work } } $sql1 $sql2 are one and the same. Any ideas what I'm missing? I'm betting dollars to doughnuts that you've got a newline at the end of $sql1 which is messing you up. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] temp tables
Cima wrote: hi, im working with php 4 and postgresql 8 and in my php script id like to create a temp table on my database server. how do i do this? how do i verify it was created? Well if the creation fails pg_query will throw an error. However temp tables are only good for the life of the connection (script in this case). You will probably want to consider that. Sincerely, Joshua D. Drake i tried the following: $sql = create temp table s_info(a int, b text) on commit delete rows ; pg_query($dbh,$sql); $dbh is my connection. any help will be highly appreciated. -- Your PostgreSQL solutions provider, Command Prompt, Inc. 24x7 support - 1.800.492.2240, programming, and consulting Home of PostgreSQL Replicator, plPHP, plPerlNG and pgPHPToolkit http://www.commandprompt.com / http://www.postgresql.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LDAP and .htaccess
On Wed, April 27, 2005 12:08 pm, Bret Walker said: Well, the download.php script would allow me to protect certian files, but is there a way to protect all files? For example, images that I would like to include in my php pages. As noted, you could put your images outside the webtree and then use PHP to serve them all up. You would want to do this only for images you really cared about, probably, for performance reasons. Could I silently pass a username and password to htaccess? Can htaccess be set to use a php script instead of a htpasswd file? Search http://php.net/ for HTTP Authentication. You'll find a PHP script that sends the same headers as .htaccess/htpasswd, and then you can use LDAP there, or MySQL or whatever you want. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mac OS X compilation problem
On Wed, April 27, 2005 4:53 am, Marcus Bointon said: In the past I've had success compiling PHP4 on OS X. However, now I'm trying to get PHP5 working and not having much luck. I'm getting configure to work, and make goes ok until the final linking stage at which point I get this error: ld: unknown flag: -export-symbols make: *** [libs/libphp5.bundle] Error 1 It seems that that flag must be set in a make file somewhere (it's not in my environment), and it's certainly not documented in the OS X ld man pages. Not sure if it makes any difference, but most of the external modules that PHP uses are built from fink. I need some modules that are not supported in any of the pre-built fink PHP5 packages, and I'm used to compiling it without difficulty on Linux and OpenBSD. Anyone else run into this or have any idea how I might fix it? This is probably one of those boneheaded answers, but you could try to edit the Makefile by hand and take out the -export-symbols and see what happens... Copy the file somewhere safe first, so you have a pristine copy to fall back to when it doesn't work. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] beginner volunteer
On Wed, April 27, 2005 4:17 am, Malcolm Mill said: I've been reading up on php for a while now and would like to get involved in a small open source LAMP project. I don't have any real coding experience to speak of but could bring proofreading, bug-reporting, testing and documentation skills to the project. What I'd like to get out of working on it is: experience working with a variety of other individuals over the internet on a common application; real life knowledge of CVS and the development process; some experience writing simple code. If anyone knows of any opportunities like this or would like to discuss what I could add to one of their own projects please contact me. You needn't wait for somebody to contact you. Pick a task/project/whatever and dive in. :-) Do ask, once you've chosen a likely target, if anybody is already doing X -- Just to be sure you're not duplicating effort. I think SourceForge.net might have a search engine to try to match up skills with things that need doing. I would imagine that just about every project could use more/better documentation. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Product details not being displayed, based on passed id
http://php.net/register_globals On Wed, April 27, 2005 12:20 am, Mark Sargent said: Petar Nedyalkov wrote: On Wednesday 27 April 2005 08:54, Mark Sargent wrote: Hi All, this page, http://webmonkey.wired.com/webmonkey/99/21/index3a_page3.html?tw=programmin g has code that is supposed to pass an id via the url string to the same page, and display info of a particular product, based on the id being passed. Everything works fine, until I click the link, and instead of the proudct's details being displayed, based on that id, I get the original page, with the lnks. I've right clicked the links, and viewed properties, where I see that the id=n is set. Why doesn't it pull the record based on the id being passed..? Cheers. Are you sure your webserver handles it's rewrite rules correctly? Maybe you use apache - check the mod_rewrite settings, rules, etc. Have in mind that the rewrite engine is being enabled using the RewriteEngine on directive. Mark Sargent. P.S. I've inserted, echo $id to display the id value. Nothing appears. html body ?php $db = mysql_connect(localhost, root, grunger); mysql_select_db(status,$db); // display individual record if ($id) { echo $id $result = mysql_query(SELECT * FROM Products WHERE product_id=$id,$db); $myrow = mysql_fetch_array($result); printf(Product Name: %s\nbr, $myrow[product_name]); printf(Product Model Number: %s\nbr, $myrow[product_model_number]); printf(Product Serial Number: %s\nbr, $myrow[product_serial_number]); printf(Product Price: %s\nbr, $myrow[product_price]); } else { // show employee list $result = mysql_query(SELECT * FROM Products,$db); if ($myrow = mysql_fetch_array($result)) { // display list if there are records to display do { printf(a href=\%s?id=%s\%s/abr\n, $PHP_SELF, $myrow[product_id], $myrow[product_name]); } while ($myrow = mysql_fetch_array($result)); } else { // no records to display echo Sorry, no records were found!; } } ? /body /html Hi All, yes, using Apache2 as my test web server. I'm even more a novice with it. I'm not too sure I understand what you are asking me to check. I looked in apache2/conf/httpd.conf for somethig related to RewriteEngine, but found nothing. Could you explain a little more..? Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Avoiding Error : Maximum execution time of 30 seconds exceeded
On Wed, April 27, 2005 9:00 pm, Andri Heryandi said: I Have a script that need more than 30 second to complete. How to avoid *Fatal error*: Maximum execution time of 30 seconds exceeded in *\det.php* on line *66. http://php.net/set_time_limit -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Product details not being displayed, based on passed id
Richard Lynch wrote: http://php.net/register_globals On Wed, April 27, 2005 12:20 am, Mark Sargent said: Petar Nedyalkov wrote: On Wednesday 27 April 2005 08:54, Mark Sargent wrote: Hi All, this page, http://webmonkey.wired.com/webmonkey/99/21/index3a_page3.html?tw=programmin g has code that is supposed to pass an id via the url string to the same page, and display info of a particular product, based on the id being passed. Everything works fine, until I click the link, and instead of the proudct's details being displayed, based on that id, I get the original page, with the lnks. I've right clicked the links, and viewed properties, where I see that the id=n is set. Why doesn't it pull the record based on the id being passed..? Cheers. Are you sure your webserver handles it's rewrite rules correctly? Maybe you use apache - check the mod_rewrite settings, rules, etc. Have in mind that the rewrite engine is being enabled using the RewriteEngine on directive. Mark Sargent. P.S. I've inserted, echo $id to display the id value. Nothing appears. html body ?php $db = mysql_connect(localhost, root, grunger); mysql_select_db(status,$db); // display individual record if ($id) { echo $id $result = mysql_query(SELECT * FROM Products WHERE product_id=$id,$db); $myrow = mysql_fetch_array($result); printf(Product Name: %s\nbr, $myrow[product_name]); printf(Product Model Number: %s\nbr, $myrow[product_model_number]); printf(Product Serial Number: %s\nbr, $myrow[product_serial_number]); printf(Product Price: %s\nbr, $myrow[product_price]); } else { // show employee list $result = mysql_query(SELECT * FROM Products,$db); if ($myrow = mysql_fetch_array($result)) { // display list if there are records to display do { printf(a href=\%s?id=%s\%s/abr\n, $PHP_SELF, $myrow[product_id], $myrow[product_name]); } while ($myrow = mysql_fetch_array($result)); } else { // no records to display echo Sorry, no records were found!; } } ? /body /html Hi All, yes, using Apache2 as my test web server. I'm even more a novice with it. I'm not too sure I understand what you are asking me to check. I looked in apache2/conf/httpd.conf for somethig related to RewriteEngine, but found nothing. Could you explain a little more..? Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hi All, ok, so let me understand this. To be able to use GET/POST and some others, I need this turned on, yes..? Do you all have it set to on..? If no, how do you get around this..? Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] User Logout system advice needed...
Hello, I need to write some sort of a user logout system for my web application. It needs to be a solid system so that if the user presses the Logout button there's no way of returning to the password protected area without logging in again. At the moment my system only tries to close browser window with javascript. This doesn't work if the user has more than one tab open in the browser and in Firefox it doesn't even close the active tab :-) I use a cookie based session id so this probably needs to be deleted. Is there a way to delete all variables stored by the application or do I need to unset them one by one? Any other things I might be missing here? Thanks a Lot -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php