[PHP] Problem with variables
Hello, I am working with php and codeigniter, but I have not yet experienced. I need create a variable that is available throughout system. This variable contains the number of company and can change. as I can handle this? Thank you, very much! Ferd
Re: [PHP] public static or static public?
I personally like scope static fucntion. Coming from C# it just makes more sense to me. JF. On 28/01/2011 12:15, Colin Guthrie wrote: OK, so it's a Friday hence a random debate What is preferred for class methods? class foo { static public function bar(){} public static function wibble(){} } ?? All methods are valid, but are some more valid than others? :p Checking ZF: [colin@jimmy Zend (working)]$ cgrep public static function . |wc -l 755 [colin@jimmy Zend (working)]$ cgrep static public function . |wc -l 60 It's clear which is preferred there, but still not absolutely consistent (I didn't bother checking differently scoped methods). I personally prefer scope first then static, but others may have valid reasons/arguments for preferring the other way. WDYT? Col
Re: [PHP] Counting Online users, but not using a Session Table in MySQL
How did you created the table? Can you count the Id's only? Wouldn't this just count the entries in the index? On 28/01/2011 12:57, AmirBehzad Eslami wrote: Dear list, The common solution for counting online users is to store sessions in a Table. I've created a Table in MySQL to acheive the result, but it seems this solution is a little heavy for such a simple task. Is there a better alternative? Can I use SqlLite to make COUNT(*) queries based on a where statement? Is there any better solution? Do you know any way to store sessions in Memory? Does Memcache support counting sessions? I'm looking for a high-performance solution to count online users. What do you think?
[PHP] Distributed File Purchase Encryption (DFPE)
I was thinking in something , is not quite php related, but I was thinking of an app that would encrypt a file (that file could be anything) and the author would create an encryption key giving an amount of money to be collected. It would become public and anyone could give as much money as wanted. when the needed amount was reached the file would be public to anyone (decrypted). does it make sense? I am calling it Distributed File Purchase Encryption (DFPE) ~birdzoom
Re: [PHP] Some undefined function errors
Sorry I miss read the question. It does seem that php is not picking up the pg module and cannot find the functions. I assume Postgresql is in fact installed at /usr/local/pgsql. If you run phpinfo(); can you see that PG is installed? On 20/05/2010 10:46, Giancarlo Boaron wrote: ** I make the function call in a php file. I'm not using stored procedures. If I create an empty php file and put only some of these functions, Apache reports de 'call to undefined function XXX'. --- Em *qui, 20/5/10, Fernando /ferna...@ggtours.ca/* escreveu: De: Fernando ferna...@ggtours.ca Assunto: Re: [GENERAL] [PHP] Some undefined function errors Para: pgsql-gene...@postgresql.org Data: Quinta-feira, 20 de Maio de 2010, 11:25 Are you calling store procedures that return cursors? I had this problem with cursors because the transaction gets committed and the cursor closed after they return. Mind you I had the problem on .NET using npgsql, so I might be way off. Cheers On 20/05/2010 10:05, Giancarlo Boaron wrote: Hi all. Recently, I wrote an email about the problem I was having with some Postgres functions that when those functions were called, I received the following error: Call to undefined functionfunction_name. After some answers, I decided to rebuild a brand new linux virtual machine with Apache + PHP + Postgres, but I still get this annoying error messege with some functions like pg_prepare() and pg_escape_string(). I compiled Postgres with --without-readline option. I compiled PHP with --with-apxs2=/usr/local/apache2/bin/apxs and --with-pgsql=/usr/local/pgsql/ And the compilation process has no errors. What am I doing wrong? Do I have to change something in php_config.h file? If so, what do I have to change? Thank you.
Re: [PHP] Some undefined function errors
So php is loading pg. How are you calling these functions? Can you connect or does pg_connect() gives the same error? On 20/05/2010 12:10, Giancarlo Boaron wrote: Yes. Phpinfo() tells me it's ok: pgsql PostgreSQL Support enabled PostgreSQL(libpq) Version 8.4.4 Multibyte character support disabled SSL support enabled Active Persistent Links 0 Active Links 0 Directive Local Value Master Value pgsql.allow_persistent On On pgsql.auto_reset_persistent Off Off pgsql.ignore_notice Off Off pgsql.log_notice Off Off pgsql.max_links Unlimited Unlimited pgsql.max_persistent Unlimited Unlimited My PHP version is 5.3.2. My PostgreSQL version is 8.4.4 and I'm running the server under the restrict 'postgres' user privileges since I can't run the daemon process as 'root'. Thank you for some help. --- Em qui, 20/5/10, Fernandoferna...@ggtours.ca escreveu: De: Fernandoferna...@ggtours.ca Assunto: Re: [PHP] Some undefined function errors Para: php-general@lists.php.net Data: Quinta-feira, 20 de Maio de 2010, 12:23 Sorry I miss read the question. It does seem that php is not picking up the pg module and cannot find the functions. I assume Postgresql is in fact installed at /usr/local/pgsql. If you run phpinfo(); can you see that PG is installed? On 20/05/2010 10:46, Giancarlo Boaron wrote: ** I make the function call in a php file. I'm not using stored procedures. If I create an empty php file and put only some of these functions, Apache reports de 'call to undefined function XXX'. --- Em *qui, 20/5/10, Fernando /ferna...@ggtours.ca/* escreveu: De: Fernandoferna...@ggtours.ca Assunto: Re: [GENERAL] [PHP] Some undefined function errors Para: pgsql-gene...@postgresql.org Data: Quinta-feira, 20 de Maio de 2010, 11:25 Are you calling store procedures that return cursors? I had this problem with cursors because the transaction gets committed and the cursor closed after they return. Mind you I had the problem on .NET using npgsql, so I might be way off. Cheers On 20/05/2010 10:05, Giancarlo Boaron wrote: Hi all. Recently, I wrote an email about the problem I was having with some Postgres functions that when those functions were called, I received the following error: Call to undefined functionfunction_name. After some answers, I decided to rebuild a brand new linux virtual machine with Apache + PHP + Postgres, but I still get this annoying error messege with some functions like pg_prepare() and pg_escape_string(). I compiled Postgres with --without-readline option. I compiled PHP with --with-apxs2=/usr/local/apache2/bin/apxs and --with-pgsql=/usr/local/pgsql/ And the compilation process has no errors. What am I doing wrong? Do I have to change something in php_config.h file? If so, what do I have to change? Thank you.
Re: [PHP] Standard built-in functions source code
http://www.php.net/downloads.php Download the complete source code. On 19/05/2010 16:24, Leandro de Oliveira wrote: Hi, I'd like to know where is the source code of built-in functions if it's freely available. I'm interested in math and cryptography functions specifically. Thank you
Re: [PHP] Multiple Login in a single PC should not be possible
Hello Jagdeep, I think that using the user table will fix your first problem of having a single user tied to a browser for the same machine or even a different machine. Once logged in that same user cannot login again. For your second issue, I do not think is possible to keep track of anything that will not allow user1 to login using Internet Explorer and then user2 to come along open Firefox and log in using the same machine as sessions are kept separately and will look different on the server. Unless you can actually use something to identify the computer as per your question of tracking MAC addresses I do not see this as being possible. But then again I'm no expert. Just my thoughts. Good Luck. On 14/05/2010 03:18, Jagdeep Singh wrote: Hi All! I am looking for a solution, I want a user to do a single Login only on a PC . E.g. If a User has logged on my website website.com in Internet explorer, then he cant login on same website in another browser like Firefox etc with same loginid or another. Can I trace MAC address of a single machine to solve this issue? Or is there a concept of GLOBAL COOKIE / Cross Browser Cookie which will work for all browsers in a single machine.. I hope You will help me out Regards Jagdeep Singh +91 9988009272
Re: [PHP] Converting floats to ints with intval
I think Bob has a good idea here, split the string values and the concatenate them to make the whole value. If the data is really stored in strings, you need to break it down into substrings around the decimal and then convert both sides into integers and combine them into an integer value. It is the conversion into float that introduces the error because of the imprecise representation of fractional decimal values in binary. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Two color rows in table inside while iteration
What about this: $color = even; while ($row = while condition )) { $color = ($color == even) ? odd : even; echo (tr class=\$color\); echo td$row[0]/tdtd$row[1]/td td$row[2]/tdtd$row[3]/tdtd$row[4]/td ; echo (/tr) } And have two classes in your style sheet that format each row differently. Hope this helps. On 28/04/2010 09:29, Ali Asghar Toraby Parizy wrote: I agree with you. in this simple example we can use php but we may need table with extra functionality and only client side scripts are reasonable and applicable. we can create multi color and clickable rows by php but we'll have greater server load. anyway that was only an propose;-) On Wed, Apr 28, 2010 at 4:12 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2010-04-28 at 16:16 +0430, Ali Asghar Toraby Parizy wrote: It isn't good idea to use php to visualize your table. You can fetch you data by php and style them by java script. On Wed, Apr 28, 2010 at 3:59 PM, Juan Rodriguez Monti j...@rodriguezmonti.com.ar wrote: Hello Guys, I would like to implement a two color row table for some queries that I'm doing. I use PHP to query a DB, then I use while to print all its results. I have a code pretty similar to this one : $results = Here the QUERY; echo html; echo head; echo 'link rel=stylesheet type=text/css href=style.css /'; echo /head; echo body; echo 'div id=container'; echo centerh2Results/h2/centerbr /; echo (table border='1'); echo tdstrongAt1/strong/td tdstrongAt2/strong/td tdstrongAt3/strong/td $ while ($row = while condition )) { echo (tr); echo td$row[0]/tdtd$row[1]/td td$row[2]/td td$row[3]/tdtd$row[4]/td ; echo /div; echo /body; echo /html; I just want to show you how I write the table. What I would like to know is what do you suggest to do a two color row format. Thanks!, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Javascript is even less of a good idea, as it can be turned off and isn't available on all browsers. PHP doesn't rely on the clients browser, so is a safer bet. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Two color rows in table inside while iteration
But then you need to differentiate the table, otherwise all your tables will have the same row formating no? This way you only apply the formating to those rows that need it. Fernando. On 28/04/2010 09:35, Ashley Sheridan wrote: On Wed, 2010-04-28 at 09:34 -0400, Fernando wrote: What about this: $color = even; while ($row = while condition )) { $color = ($color == even) ? odd : even; echo (tr class=\$color\); echo td$row[0]/tdtd$row[1]/td td$row[2]/tdtd$row[3]/tdtd$row[4]/td ; echo (/tr) } And have two classes in your style sheet that format each row differently. Hope this helps. On 28/04/2010 09:29, Ali Asghar Toraby Parizy wrote: I agree with you. in this simple example we can use php but we may need table with extra functionality and only client side scripts are reasonable and applicable. we can create multi color and clickable rows by php but we'll have greater server load. anyway that was only an propose;-) On Wed, Apr 28, 2010 at 4:12 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2010-04-28 at 16:16 +0430, Ali Asghar Toraby Parizy wrote: It isn't good idea to use php to visualize your table. You can fetch you data by php and style them by java script. On Wed, Apr 28, 2010 at 3:59 PM, Juan Rodriguez Monti j...@rodriguezmonti.com.ar wrote: Hello Guys, I would like to implement a two color row table for some queries that I'm doing. I use PHP to query a DB, then I use while to print all its results. I have a code pretty similar to this one : $results = Here the QUERY; echo html; echo head; echo 'link rel=stylesheet type=text/css href=style.css /'; echo /head; echo body; echo 'div id=container'; echo centerh2Results/h2/centerbr /; echo (table border='1'); echo tdstrongAt1/strong/td tdstrongAt2/strong/td tdstrongAt3/strong/td$ while ($row = while condition )) { echo (tr); echo td$row[0]/tdtd$row[1]/td td$row[2]/td td$row[3]/tdtd$row[4]/td ; echo /div; echo /body; echo /html; I just want to show you how I write the table. What I would like to know is what do you suggest to do a two color row format. Thanks!, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Javascript is even less of a good idea, as it can be turned off and isn't available on all browsers. PHP doesn't rely on the clients browser, so is a safer bet. Thanks, Ash http://www.ashleysheridan.co.uk You really only need one alternate row class, as I showed in my earlier example. All the rows are styled using the tables default CSS, and then you just style the rows you want to change from that default. Here it is again :p http://www.ashleysheridan.co.uk/coding_php_alternate_rows.php Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] class attributes and __construct
Hello Ashely, I would initialize the variable when I'm defining it as there isn't much of a point of doing it in the constructor unless I'm having the value changed by a parameter. In my opinion: class House { public $roof = true; } is the way to go. Fernando. On 15/04/2010 11:54, Ashley Sheridan wrote: On Thu, 2010-04-15 at 07:42 -0700, Tommy Pham wrote: Hi Ashley, -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Thursday, April 15, 2010 6:38 AM To: PHP General List Subject: [PHP] class attributes and __construct I think this is probably going to end up as one of those coders' preference type of things, but I was wondering what was considered the general best approach. When creating a class, you can define default values for the object in the class itself, and within the __construct function. Now, while I see the advantage to using __construct to set properties that might depend on a variable, what would be the best approach for any values that might likely remain at a default value and only ever change in a few rare circumstances? For example: class Person { public $right_handed = true; I recommend setting it to private or protected instead of public to protect the integrity of the app. And add a get method/function to obtain the value. function __construct($name, $height) { $this-name = $name; $this-height = $height; } function set_hand($side) { if($side == 'left' { $this-right_handed = false; } else { $this-right_handed = true; } } } Now, this is a simple example, but a value like $right_handed should only ever change if it's not the typical. As most people are right-handed it would make sense to set it to true and allow it to be changed to false as necessary. What I'm wonder is, where is the best place to set it to true, in the list of class properties at the top, or in the __construct() function? I know I could move it to __construct and give it a default value in the arguments list, but that brings it's own problems. What if the argument list grows too big, and which attribute would be deemed more important than another that you might want to override it without specifying every other? Is there a rule of thumb as to what belongs in __construct and what does not? Thanks, Ash http://www.ashleysheridan.co.uk As for setting the default value in the construct, I recommend not to because should PHP support overloading later, you can then have another method/function to change its non-default value along with the initial parameters for the class. I use the constructor to set initial parameters for the class or initialize any class specific settings such as connection for DBAL. Regards, Tommy Maybe my example wasn't the best, but I did mean that my public variable there was a value that should be initially set with the class initialisation I realise the differences between public, private and protected variables, that wasn't my question. What I wanted to know was if there was a convention about what specific properties should be set through the public $var = method and what should be left for the __construct function? For example, which would be better here (assuming a variable number of variables that might be set this way: class House { public $roof = true; } class House { function __construct() { $this-roof = true; } } Aside from the amount of typing (which isn't a serious consideration for me anyway) and assuming that such variable initialisation will not rely on variable input but will be fixed with the option of a class method to change the value later, what would be the preferred method and are there any caveats I'm unaware of right now (as I'm aware of none so far) to either method? Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Using Mono library from PHP
Is there a way to use a Mono library from PHP running on Apache 2.2 on a Debian server? I have seen samples of using COM and DOTNET, but it seems to work only on Windows not on Linux. Your help is really appreciated. Thank you, Fernando.
Re: [PHP] question about smarty
I'm not sure where is the problem, but can't you just define every changing part in your template as variables and assign them as needed from php? If you need to change the image url, just make it a variable, like in background:url(images/{$img}) Then you just assign the variable as needed in each file: //template1.php $img = 'mi_image_1.gif'; $smarty-assign( 'img', $img ); //template2.php $img = 'mi_image_2.gif'; $smarty-assign( 'img', $img ); That way you don't need to use the {if} inside smarty and make your template lighter. De: Sudhakar sudhakarar...@gmail.com Para: php-general@lists.php.net Enviado: vie,6 noviembre, 2009 00:14 Asunto: [PHP] question about smarty i am using smarty template engine at work place, following is the situation i already have 1 template that has already been created example = http://localhost/sites/template1.com this works fine following is the folder structure i have for smarty on xampp 1. C:\xampp\htdocs\sites\template1.com where i have .htaccess index.php and siteconf.php 2. C:\xampp\htdocs\sites\_templates\templates\template1 in the siteconf.php file there are all the major variables defined which are accessed in other tpl file of the templates example in aboutus page, contactus page etc of this template1 now i have created another template called template2 and this also has the same structure 1. C:\xampp\htdocs\sites\template2.com where i have .htaccess index.php and siteconf.php 2. C:\xampp\htdocs\sites\_templates\templates\template2 my question is the look and feel when i access http://localhost/sites/template1.com and http://localhost/sites/template2.com is the same the only thing that needs to be done is for template2 when i access http://localhost/sites/template2.com ONLY the header image should be different compared to the header i have for http://localhost/sites/template1.com this is the only change i need i am not aware as to the php code i need to write so that when i access http://localhost/sites/template2.com the header image changes and this new header image remains for the entire pages of http://localhost/sites/template2.com presently in header.tpl of template1 is written as follows {if strpos($Data.KEYWORD,rv rental) === false} div class=header style=background:url(images/header_{$siteData.COUNTRY3}.gif) no-repeat top left; {else} div class=header style=background:url(images/header_{$siteData.COUNTRY3}_rv.gif) no-repeat top left; {/if} /div so i need to chane the {if} {else} where i need to mention that if i am accessing http://localhost/sites/template2.com then the header image should be different. any help will be greatly appreciated. please advice. thanks.
Re: [PHP] Preview button to show PDF without submitting post data?
You could just open in a new window a php script that generates the preview pdf with a content-type header for pdf. header(Content-type: application/pdf); Or if the preview pdf is not dinamic, just point the url to the pdf. No javascript needed, just a link, o a submit button on a form with the url as the action attribute. If you need it to open on a new window, use target=_blank, or better target=pdf if you want consecutive requests to open in the same window instead of a new one everytime. Note: if you are not using transitional html and care about validation, the target attribute is not allowed. In that case you would need javascript to open a new window. De: Dave M G mar...@autotelic.com Para: PHP-General List php-general@lists.php.net Enviado: vie,6 noviembre, 2009 04:58 Asunto: [PHP] Preview button to show PDF without submitting post data? PHP Users, I have a page that generates a PDF document using PHP. It takes form data filled in by the user to fill out the PDF When the user clicks submit, it emails that PDF document to the intended recipient. However, I would like to add a preview function as well. But for a variety of reasons, instead of submitting the form data through post and re-filling all the fields with the selected data, I'd like to be able to open a new window with an example PDF without actually submitting the form. I think this might need JavaScript, but I'm not sure. Is this possible? Thank you for any advice. -- Dave M G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What PHP version are you using?
5.2.8, but testing 5.3 in local environment.
Re: [PHP] regex for multiple line breakes
You are replacing 1 or more matchs of a new line. To match 2 or more you can use {2,}. It's a range, first number means min matches, second max matches. Omitting last number means no max limit. $data[txt] = preg_replace('`[\r\n]{2,}`',\n,$data[txt]); De: Merlin Morgenstern merli...@fastmail.fm Para: php-general@lists.php.net Enviado: mié,14 octubre, 2009 12:17 Asunto: [PHP] regex for multiple line breakes Hi there, I am trying to remove multiple linebreakes from a textarea input. Spammers tend to insert multiple line breakes. The problem is, that I want to allow 2 line breaks so basic formating should be allowed. I am doing this by regex: $data[txt] = preg_replace('`[\r\n]+`',\n,$data[txt]); I would need a regex that allows \r\n\r\n, but not more than this. Thank you for any help, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regex for multiple line breakes
Right. I saw it later. To be completely multiplatform I'd use a grouping: (\n|\r|\r\n){2,}. If I'm not wrong, these are all the actual formats for a new line. If we replace \r with a newline we could fail if the text comes from a MAC OS. De: Ashley Sheridan a...@ashleysheridan.co.uk Para: Merlin Morgenstern merli...@fastmail.fm CC: php-general@lists.php.net Enviado: mié,14 octubre, 2009 12:44 Asunto: Re: [PHP] regex for multiple line breakes On Wed, 2009-10-14 at 12:42 +0200, Merlin Morgenstern wrote: That sounds very logical but does not work unfortunatelly. The result is the same. It removes all linebreakes but one. I would like to pass this one: - first line second third - But not this one: - third forth Fernando Castillo Aparicio schrieb: You are replacing 1 or more matchs of a new line. To match 2 or more you can use {2,}. It's a range, first number means min matches, second max matches. Omitting last number means no max limit. $data[txt] = preg_replace('`[\r\n]{2,}`',\n,$data[txt]); De: Merlin Morgenstern merli...@fastmail.fm Para: php-general@lists.php.net Enviado: mié,14 octubre, 2009 12:17 Asunto: [PHP] regex for multiple line breakes Hi there, I am trying to remove multiple linebreakes from a textarea input. Spammers tend to insert multiple line breakes. The problem is, that I want to allow 2 line breaks so basic formating should be allowed. I am doing this by regex: $data[txt] = preg_replace('`[\r\n]+`',\n,$data[txt]); I would need a regex that allows \r\n\r\n, but not more than this. Thank you for any help, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You still have an issue with your regex: $data[txt] = preg_replace('`[\r\n]+`',\n,$data[txt]); Even if you replace the + with a {2,} you are asking it to match any one of the characters in the square brackets twice or more and replace it with a single \n. If your line breaks actually do consist of the \r\n pattern, then the {2,} will match those two characters, not two sets of those characters. You might be better off replacing all \r characters with an empty string, and then matching against the \n character only. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Newbie: Array of objects iteration
I think you are just looking for the key in the wrong place. Try: foreach ( $records as $record ) { foreach( $record as $column=$value ) { echo $column is $value\n; } } You've got the columns names in each record, not in the global recorset. Good luck ;-) De: MEM tal...@gmail.com Para: php-general@lists.php.net Enviado: jue,8 octubre, 2009 22:59 Asunto: [PHP] Newbie: Array of objects iteration Hello all, I'm grabbing all records from a table using: $records = $stmt-fetchAll(PDO::FETCH_OBJ); return $records; In order to display the values we can do: foreach ($records as $record) { echo $record-id; echo $record-name; } However, I'd like to grab, also, the *column names*. I've tried: foreach ($records as $column=$value) { echo $column is $value\n; } But I get: Catchable fatal error: Object of class stdClass could not be converted to string Can I have your help on how can I properly get the column values? Regards, Márcio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie: Array of objects iteration
De: MEM tal...@gmail.com Para: Lester Caine les...@lsces.co.uk; php-general@lists.php.net Enviado: vie,9 octubre, 2009 12:40 Asunto: RE: [PHP] Newbie: Array of objects iteration @LinuxManMikeC and all @All Thanks. I was more or less aware of that possibility, however, please let me share the big picture will you guys: The main point is to access the properties name as well as values, of that object, and put them on a xls file. Instead of using mysql_num_rows, and mysql_num_files, and split and use a bunch of loops I thought: Maybe fetching as an object may help me doing this far better. However, I'm having a hard time figuring out how to make the switch. To be honest, I don't really know if iterate is the buzz word here, I would like to understand a little bit more the following: We have in our hands an Object returned by a Fetch_All w/ fetch_obj option applied to it, that object, when I do var_dump, reveals himself as in object, containing an array and, each key of that array corresponds the column names of our table or tables we have previously fetched. However, since we are working with an object, should we think differently than if we were working with an array? If so, it is, in the fact, iteration, the best option we have to put all properties and values into a xls file? Or there are far better options for that? @Lester Yes, actually, I was having only one record on the database, but I believe that is far to less. Since I was not been able to see if I was getting one object, or several objects. That make me think of that. Thanks :) And because of that, I was able (I hope) to properly understand Fernando example: @Fernando foreach ( $records as $record ) { foreach( $record as $column=$value ) { echo $column is $value\n; } } So the first foreach will iterate over each object of stdClass that corresponds to each record of mysql data fetched, then, for each of them, take the associative array key and the corresponding value... Correct? :DDD However, is this the right track to archive the goal stated above, or, they are far better ways for doing so? Regards, Márcio - Correct about my example, although I'm not sure if you get each record as an array or as an object. Anyway, you can iterate both. And if you want to get the column names, I suppose you could use array_keys() on the first record if you receive an array, or maybe get_object_vars() if it's an objecs (note that with this you get an array with keys and values). I've found PDOStatement-getColumnMeta(). There's a big fat warning saying this is experimental, but you could take a look in case you need more data on the columns. Hope it helps.
Re: [PHP] html email showing br instead of line breaks
Have you tried http://es.php.net/manual/en/function.nl2br.php ? I think it's easier and fits your needs. De: Adam Williams awill...@mdah.state.ms.us Para: PHP General list php-general@lists.php.net Enviado: jueves, 24 de septiembre, 2009 20:52:13 Asunto: [PHP] html email showing br instead of line breaks I have users enter support tickets into a a textarea form and then it emails it to me, I'm trying to get the emails to display when they hit enter correctly, so i'm changing the \r\n to br, but in the email i'm getting, its displaying the br instead of a line break: here is the code: $message = htmlheadtitlenew support request #.mysqli_insert_id($mysqli)./title/headbodyp Hello, .$_SESSION[full_name]. has created a new support request. Please log in at a href=\http://intra/helpdesk\;MDAH Helpdesk/a. The problem request is \; $message .= htmlspecialchars(str_replace('\r\n', 'br', $_POST[problem])); $message .= \ and the best time to contact is \.htmlspecialchars($_POST[contact_time]).\ /p/body/html; $headers = 'MIME-Version: 1.0' . \r\n; $headers .= 'Content-type: text/html; charset=iso-8859-1' . \r\n; $headers .= From: .$_SESSION[full_name]..$_SESSION[username].@mdah.state.ms.us .\r\n . X-Mailer: PHP/ . phpversion(); mail('isst...@mdah.state.ms.us', $subject, $message, $headers); but the email I get is: Hello, Karen Redhead has created a new support request. Please log in at MDAH Helpdesk http://intra/helpdesk. The problem request is Elaine is out today but her computer no longer has Past Perfect from what I can tell. Also how does she access her email. The Sea Monkey email icon does not take you anywhere.brThanks so much,brKaren and the best time to contact is 1:30 -5:00 How come the email is being displayed with br instead of line breaks?
Re: [PHP] Question: Wai-aria?
Ups! By mistake I didn't reply to all. Resending. Sorry. De: Parham Doustdar parha...@gmail.com Para: php-general@lists.php.net Enviado: martes, 22 de septiembre, 2009 9:41:44 Asunto: [PHP] Question: Wai-aria? Hello there, I have asked on the mailing lists that have blind users and no one seems to know about this technology (that is ironically created to help us blind folks). I was wondering if anyone here has the experience of implementing Wai-aria. Since my question is rather about Wai-aria than PHP and is off-topic, I'm first of all sorry to be posting it here (it is rather an act of desperation). Secondly, I ask people who have the time to help me to please contact me off-list at parham90 at gmail dot com. Thanks. -- --- Contact info: Skype: parham-d MSN: fire_lizard16 at hotmail dot com GoogleTalk: parha...@gmail.com Twitter: PD90 email: parham90 at GMail dot com Have you tried the contact section for WAI at w3.org? http://www.w3.org/WAI/contacts They have a WAI Interest Group mailing list (w3c-wai-ig-requ...@w3.org, suscribe as subject), and I believe that would be the best place to look for help. Good luck.
RE: [PHP] Mail function and hotmail
Hello, Thank you all for your cooperation yesterday. I tried PEAR Mail_mime as follows: function SendEmail($template, $params){ // Read and open the template file and the image file $htmlFile = fopen(./templates/$template.html, r); $txtFile = fopen(./templates/$template.txt, r); $htmlMsg = fread($htmlFile, filesize(./templates/$template.html)); $textMsg = fread($txtFile, filesize(./templates/$template.txt)); // Replace the template values foreach($params as $key = $value){ // Template values will always start with two hash marks ## if(substr($key, 0, 2) == ##){ $htmlMsg = str_replace($key, $value, $htmlMsg); $textMsg = str_replace($key, $value, $textMsg); } } // Create the appropiate headers $headers = array( From = n...@domain.ca, Reply-To = n...@domain.ca, Subject = $params[subject], Organization = Name ); // Create the mime object $mime = new Mail_mime(); $mime-setTxtBody($textMsg); $mime-setHTMLBody($htmlMsg); $mime-addHTMLImage(templates/emaillogo.jpg, image/jpg, templates/emaillogo.jpg); // Set the variables for the Mail object to send the message $body = $mime-get(); $headers = $mime-headers($headers); $mail = Mail::factory(mail); return $mail-send($params[email], $headers, $body); } However, hotmail is still getting blank emails when I sent them from my production machine (CentOS 5.3), however, when I send the message from my development machine (Visata Ultimate SP1) it does work correctly on hotmail address . Both machines are running php 5.2 and have the same PEAR packages. I tried Gmail, Yahoo mail and Thunderbird and they work fine. Your help will be much appreciated. Thank you, Fernando. Date: Wed, 10 Jun 2009 23:14:11 +0530 From: sudhee...@binaryvibes.co.in To: phps...@gmail.com CC: jfer...@hotmail.com; rich...@php.net; php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org Fernando, I recommend you check out the various PHP frameworks out there. Instead of randomly searching for classes for common functionality like sending an email from your script, you could use the framework's classes. I am sure all of the frameworks provide classes to send emails. The next time you need a class to read email from your scripts, you can simply look for classes your framework of choice provides. I personally use Zend Framework. But there are many available - Cake, CI, Symphony, etc. Also take a look at PEAR like Bastien said. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net _ Attention all humans. We are your photos. Free us. http://go.microsoft.com/?linkid=9666046
RE: [PHP] Mail function and hotmail
I decided to change the call to send to: $mail = Mail::factory(smtp, array(host = localhost)); return $mail-send($params[email], $headers, $body); and now hotmail wokrs. Maybe qmail changes something when the mail() function is used. Thank you for all your help. Fernando. From: jfer...@hotmail.com To: sudhee...@binaryvibes.co.in; phps...@gmail.com CC: rich...@php.net; php-general@lists.php.net Date: Thu, 11 Jun 2009 10:34:13 -0400 Subject: RE: [PHP] Mail function and hotmail Hello, Thank you all for your cooperation yesterday. I tried PEAR Mail_mime as follows: function SendEmail($template, $params){ // Read and open the template file and the image file $htmlFile = fopen(./templates/$template.html, r); $txtFile = fopen(./templates/$template.txt, r); $htmlMsg = fread($htmlFile, filesize(./templates/$template.html)); $textMsg = fread($txtFile, filesize(./templates/$template.txt)); // Replace the template values foreach($params as $key = $value){ // Template values will always start with two hash marks ## if(substr($key, 0, 2) == ##){ $htmlMsg = str_replace($key, $value, $htmlMsg); $textMsg = str_replace($key, $value, $textMsg); } } // Create the appropiate headers $headers = array( From = n...@domain.ca, Reply-To = n...@domain.ca, Subject = $params[subject], Organization = Name ); // Create the mime object $mime = new Mail_mime(); $mime-setTxtBody($textMsg); $mime-setHTMLBody($htmlMsg); $mime-addHTMLImage(templates/emaillogo.jpg, image/jpg, templates/emaillogo.jpg); // Set the variables for the Mail object to send the message $body = $mime-get(); $headers = $mime-headers($headers); $mail = Mail::factory(mail); return $mail-send($params[email], $headers, $body); } However, hotmail is still getting blank emails when I sent them from my production machine (CentOS 5.3), however, when I send the message from my development machine (Visata Ultimate SP1) it does work correctly on hotmail address . Both machines are running php 5.2 and have the same PEAR packages. I tried Gmail, Yahoo mail and Thunderbird and they work fine. Your help will be much appreciated. Thank you, Fernando. Date: Wed, 10 Jun 2009 23:14:11 +0530 From: sudhee...@binaryvibes.co.in To: phps...@gmail.com CC: jfer...@hotmail.com; rich...@php.net; php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org Fernando, I recommend you check out the various PHP frameworks out there. Instead of randomly searching for classes for common functionality like sending an email from your script, you could use the framework's classes. I am sure all of the frameworks provide classes to send emails. The next time you need a class to read email from your scripts, you can simply look for classes your framework of choice provides. I personally use Zend Framework. But there are many available - Cake, CI, Symphony, etc. Also take a look at PEAR like Bastien said. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net _ Attention all humans. We are your photos. Free us. http://go.microsoft.com/?linkid=9666046 _ We are your photos. Share us now with Windows Live Photos. http://go.microsoft.com/?linkid=9666047
[PHP] Mail function and hotmail
Hello, I am sending an html message with and embedded image using the following code: // Read message from html template $message = fread(template.html, filesize(template.html)); // I replace the values in $message that are necessary to // fill the tempalte ... // Generate a boundary string $rand_value = md5(time()); $mime_boundary = -$rand_value; $headers = MIME-Version: 1.0\r\n; $headers .= From: Name n...@domain.com\r\n; $headers .= Reply-To: Name n...@domain.com\r\n; $headers .= Return-Path: n...@domain.com\r\n; $headers .= Organization: Name\r\n; $headers .= X-Mailer: PHP's mail() Function\r\n; $headers .= Content-Type: multipart/related; ; $headers .= boundary=\$mime_boundary\; type=\text/html\\r\n\r\n; $body = This is a multi-part message in MIME format.\r\n; $body .= --$mime_boundary\r\n; $body .= Content-Type: text/html; charset=UTF-8\r\n; $body .= Content-Transfer-Encoding: 7bit\r\n\r\n$message\r\n\r\n; $body .= --$mime_boundary\r\n; $body .= Content-Type: image/jpg\r\n; $body .= Content-Transfer-Encoding: base64\r\n; $body .= Content-ID: ggtourslogo\r\n\r\n; $body .= chunk_split(base64_encode(file_get_contents(./templates/emaillogo.jpg))); $body .= --$mime_boundary--; return mail(em...@domain.com, Subject, $body, $headers); However when it is send to a hotmail.com address the message is received blank. It does work fine with Gmail, Yahoo mail, Outlook Express and Thunderbird. Your help is much appreciated. Fernando _ We are your photos. Share us now with Windows Live Photos. http://go.microsoft.com/?linkid=9666047
RE: [PHP] Mail function and hotmail
I have not idea of what else to use. Your suggestions are appreciated. Fernando. Date: Wed, 10 Jun 2009 18:04:31 +0100 From: rich...@php.net To: jfer...@hotmail.com CC: php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Hi, ... Use something that is already proven to work. It will save you an awful lot of time. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Internet explorer 8 lets you browse the web faster. http://go.microsoft.com/?linkid=9655582
RE: [PHP] Mail function and hotmail
Thanks. I'll check that out. Date: Wed, 10 Jun 2009 18:24:45 +0100 Subject: Re: [PHP] Mail function and hotmail From: rich...@php.net To: phps...@gmail.com CC: jfer...@hotmail.com; php-general@lists.php.net Hi, pear's mime mail I believe I had a hand in that too. It's like a bad rash - it gets everywhere... :-) -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 6th June) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp _ Internet explorer 8 lets you browse the web faster. http://go.microsoft.com/?linkid=9655582
RE: [PHP] Mail function and hotmail
Thank you. I'm looking at PEAR Mail_mime right now. It seems promising. Fernando. Date: Wed, 10 Jun 2009 23:14:11 +0530 From: sudhee...@binaryvibes.co.in To: phps...@gmail.com CC: jfer...@hotmail.com; rich...@php.net; php-general@lists.php.net Subject: Re: [PHP] Mail function and hotmail Richard was likely suggestion his mail example as listed in his signature Other options include phpmailer pear's mime mail various other classes available www.phpclasses.org Fernando, I recommend you check out the various PHP frameworks out there. Instead of randomly searching for classes for common functionality like sending an email from your script, you could use the framework's classes. I am sure all of the frameworks provide classes to send emails. The next time you need a class to read email from your scripts, you can simply look for classes your framework of choice provides. I personally use Zend Framework. But there are many available - Cake, CI, Symphony, etc. Also take a look at PEAR like Bastien said. -- With warm regards, Sudheer. S Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net, Personal: http://sudheer.net _ Attention all humans. We are your photos. Free us. http://go.microsoft.com/?linkid=9666046
[PHP] PHP and a misbehaving contact form
Hello, I've got a very simple PHP script that mails me a contact form of a website. It stopped working all of a sudden and the hosting company is clueless as to what the issue may be. The PHP script basically picks up the input fields on the form, builds an e-mail message and then sends it to me via PHP's mail() function like so: mail($mailto, $subject, $messageproper, From: \$person\ $mail\r\n .$headersep . Reply-To: \$person\ $mail . $headersep . X-Mailer: chfeedback.php 2.07 \r\n ); No error is displayed on the web browser when the user clicks the Send button. The problem is that the e-mail message just doesn't get delivered. Needeless to say, this has been working OK for the past year. Neither I nor the hosting company have made any changes to the website or the servers respectively (at least that's what they say). However, the script is not functioning anymore. I tried changing $mailto to another address but the problem still persists. Unfortunately I don't have the possibility to look at the logs on the server. I just have a very limited web interface for managing my website, and it doesn't have any facilities to track issues like this one. Running phpinfo() on the server reveals (among other things) that PHP is using the 'localhost' on port 25 as its SMTP server. At this point I cannot say that the problem *lies* within PHP itself. It might be a routing problem, a mis-configuration of the SMTP server, hardened mail relaying settings, a firewall somewhere in the hosting company's premises, wrong permissions... as well as many many other things... Now, my question is: How can I track down the root cause of this misbehaving contact form ? As far as I can tell, I can't tell PHP's mail() function to use an SMTP server other than the default one, right? Some relevant info: - Red Hat Linux - Apache 2.0.52 - PHP 4.3.9 Thanks, Fernando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] freeing resourses after the end of the session
Hello, I made a image validation code, wich generate a image every time the user enters a page. The name of the image uses the session id, and I save it in a temporary directory. When the user close the browser (or leave the site) I would have to delete the image (or else I will start to have many garbage images in the temp directory). Is there any way to do that? From PHP? Fernando Bonafé Artista Plástico (19) 81184401 (19) 32322239 [EMAIL PROTECTED] _ www.opapagaiorinoceronte.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] oem to ansi charset encoding!.
Hello.- i have some trouble. i need to convert some string encoded in oem charset to ansi php ;-) could someone help me! thanks in advance! Fernando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: About resource of popen
Somebody? help me!! :D 2007/4/30, Fernando chucre [EMAIL PROTECTED]: Hello all, I make a script for read and interprete the stdout of cmd `ip monitor`. And I use signal_handler, the script is like this: ? declare(ticks = 1); pcntl_signal(SIGHUP,sig_handler,false); $fh = popen('ip monitor','r'); while (!feof($fh)) { $line = fgets($fh); analize($line); } function analize($line) { ... } ; function sig_handler($signo) { ... }; ? this script run in infine loop, or when to cmd 'ip monitor' exist. The script ever whait the next line of 'ip monitor', ever. Then when I send the signal SIGHUP to pid of script. In this point the instruction '$line = fgets($fh);' is aborted and return false to $line. The $fh is modified and the function feof($fh) return true and I have not access to $fh agaim. But the kid process 'ip monitor' is not kill. This is wanted? -- Fernando Chure PSL/CE -- Fernando Chure PSL/CE
[PHP] About resource of popen
Hello all, I make a script for read and interprete the stdout of cmd `ip monitor`. And I use signal_handler, the script is like this: ? declare(ticks = 1); pcntl_signal(SIGHUP,sig_handler,false); $fh = popen('ip monitor','r'); while (!feof($fh)) { $line = fgets($fh); analize($line); } function analize($line) { ... } ; function sig_handler($signo) { ... }; ? this script run in infine loop, or when to cmd 'ip monitor' exist. The script ever whait the next line of 'ip monitor', ever. Then when I send the signal SIGHUP to pid of script. In this point the instruction '$line = fgets($fh);' is aborted and return false to $line. The $fh is modified and the function feof($fh) return true and I have not access to $fh agaim. But the kid process 'ip monitor' is not kill. This is wanted? -- Fernando Chure PSL/CE
[PHP] I make a patch, how I report?
Hello all, I buid a patch for wrapper php fopen. In this patch I create a way for the script access the filedescriptos opened by process. Ex: php file.php 3file_in.txt 7file_out.txt In this case the script can't read the filedescriptor 3 and 7. Not have way for read or write in filedescriptor opends by precess. I make a way for read or write it. A modify de wrapper 'php' for fopen function. (http://br.php.net/manual/en/wrappers.php.php) A create the 'php:/fd/N' which N is the filedescriptor number. how to access fd 7 to write? ex: ? $fd = fopen(php://fd/7,'w'); fwrite($fd,test of write\n); fclose($fd); ? I want know who I send the patch for to be avaliable. Thanks. -- Fernando Chure PSL/CE - Brasil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems when running Java program
Hello, I have a Java program that gives me a string. When i run this program on the shell everything works fine but when i try to run using shell_exec i get Error occurred during initialization of VM Could not reserve enough space for code cache This script is currently on a VPS server with php4 running as CGI and phpsuexec enabled. What am i doing wrong? Thanks, Fernando. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ibm universe database
Hello. i have to take some data from a IBM universe database on a windows server from my linux+php web server.. does anybody know how to do this?? (i have googled a few hours and i did not find anything)... thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Project php-mobile
Hello, I am a PHP-Developer, and for a long time I wait for um php binary for PDA's (mobiles devices). But this time not hapen. So I and my friend Lauro Salmito (C develeper) making the PHP-Mobile Project. We want create a small binary, Mobile Edition. Basically we make a binary with the fallowing features: - Language Reference http://www.php.net/manual/en/langref.php; - Function Reference http://www.php.net/manual/en/funcref.php - V. Array Functionshttp://www.php.net/manual/en/ref.array.php - XII. Class/Object Functionshttp://www.php.net/manual/en/ref.classobj.php - XXII. Date and Time Functionshttp://www.php.net/manual/en/ref.datetime.php - XXIX. Directory Functionshttp://www.php.net/manual/en/ref.dir.php - XL. Filesystem Functionshttp://www.php.net/manual/en/ref.filesystem.php - XLVI. FTP Functions http://www.php.net/manual/en/ref.ftp.php - XCV. MySQL Functionshttp://www.php.net/manual/en/ref.mysql.php - XCVII. MySQL Improved Extensionhttp://www.php.net/manual/en/ref.mysqli.php - CXXIII. PostgreSQL Functionshttp://www.php.net/manual/en/ref.pgsql.php - CXXVI. Program Execution Functionshttp://www.php.net/manual/en/ref.exec.php - CXLVIII. SOAP Functionshttp://www.php.net/manual/en/ref.soap.php - CL. Standard PHP Library (SPL) Functionshttp://www.php.net/manual/en/ref.spl.php - CLI. SQLite Functionshttp://www.php.net/manual/en/ref.sqlite.php - CLVI. String Functionshttp://www.php.net/manual/en/ref.strings.php - Graphical library - For this we don't have Idea, probably we get an exists in PDA world, or if necessary we will make it. For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2, this is a suite developer based in Eclipse. We accept any help. We will notice when we register the project. Thanks -- Fernando Chure PSL/CE - Brasil
[PHP] Project php-mobile
Hello, I am a PHP-Developer, and for a long time I wait for um php binary for PDA's (mobiles devices). But this time not hapen. So I and my friend Lauro Salmito (C develeper) making the PHP-Mobile Project. (this still not created). We want create a small binary, Mobile Edition. Basically we make a binary with the fallowing features: - Language Reference http://www.php.net/manual/en/langref.php; - Function Reference http://www.php.net/manual/en/funcref.php - V. Array Functionshttp://www.php.net/manual/en/ref.array.php - XII. Class/Object Functionshttp://www.php.net/manual/en/ref.classobj.php - XXII. Date and Time Functionshttp://www.php.net/manual/en/ref.datetime.php - XXIX. Directory Functionshttp://www.php.net/manual/en/ref.dir.php - XL. Filesystem Functionshttp://www.php.net/manual/en/ref.filesystem.php - XLVI. FTP Functions http://www.php.net/manual/en/ref.ftp.php - XCV. MySQL Functionshttp://www.php.net/manual/en/ref.mysql.php - XCVII. MySQL Improved Extensionhttp://www.php.net/manual/en/ref.mysqli.php - CXXIII. PostgreSQL Functionshttp://www.php.net/manual/en/ref.pgsql.php - CXXVI. Program Execution Functionshttp://www.php.net/manual/en/ref.exec.php - CXLVIII. SOAP Functionshttp://www.php.net/manual/en/ref.soap.php - CL. Standard PHP Library (SPL) Functionshttp://www.php.net/manual/en/ref.spl.php - CLI. SQLite Functionshttp://www.php.net/manual/en/ref.sqlite.php - CLVI. String Functionshttp://www.php.net/manual/en/ref.strings.php - Graphical library - For this we don't have Idea, probably we get an exists in PDA world, or if necessary we will make it. For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2, this is a suite developer based in Eclipse. We accept any help. We will notice when we register the project. Thanks -- Fernando Chure PSL/CE - Brasil
[PHP] Project php-mobile
Hello, I am a PHP-Developer, and for a long time I wait for um php binary for PDA's (mobiles devices). But this time not hapen. So I and my friend Lauro Salmito (C develeper) making the PHP-Mobile Project. (this still not created). We want create a small binary, Mobile Edition. Basically we make a binary with the fallowing features: - Language Reference http://www.php.net/manual/en/langref.php; - Function Reference http://www.php.net/manual/en/funcref.php - V. Array Functionshttp://www.php.net/manual/en/ref.array.php - XII. Class/Object Functionshttp://www.php.net/manual/en/ref.classobj.php - XXII. Date and Time Functionshttp://www.php.net/manual/en/ref.datetime.php - XXIX. Directory Functionshttp://www.php.net/manual/en/ref.dir.php - XL. Filesystem Functionshttp://www.php.net/manual/en/ref.filesystem.php - XLVI. FTP Functions http://www.php.net/manual/en/ref.ftp.php - XCV. MySQL Functionshttp://www.php.net/manual/en/ref.mysql.php - XCVII. MySQL Improved Extensionhttp://www.php.net/manual/en/ref.mysqli.php - CXXIII. PostgreSQL Functionshttp://www.php.net/manual/en/ref.pgsql.php - CXXVI. Program Execution Functionshttp://www.php.net/manual/en/ref.exec.php - CXLVIII. SOAP Functionshttp://www.php.net/manual/en/ref.soap.php - CL. Standard PHP Library (SPL) Functionshttp://www.php.net/manual/en/ref.spl.php - CLI. SQLite Functionshttp://www.php.net/manual/en/ref.sqlite.php - CLVI. String Functionshttp://www.php.net/manual/en/ref.strings.php - Graphical library - For this we don't have Idea, probably we get an exists in PDA world, or if necessary we will make it. For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2, this is a suite developer based in Eclipse. We accept any help. We will notice when we register the project. Thanks -- Fernando Chure PSL/CE - Brasil
Re: [PHP] Re: date() and timezone
Hello, But like i said i have lots of scripts inside this folder, is there a way to set something on .htaccess to change the timezone? why? ;-) Because i can't set the timezone for every single script. Inside this folder and subfolders i guess there are about 10,000 scripts. What you were pointed to before + http://us3.php.net/manual/de/ini.php#ini.list ah, now you've gone and made it easy for him :-) Actually i don't have access to php.ini file. Are there any other ways to do this? -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] Curl and cookies
Hello, I have just started using curl and i have some question about cookies. The website i'm logging in controls everything using cookies (from login to the actions inside it). Is there a way to store the cookie values into a php session variable ($_SESSION['cookie'])? How do i make curl receive the cookie and store in this variable? How do i make curl send it? Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
Re: [PHP] Re: date() and timezone
that will teach not to use global include files to init your apps. even if you we stuck with editing 10,000 scripts (btw it sounds very fishy to 10,000 scripts with date() calls in them - can anyone say 'code reuse'?) exactly how hard would it be to write something that would go through all those php files and add a single line ( ini_set('date.timezone', 'Europe/Amsterdam'); ) to the top of the script (i.e. just after the first '?php' | '?') ? Those scripts are uploaded by a lot of people. Unfortunately i can't make all of them change this conf. But now i know that i can change this on .htaccess if you RTFM (and I mean actually READ) then you would know that you can set the relevant date related ini settings in a .htaccess file here is the relevant link again: http://php.net/manual/en/ref.datetime.php#ini.date.timezone Sorry, i have read it but i was reading the portuguese version and it seens like it is not completely translated. Just changed to the english version and NOW i can read it :) Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] date() and timezone
Hello, I have a lot of php scripts that uses date() for some important operations. Yesterday those scripts were moved to another server which is on an different timezone. I haven't predicted this so my scripts aren't working anymore. The servers timezone is GMT -4 and mine is GMT -2. Is there a way to change the default timezone for all scripts within a folder? And what about changing just one? I appreciate any help. Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
Re: [PHP] date() and timezone
I´m using php5 here. But like i said i have lots of scripts inside this folder, is there a way to set something on .htaccess to change the timezone? Fernando M. M. wrote: Hello, I have a lot of php scripts that uses date() for some important operations. Yesterday those scripts were moved to another server which is on an different timezone. I haven't predicted this so my scripts aren't working anymore. The servers timezone is GMT -4 and mine is GMT -2. Is there a way to change the default timezone for all scripts within a folder? And what about changing just one? it depends on what version of php. php5: http://php.net/manual/en/function.date-default-timezone-set.php http://php.net/manual/en/function.date-timezone-set.php php4: er ... I believe your stuck with settings the TZ environment var OR doing some gnarly hack in userland to account for the difference in timezones. (try this page and search for 'TZ': http://php.net/manual/en/ref.datetime.php) I appreciate any help. Thanks, Fernando. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] Retransmiting post variables
Hello, I have a script called redir.php that is used only for redirecting using the following code: header('Location: ', $_GET['url']); But now i need to redirect post varibles too. Example: If someone access redir.php?url=my_page.php and post: a=1b=2 I need to send this post string (as post) to my_page.php. How can i do this? Thanks. -- Blog: http://blog.forumdebian.com.br/fernando Contato: http://www.forumdebian.com.br/fernando/contato.php
[PHP] Error with array and include
Hi, I'm having a strange problem when trying to show a array after its value was defined on a file that was included. Something like this: ?php $lang = 'pt_BR'; include('lang/'. $lang .'/login.php'); echo $lang['Username']; ? On the file lang/pt_BR/login.php i have this... ?php $lang['Username'] = 'Usuário'; ? But the result of the first script is 'S' (without quotes). If i change lang/pt_BR/login.php to ?php $lang['Username'] = 'Usuário'; echo $lang['Username']; ? I get 'Usuário' (without quotes again). Why does this happens? Thanks, Fernando. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error with array and include
T.Lensselink, Ok, problem solved. I didn't realized that i was using the same variable. Thanks for the help! T.Lensselink escreveu: How can you use an array as string in the include statement and two lines lower as array? Think it echo's 'S' because it see's $lang as a string and not an array. On Tue, 05 Dec 2006 13:11:12 -0200, Fernando M. M. [EMAIL PROTECTED] wrote: Hi, I'm having a strange problem when trying to show a array after its value was defined on a file that was included. Something like this: ?php $lang = 'pt_BR'; include('lang/'. $lang .'/login.php'); echo $lang['Username']; ? On the file lang/pt_BR/login.php i have this... ?php $lang['Username'] = 'Usuário'; ? But the result of the first script is 'S' (without quotes). If i change lang/pt_BR/login.php to ?php $lang['Username'] = 'Usuário'; echo $lang['Username']; ? I get 'Usuário' (without quotes again). Why does this happens? Thanks, Fernando. -- 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] Missing characters
I need a helping hand to solve this Example Page1.php === $name_pro = VC++ V2.4 print td width='200' class='texto2' a href='page2.php?page=value=$name_pro' $name_pro /a /td; === Page2.php === echo $value ; //Prints out VC V2.4 and I need VC++ V2.4 Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing characters [SOLVED]
Thanks to all.. Regards, FA. Brady Mitchell wrote: Example Page1.php === $name_pro = VC++ V2.4 print td width='200' class='texto2' a href='page2.php?page=value=$name_pro' $name_pro /a/td; Use urlencode (http://php.net/urlencode): print td width='200' class='texto2' a href='page2.php?page=value=.urlencode($name_pro).' $name_pro /a /td; Brady -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: usr VAR value as a VAR Name
Fisrt thx to all for yours answers, I'm updating the mail because in hte last mail I'didn express my self correctly : EXAMPLE page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table; $res_pro = @mysql_query( $sql_pro); while ($campo_pro = @mysql_fetch_array($res_pro)) { $sid_pro = $campo_pro[Sid]; // $sid_pro = 4 $sid_pro = 'p'.$sid_pro; // I'm trying to use the value of $sid_pro as a VAR name *$sid_pro = p4* print td input name='$sid_pro' type= 'radio' // Here the Imput Name is a VALUE from Database value=''/* /td; // *name = p4 * BLA BLA BLA } page2.php // I Need to access a value from the form witch it's stored in a VAR called $p4 // The Name of the VAR $p4 It's stored in my database, so How can I convert a database string to a VAR NAME === $sqlname = SELECT Sid FROM Table; $res = mysql_query ($sqlname) ; while ($campo_pro = mysql_fetch_array($res)) { $name1 = $campo_pro[Sid]; // *$name1 = 4* $radio = '$'.'p'.$name1 ; // *$radio = $p4 -- Now the Problem **How can I get the Value SOLVE_ME from the submited form ?* echo '$radio'; // == $p4 = WRONG i need // The VALUE of $radio witch is $p4 is the name of the VAR I need to access, how can I export the VALUE $p4 AS a VAR Name ? } James Benson wrote: if(isset($_POST['NAME_OF_FORM_VALUE'])) { // radio button was selected } Fernando Anchorena wrote: I'm stuck trying to get work this : This is an example page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table; $res_pro = @mysql_query( $sql_pro); while ($campo_pro = @mysql_fetch_array($res_pro)) { $sid_pro = $campo_pro[Sid]; // *sid_pro = 4* $sid_pro = 'p'.$sid_pro; // I'm trying to use de value of $sid_pro as a VAR name *$sid_pro = p4* print td *input name='$sid_pro' type= 'radio' value='SOLVE_ME'/* /td; // *name=p4 * BLA BLA BLA } SUBMIT FORM === page2.php === $sqlname = SELECT Sid FROM Table; $res = mysql_query ($sqlname) ; while ($campo_pro = mysql_fetch_array($res)) { $name1 = $campo_pro[Sid]; // *$name1 = 4* $radio = '$'.'p'.$name1 ; // *$radio = $p4 -- Now the Problem **How can I get the Value SOLVE_ME from the submited form ?* } == Thanks in Advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: usr VAR value as a VAR Name
Barry wrote: Fernando Anchorena wrote: Fisrt thx to all for yours answers, I'm updating the mail because in hte last mail I'didn express my self correctly : EXAMPLE page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table; $res_pro = @mysql_query( $sql_pro); while ($campo_pro = @mysql_fetch_array($res_pro)) { $sid_pro = $campo_pro[Sid]; // $sid_pro = 4 $sid_pro = 'p'.$sid_pro; // I'm trying to use the value of $sid_pro as a VAR name *$sid_pro = p4*print td input name='$sid_pro' type= 'radio' // Here the Imput Name is a VALUE from Database value=''/* /td; // *name = p4 * BLA BLA BLA } page2.php // I Need to access a value from the form witch it's stored in a VAR called $p4 // The Name of the VAR $p4 It's stored in my database, so How can I convert a database string to a VAR NAME === $sqlname = SELECT Sid FROM Table; $res = mysql_query ($sqlname) ; while ($campo_pro = mysql_fetch_array($res)) { $name1 = $campo_pro[Sid]; // *$name1 = 4* $radio = '$'.'p'.$name1 ; // *$radio = $p4 -- Now the Problem **How can I get the Value SOLVE_ME from the submited form ?* echo '$radio'; // == $p4 = WRONG i need // The VALUE of $radio witch is $p4 is the name of the VAR I need to access, how can I export the VALUE $p4 AS a VAR Name ? } Small example that might help solve it: $foo = bar; $$foo = Hello World!; echo $bar; // Prints out Hello World! Greets Barry Thx for your answer Berry, What if I don't know the value of $foo (witch is bar) so we have this : $foo = UnKnowName; $$foo = Hello World!; Here is the problem // remember that I dont know the value of $foo echo .'$'.$foo // prints out $UnKnowName but I need to prints out Hello Worlds! so If I don'r know the value of $foo, what can I do tu prints out Hello World! Thx in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Use VAR string value AS VAR Name
I'm stuck trying to get work this : This is an example page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table; $res_pro = @mysql_query( $sql_pro); while ($campo_pro = @mysql_fetch_array($res_pro)) { $sid_pro = $campo_pro[Sid]; // *sid_pro = 4* $sid_pro = 'p'.$sid_pro; // I'm trying to use de value of $sid_pro as a VAR name *$sid_pro = p4* print td *input name='$sid_pro' type= 'radio' value='SOLVE_ME'/* /td; // *name=p4 * BLA BLA BLA } SUBMIT FORM === page2.php === $sqlname = SELECT Sid FROM Table; $res = mysql_query ($sqlname) ; while ($campo_pro = mysql_fetch_array($res)) { $name1 = $campo_pro[Sid]; // *$name1 = 4* $radio = '$'.'p'.$name1 ; // *$radio = $p4 -- Now the Problem **How can I get the Value SOLVE_ME from the submited form ?* } == Thanks in Advance.
[PHP] usr VAR value as a VAR Name
I'm stuck trying to get work this : This is an example page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table; $res_pro = @mysql_query( $sql_pro); while ($campo_pro = @mysql_fetch_array($res_pro)) { $sid_pro = $campo_pro[Sid]; // *sid_pro = 4* $sid_pro = 'p'.$sid_pro; // I'm trying to use de value of $sid_pro as a VAR name *$sid_pro = p4* print td *input name='$sid_pro' type= 'radio' value='SOLVE_ME'/* /td; // *name=p4 * BLA BLA BLA } SUBMIT FORM === page2.php === $sqlname = SELECT Sid FROM Table; $res = mysql_query ($sqlname) ; while ($campo_pro = mysql_fetch_array($res)) { $name1 = $campo_pro[Sid]; // *$name1 = 4* $radio = '$'.'p'.$name1 ; // *$radio = $p4 -- Now the Problem **How can I get the Value SOLVE_ME from the submited form ?* } == Thanks in Advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem returning private member array variables
Hi to all, I was wondering if someone out there has had the same problem as I have; fetching from an object a private array variable through a get method. And instead of getting a copy of the array, you get access to the original array, being able to access the object's internal data! I have tried my test script on a Linux 2.6.5 running PHP 5.0.4 and on a FreeBSD 5.4 running PHP 5.0.5. Bellow is the test script: ?php class Atom { } ?
[PHP] Problem returning private member array variables
Hi to all, I was wondering if someone out there has had the same problem as I have; fetching from an object a private array variable through a get method. And instead of getting a copy of the array, you get access to the original array, being able to access the object's internal data! I have tried my test script on a Linux 2.6.5 running PHP 5.0.4 and on a FreeBSD 5.4 running PHP 5.0.5 obtaining the same results on both systems. Bellow is the test script: == #!/usr/local/bin/php ?php class Atom { private $x=0; public function __construct($x) { $this-x = $x; } public function setX($x) { $this-x = $x; } public function getX() { return $this-x; } } class Element { private $atoms = array(); public function __construct($NMAX) { for ($i = 0; $i $NMAX; ++$i) $this-atoms[] = new Atom($i); } public function setAtoms($atoms) { $this-atoms = $atoms; } public function getAtoms() { return $this-atoms; } } echo Starting testing on returning private member array variables\n; echo System details: PHP .PHP_VERSION. on .PHP_OS.\n; $element = new Element(3); $v = $element-getAtoms(); print_r($v); $v[0]-setX(79); print_r($v); $w = $element-getAtoms(); print_r($w); echo Testing finished\n; ? == The results are : == Starting testing on returning private member array variables System details: PHP 5.0.4 on Linux Array ( [0] = Atom Object ( [x:private] = 0 ) [1] = Atom Object ( [x:private] = 1 ) [2] = Atom Object ( [x:private] = 2 ) ) Array ( [0] = Atom Object ( [x:private] = 79 ) [1] = Atom Object ( [x:private] = 1 ) [2] = Atom Object ( [x:private] = 2 ) ) Array ( [0] = Atom Object ( [x:private] = 79 ) [1] = Atom Object ( [x:private] = 1 ) [2] = Atom Object ( [x:private] = 2 ) ) Testing finished == Is this expected behavior, or shouldn't the third Array print-out have also a zero in its first objects's x variable? Thanks to everyone for their time. --Best regards FNanDO
[PHP] SUPPORT FOR INTERACTION WITH A DATABASE
Hi, I am creating a Shell in prolog language that interacts with a Visual Prolog database format in Win32, I would like to interact with this database with PHP, just like the interaction with MySQL database, can you give me some notion or the code that need to be executed to get this done? for example in: mysql_connect or mysql_create_db what code is executed behind this functions? I think the functions to make this done should be execute some function that run an .EXE, passes values and receive values from the shell any idea?
[PHP] PHP and Prolog database interaction
Hi, I am creating a Shell in prolog language that interacts with a Visual Prolog database format in Win32, I would like to interact with this database with PHP, just like the interaction with MySQL database, can you give me some notion or the code that need to be executed to get this done? for example in: mysql_connect or mysql_create_db what code is executed behind this functions? I think the functions to make this done should be execute some function that run an .EXE, passes values and receive values from the shell any idea?
[PHP] PHP and Prolog
Hi, I am creating a Shell in prolog language that interacts with a Visual Prolog database format in Win32, I would like to interact with this database with PHP, just like the interaction with MySQL database, can you give me some notion or the code that need to be executed to get this done? for example in: mysql_connect or mysql_create_db what code is executed behind this functions? I think the functions to make this done should be execute a program with some function, passes values and receive values from the shell any idea?
[PHP] support for database interaction
Hi, I am creating a 'Shell' in prolog language that interacts with a 'Visual Prolog' database format in 'Win32', I would like to interact with this database with 'PHP', just like the interaction with 'MySQL' database, can you give me some notion or the code that need to be executed to get this done? for example in: 'mysql_connect' or 'mysql_create_db' what code is executed behind this functions? I think the functions to make this done should be execute a program with some function, passes values and receive values from the 'shell' any idea?
[PHP] VERY SORRY, explanation
very sorry for the spam, I send the message many times because I received this message:* Symantec Mail Security detected prohibited content in a message sent from your address (SYM:00367781894249647555) *and I thinked that my message isn´t received, so I try to change the content very thankful for the link and sorry for the spamming
[PHP] pg_connect requiressl it helps me please
I am needing to have access the PostgreSQL I saw SSL I am using php-gtk for that I saw pg_connect I do not give support for requiressl and ModSSL with that I make to connect using SSL? php-4.3.4
[PHP] pg_connect requiressl it helps me please
I am needing to have access the PostgreSQL I saw SSL I am using php-gtk for that I saw pg_connect I do not give support for requiressl and ModSSL with that I make to connect using SSL? php-4.3.4
[PHP] printer_open() command in redhatlinux 9, php 4.3.9
Hi, Can printer_open() command be used in redhatlinux 9, php 4.3.9. It works fine under win2000. Pls help. Regards Muditha Fernando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] layers
a css maillist http://css-discuss.incutio.com/ On Wed, 22 Dec 2004 06:53:47 -0600, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] The problem I am having doesn't exactly use PHP but, if you guys would help me out anyways, I would be very greatful. [/snip] There is a great maililng list at http://www.evolt.org for questions just like these. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- Fernando Gutierrez Perez -- gmeileando un poco :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Secret Codes in Spam and PHP
i'm mail admin and works with spam filters I tell you some tricks to fix your problem: 1- If you email is HTML based, it should be correct. 2- If you put a unsuscribe code with the email address of the recipient the spam filter score high your email. 3- If you send a mail header X-Mailer: PHP some filters score high This are only a little tricks , for testing you should install a test spam filter , for example bogofilter, spamassassin ,or DSPAM. For example i have spamassassin configured to tell me what rules score my messages. P.D: Sorry for my bad english On Thu, 16 Sep 2004 15:14:14 -0500, Kristopher Spencer-Yates [EMAIL PROTECTED] wrote: As many of you may have noticed, A friend and I have noticed the odd text at the bottom of spam. My friend once stated What if this is some secret code.. they send it to everyone to hide that it is code.. but the person it is intended for knows how to decipher? Hmm.. interesting. So that got me to coding.. I havent had much time to tinker but I do have some Fred Wrixon books.. anyway overall just getting started on this off-time project. If this strange text at bottom of spam is indeed some ciphertext, they are probably using some old cipher methods. This thought is based simply on comparing known cipher appearance to that of the text in spam and often seeing some similarities. I was wondering if anyone else has wondered the same thing about the wierd text at the bottom of a lot of the spam, and if anyone has ever used PHP to create any cipher tools in an attempt to crack the following: Columnar Transposition ciphers Word transposition ciphers Franklin-Dumas cipher My first round is creating a script that goes through and takes various combinations (1st letter of each word, 3rd letter of every 3rd word, etc., etc., etc.,) I guess this is considered letter transposition ciphering. I have some vague ideas to incorporate dictionary database.. so if my script attempts to decrypt a peice of text with method 402 and the result contains actual words from a dictionary, it will flag it or save it to a seperate database.. something along those lines. This is just for fun... no one is sponsoring/financing anything here.. just wondering if anyone is interested in sharing ideas and/or code, philosophy, etc. Of course, this could be done in any language, or even on paper... I can burn a ream of notebook paper fast doing double columnar by hand but my interest is using PHP specifically. I figure, even if my friend is just crazy and no one is sending secret messages inside spam, it is at least going to be fun, rewarding in knowledge and the sharing of information and ideas. And if we do crack something, maybe Fred Wrixon can mention PHP in his next book. :) Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- Fernando Gutierrez Perez -- gmeileando un poco :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT how to create a transparent watermark in png with photoshop
i'm trying to do a watermark to use gd support from php in adobe photoshop , but always my watermark image show white border (i test with 8-bit , alpha chanel , 24-bit). Anyone can explain to me to do this correctly. Thanks in advance -- -- Fernando Gutierrez Perez -- gmeileando un poco :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ZIP
searching in php.net i found this... http://www.zend.com/zend/spotlight/creating-zip-files1.php On Tue, 14 Sep 2004 12:11:23 -0300 (ART), Juan Pablo Herrera [EMAIL PROTECTED] wrote: HI! I need catch many files in my server and make a zip file. In pear i not see nothing. I think use exec for contruction a zip file. Any idea? Regards, JP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- Fernando Gutierrez Perez -- gmeileando un poco :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help SQLServer connection: What's server_name??
[snip] Hi all, that's my first question here, I'm not subscribed. I'm tring to connect a local DB (Apache+sqlserver2K), but when I execute this simple example: ?php $conectID = mssql_connect(,SA,); mssql_select_db(Northwind); $result=mssql_query(select * from products,$numero ); while ($row=mssql_fetch_array($result)) { $counter++; $c1=$row[ProductName]; $c2=$row[UnitPrice]; echo ($counter c1: $c1 c2: $c2\n); } mssql_close($conectID); ? I get: Warning: MS SQL: Unable to connect to server: I tried many words in there (): localhost, LOCAL, PCs name, name that appears in Enterprisa Manager I don't know what word is asking me for it's a stupid question, I know, but [/snip] Do you know the IP address? You could try 127.0.0.1 if it is the server you are working on. If it is a remote server you can get the IP from your network admin Thanks for your answer. I tried (Apache and DB are in the same computer) this but I get the same error... I have SQLserver2K (personal) installed and it works fine... What's the matter? I'm thinking on reinstall it, but I'm afraid that will be a waste of time :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help SQLServer connection: What's server_name??
Hi all, that's my first question here, I'm not subscribed. I'm tring to connect a local DB (Apache+sqlserver2K), but when I execute this simple example: ?php $conectID = mssql_connect(,SA,); mssql_select_db(Northwind); $result=mssql_query(select * from products,$numero ); while ($row=mssql_fetch_array($result)) { $counter++; $c1=$row[ProductName]; $c2=$row[UnitPrice]; echo ($counter c1: $c1 c2: $c2\n); } mssql_close($conectID); ? I get: Warning: MS SQL: Unable to connect to server: I tried many words in there (): localhost, LOCAL, PCs name, name that appears in Enterprisa Manager I don't know what word is asking me for it's a stupid question, I know, but Thanks a lot! -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Barcode info anyone...
use JPGRAPH barcode class On Thu, 5 Aug 2004 08:57:30 +0100, Dave Carrera [EMAIL PROTECTED] wrote: Hi List, I know I can generate print barcodes in php for my app :-) But can I read the generated barcode into my php application and select the associated item and if so what do you have to do to get it working. I think that maybe the mouse cursor would be in a form field, scan the barcode and the data from the barcode reader would go into the form field of which I can issue a OnChange instruction, but I might be completely wrong. Any pointers, urls, advice, hardware suggestions (UK Based) very much welcome Thank you in advance for any help Dave Carrera -- UK Web Hosting @ http://www.ephgroup.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.733 / Virus Database: 487 - Release Date: 02/08/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- Fernando Gutierrez Perez -- gmeileando un poco :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Graphing Webstats using MRTG/PHP/MYSQL?
see cacti: http://www.raxnet.net/products/cacti/ On Thu, 29 Jul 2004 14:03:08 +0800, Louie Miranda [EMAIL PROTECTED] wrote: has anyone know any tools related to this? Graphing Webstats using MRTG/PHP/MYSQL? -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- Fernando Gutierrez Perez -- gmeileando un poco :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] run perl script with php
I never tried but i think it is possible using the pecl extension: http://pecl.php.net/package/perl Tassos T wrote: hello, i faced a small problem i have a perl script but i want to execute that in a php script. unfortunately i cannot convert to php. please advice. regards Tassos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pdflib alternatives
Is there are any alternatives to the pdflib for on the fly generation of printable documents? May be a postcript lib? http://www.fpdf.org/?lang=en -- Jim Kaufman Linux Evangelist public key 0x6D802619 http://www.linuxforbusiness.net Thanks Jim, it's what i need. -- Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pdflib alternatives
Hello everybody: Is there are any alternatives to the pdflib for on the fly generation of printable documents? May be a postcript lib? I need no fancy things, just speed and minimal formating facilities, even no graphics support is ok. Any sugestions? Thanks in advance to all of you -- Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Aproach to based PHP authentication
Hello everybody. I think this problem there was thousands of times in this forum, as the archives shows, so you can freely ignore me if I bother you. I have little auth php base that looks like: if(cookie) authcookie(); else if($_POST[uname] $POST[pass]) authuser(); // and sets a cookie else printloginForm; This works and a lot of sites use a similar approach, but it has two notorious flaws: 1) need cookies (i can live with this one) 2) the browser repost $_POST variables so there is no way to set a expiration time for the cookie, because it will be seted again, at least until the browser were closed. So, one of the two things need to be sacrificated: the loginForm, and the comfortable $_POST array, or the possiblity of autmatic logoof based on the expiration of the cookie. What do you think will be the way to do in this situation? Thanks everybody. -- Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [posibleOT] Forcing entering te site thru index.php
Hello everybody. Well, i'm trying to avoid access to the site for the middle. Say there is a initial page with a form and other pages that depends on this. Is there a way to force users access the site thru the initial form page, regardless of the url? Something like this: lynx http://mysite/forma2.php/ produce the browser to redirect to http://mysite/index.php/ Of course, the forma2.php must be served if its accesed after index.php. Thanks -- Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [posibleOT] Forcing entering te site thru index.php
On Sun, Dec 21, 2003 at 01:03:43PM -0600, Eugene Lee wrote: On Sun, Dec 21, 2003 at 03:57:24PM -0300, Fernando M. Maresca wrote: : : Well, i'm trying to avoid access to the site for the middle. Say there : is a initial page with a form and other pages that depends on this. Is : there a way to force users access the site thru the initial form page, : regardless of the url? : Something like this: : lynx http://mysite/forma2.php/ : produce the browser to redirect to : http://mysite/index.php/ : : Of course, the forma2.php must be served if its accesed after index.php. There are several ways to do this. The most obvious is with cookies. Set up your index.php to initially create a cookie that authorizes a user to look in the site. On the rest of your PHP pages, check that this authorization cookie exists. If not, redirect to index.php. Thanks for the response. No, this way don't do it: once the cookie is set up in the client's browser, there is no way for me to prevent the client to type the url pointing to another page, and the cookie will be valid on that page. What i'm trying to do is to force the client to travel pages in the order expected, forbidding him/her to access a page out of sequence, wich take him to an error message (because, for example, for abscense of POST data or something). So i'm stuck. Thenak you. -- Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [posibleOT] Forcing entering te site thru index.php
On Sun, Dec 21, 2003 at 01:16:58PM -0600, Website Managers.net wrote: Cookies are a possibility but not always functional. Many people have them shut off, or services like WebTV do not support them. Two other possibilities are seccions and POST variables. _SESSIONS_ forma2.php if((!isset($_SESSION[username]) || (!isset($_SESSION[password])) { header(Location:index.php); } __ POST __ // check to make sure username and password are entered and if so, they must match account if ((!$_POST[username]) || (!$_POST[password]) || ($_POST[username != myuser) || ($_POST[password] != mypassword])) { header(Location:index.php); } Thanks, Jim. Yes, i'm doing something like that: i'm propagating a string thru $_SESSION that is set up in the first page and is valid until session expires or init page is reloaded. But i think that may be another (and better) way to do this, and can't figure out how. Jim www.websitemanagers.net Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [posibleOT] Forcing entering te site thru index.php
Not really. It depends on how you use your cookie. The cookie could be some unique ID to some session-based system (whether you use PHP session functions or not) that keeps a track of where the user is. So let's say the user did the right thing, went to index.php, got a cookie, and went to the next page (let's say forma1.php). Your session system notes that the user is currently on forma1.php. But the same user gets distracted, does not go through the form normally, leaves for a few hours, and then tries to return but jump directly to forma2.php. Your session system realizes that he's not supposed to be there, and kicks him out to whereever you want him. You are right. I'm using $_SESSION vars to do this, but i don't like it because forces cookies enable in the client, and today many people disable cookies. In the other hand, $_POST vars are not very secure. i'm looking for a clean solution, and can't figure out how. So the question in first place would be: how you guys do it?. Nevermind, this is not big deal. The aproach i've take works, but you are experienced people and i'm not, and i'm very interested in the way you're using to solve problems like this ones. So thanks a lot. -- Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Add Reply-To to this list(s)
Guys. This is ridiculous! When I check my mails from PHP General Mailing List it's to learn something new about PHP and to help somebody to learn abut PHP. NOT TO WITNESS CAT FIGHTS. Take your issues elsewhere as you or wasting everyone's time, space and bandwidth. -Original Message- From: Nigel Jones [mailto:[EMAIL PROTECTED] Sent: 26 November 2003 12:04 To: [EMAIL PROTECTED] Subject: RE: [PHP] Add Reply-To to this list(s) You have missed in my opinion the most important thing, many do NOT want to throw money down the drain because their Client Doesn't support mailing lists ok. IMHO we'd be better off having a PHP Forum on php.net and scrub the Mailing List altogether. That would just about suit everyone. You get to subscribe to Topics you want to, you can subscribe to whole forums if you want to, less Privacy Issues. _ Nigel Jones [EMAIL PROTECTED] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 10:42 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Add Reply-To to this list(s) Simply put, there are mail clients available which are mailing-list aware. To reply to the list you hit the reply-to-list button , to reply to the sender you hit the reply button, to reply to everybody and their dogs hit the reply-to-all button. Now the mail client that you're using does not handle mailing-lists correctly, so instead of looking for a better mail client you want the mailing-list fixed instead? It's a bit like saying damn, I can't fully utilise the features of MS Exchange with my non-Outlook client, why don't MS fix Exchange so I can use it Yahoo mail? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* To the landlord belongs the doorknobs. */ -- 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] Add Reply-To to this list(s)
I agree! -Original Message- From: Sophie Mattoug [mailto:[EMAIL PROTECTED] Sent: 26 November 2003 14:39 To: [EMAIL PROTECTED] Subject: Re: [PHP] Add Reply-To to this list(s) Wouldn't it be possible to stop this troll ? Or go on, but in private between people who are interested by this matter... Thanks Jay Blanchard wrote: [snip] If you would stop using M$ Outlook and switch to a better mail client that supports mailing lists, your problem would be solved.[/snip] As has been said several times, not all can do this. True. But maybe instead of *switching* they can just use *another* mail client for mailing lists? ;) [/snip] Depends. Some corps would allow the installation of additional mail clients, some would not. -- 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] Time
Hi there, I have a RH Linux Web server running apache and PHP. I recently changed the system clock, the time zone and hardware clock. The time and date are showing up correctly in Webmin and in the O/S itself. But when I call a php function to display the date and time it shows it as one hour behind! How do I fix this? Regards Fernando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Time
Hi there, I have a RH Linux Web server running apache and PHP. I recently changed the system clock, the time zone and hardware clock. The time and date are showing up correctly in Webmin and in the O/S itself. But when I call a php function to display the date and time it shows it as one hour ahead (like it used to be)! How do I fix this? Regards Fernando
RE: [PHP] Time
I have done all those checks. Thanks for trying though. Anyone else have any suggestions please? :( -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25 November 2003 16:06 To: [EMAIL PROTECTED] Subject: AW: [PHP] Time Hi Fernando, first try date and date -u in a shell. That's the local and UTC-time. Write a testscript to show time and timezone in PHP without calculations. Check /etc/timezone. It can be that you must create it. Sri, no more ideas on the fly. It's a little bit complex to manage all features. Hope some checks are good for your search... Greetings, Tobias -Ursprüngliche Nachricht- Von: Fernando Melo [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 25. November 2003 11:20 An: '[EMAIL PROTECTED]' Betreff: [PHP] Time Hi there, I have a RH Linux Web server running apache and PHP. I recently changed the system clock, the time zone and hardware clock. The time and date are showing up correctly in Webmin and in the O/S itself. But when I call a php function to display the date and time it shows it as one hour behind! How do I fix this? Regards Fernando -- 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] Time
Hi, I found the problem. If you change the time zone on your Linux server running Apache and PHP, you need to Stop and then Start Apache else the PHP (or Apache) will still pick up the old time zone. Thanks anyway -Original Message- From: Wouter van Vliet [mailto:[EMAIL PROTECTED] Sent: 25 November 2003 13:13 To: 'Fernando Melo'; [EMAIL PROTECTED] Subject: RE: [PHP] Time Fernando Melo wrote: Hi there, I have a RH Linux Web server running apache and PHP. I recently changed the system clock, the time zone and hardware clock. The time and date are showing up correctly in Webmin and in the O/S itself. But when I call a php function to display the date and time it shows it as one hour behind! How do I fix this? Regards Fernando Must be something with your locale settings. Probably your sytem clock is set to the GMT time, while you are in GMT+1 yourself. Not really sure how to fix this, but this might be something that helps you find the solution. Let me know ! Wouter -- 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] MS SQL Connectivity from Linux
Hi everyone, What is the quickest and easiest way to enable access to a MS SQL database from a Linux server (using PHP functions ofcourse), seeing as the MSSQL extension is available on Win32 systems only. Thanks Fern -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] register_globals security
Hi everyone, I have a PHP application that passes variables (values) from a form. I get these using $_POST However I do also post some variables via a link. Which ofcourse requires register_globals to be ON. I would like to secure this application. What would be the best way of doing this and how else can I pass/get values via a URL. Fern -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] register_globals security
Thanks. I don't see how this makes it more secure though? The values are still picked up the same way from a URL -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED] Sent: 13 November 2003 13:28 To: [EMAIL PROTECTED] Subject: Re: [PHP] register_globals security Hi Fernando, I have a PHP application that passes variables (values) from a form. I get these using $_POST However I do also post some variables via a link. Which ofcourse requires register_globals to be ON. Do you mean variables in a URL, like this: www.example.com/index.php?foo=1bar=2 If so you can access these via the $_GET array and leave register_globals turned off. Cheers Jon -- 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] register_globals security
Yup I still don't see how it improves anything with regards to security. -Original Message- From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] Sent: 13 November 2003 15:24 To: [EMAIL PROTECTED] Subject: Re: [PHP] register_globals security Hi, There is also a $_REQUEST variable. At the risk of starting another flame war: IMHO switching off register globals and relying on $_POST etc can lull you into a false sense of security. Fernando Melo wrote: Thanks. I don't see how this makes it more secure though? The values are still picked up the same way from a URL -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED] Sent: 13 November 2003 13:28 To: [EMAIL PROTECTED] Subject: Re: [PHP] register_globals security Hi Fernando, I have a PHP application that passes variables (values) from a form. I get these using $_POST However I do also post some variables via a link. Which ofcourse requires register_globals to be ON. Do you mean variables in a URL, like this: www.example.com/index.php?foo=1bar=2 If so you can access these via the $_GET array and leave register_globals turned off. Cheers Jon -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- 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] register_globals security
I was not making an assumption. I was stating a fact. I get these using $_POST I did NOT state that register_globals needs to be on to do what I'm doing. It seems everyone else understood my query except you. Thanks to everyone who tried to help! -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED] Sent: 13 November 2003 17:07 To: Fernando Melo; '[EMAIL PROTECTED]' Subject: Re: [PHP] register_globals security --- Fernando Melo [EMAIL PROTECTED] wrote: I have a PHP application that passes variables (values) from a form. I get these using $_POST However I do also post some variables via a link. Which ofcourse requires register_globals to be ON. This is a common problem I see on this list. When asking a question, try not to make assumptions or attempt to answer your own question. In this case, your assumption is wrong. This does not require register_globals to be on. Get variables are in $_GET, and POST variables are in $_POST. Hope that helps. Chris = My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Apache 2
Hi everyone, I would like to use apache 2 in a production environment, but initially there seemed to be some issues with the PHP module. Does anybody know if it is ok use it now or is it still buggy with apache 2? Fern -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Apache 2
And when will it be considered stable? It's been a while since Apache 2 was released. PHP needs to speed up for its own good. -Original Message- From: Eugene Lee [mailto:[EMAIL PROTECTED] Sent: 30 October 2003 11:55 To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP Apache 2 On Thu, Oct 30, 2003 at 11:22:38AM +0200, Fernando Melo wrote: : : I would like to use apache 2 in a production environment, but initially : there seemed to be some issues with the PHP module. Does anybody know : if it is ok use it now or is it still buggy with apache 2? The combination of PHP 4.x and Apache 2.x are not considered stable for a production environment. -- 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] Regular expressions
Hi all, I have the following statement: $text = ereg_replace ([live/]*content\.php\?[]*Item_ID=([0-9]*)Start=([0-9]*)Category_ID=([0- 9]*)[]*, content\\1start\\2CID\\3.php, $text); Basically what I'm trying to do is if the URL includes live/ then I want to include it in the replace. The way I have it now check for all the letters in live instead of the whole string. I hope I explained this properly. Regards Fern -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] get back to index.php
In insert_user.php header(Location: index.php); exit; make sure nothing is being echoed before you call this. -Original Message- From: Sudheer Palaparambil [mailto:[EMAIL PROTECTED] Sent: 22 October 2003 14:15 To: [EMAIL PROTECTED] Subject: [PHP] get back to index.php Hi, I am calling the insert_user.php like this form method=get name=form action=http://www.etooss.com/insert_user.php; onsubmit=return verifyIt(this); In insert_user.php, I am inserting the record to mysql db, nothing is displayed there. Now how do come back to index.php screen. Thank you Sudheer _ Making your life easy! That is Citibank Suvidha. http://server1.msn.co.in/msnleads/citi_cards_sept03/CitiSuvidha.asp Get your account now! -- 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] get back to index.php
Make sure there are no blank spaces being echoed. -Original Message- From: Sudheer Palaparambil [mailto:[EMAIL PROTECTED] Sent: 22 October 2003 14:30 To: [EMAIL PROTECTED] Subject: Re: [PHP] get back to index.php But it is giving the following error message Warning: Cannot modify header information - headers already sent by (output started at D:\websites\clands\clandsadmin\etooss.com\web\insert_user.php:3) in D:\websites\clands\clandsadmin\etooss.com\web\insert_user.php on line 29 Thank you. From: Marek Kilimajer [EMAIL PROTECTED] To: Sudheer Palaparambil [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] get back to index.php Date: Wed, 22 Oct 2003 14:24:44 +0200 Use header('Location: http://www.etooss.com/'); exit; Sudheer Palaparambil wrote: Hi, I am calling the insert_user.php like this form method=get name=form action=http://www.etooss.com/insert_user.php; onsubmit=return verifyIt(this); In insert_user.php, I am inserting the record to mysql db, nothing is displayed there. Now how do come back to index.php screen. Thank you Sudheer _ Making your life easy! That is Citibank Suvidha. http://server1.msn.co.in/msnleads/citi_cards_sept03/CitiSuvidha.asp Get your account now! _ Tired of emails bouncing back? Need more space? http://server1.msn.co.in/features/general/extrastorage/index.asp Get extra storage on Hotmail -- 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] The page cannot be displayed error
Is there perhaps a redirect in the insert_user.php? If so, that could be the problem. -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: 21 October 2003 13:31 To: Sudheer Palaparambil; [EMAIL PROTECTED] Subject: Re: [PHP] The page cannot be displayed error From: Sudheer Palaparambil [EMAIL PROTECTED] I am calling insert_user.php like this form method=post name=form action=insert_user.php onsubmit=return verifyIt(this); This file and the index.php are kept in the same directory. But the browser returns The page cannot be displayed error Where should I keep the insert_user.php The files are in the right place. You may not be able to use POST, try GET for your form method and see if that works. ---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
RE: [PHP] feedback form
mail($toaddress, $subject, $mailconten); should be mail($toaddress, $subject, $mailcontent); -Original Message- From: merryE [mailto:[EMAIL PROTECTED] Sent: 12 October 2003 22:52 To: [EMAIL PROTECTED] Subject: [PHP] feedback form I create a feedback form in html and the action si to post to the php. It doesn't wotk well and i don't know what's is the problem. please help me to look at it. Tell me the errors, thank's. This is the form.php code: ? php $toaddress = [EMAIL PROTECTED]; $subject = Feedback testing; $mailcontent = Name: .$name.\n .Email: .$email.\n .comments:\n .$feedback.\n; mail($toaddress, $subject, $mailconten); ? This is the form.html code: form name=form1 method=post action=form.php table width=100% border=0 tr td width=83 class=textname :/td td width=432input name=name type=text class=text id=name/td /tr tr td class=textemail :/td tdinput name=email type=text class=text id=email/td /tr tr td valign=top class=textfeedback :/td tdtextarea name=feedback cols=30 rows=4 wrap=VIRTUAL class=text id=feedback/textarea/td /tr tr tdnbsp;/td tdinput name=Submit type=submit class=buttons value=Submit input name=Clear type=reset class=buttons id=Clear2 value=Clear/td /tr /table /form -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] feedback form
mail($toaddress, $subject, $mailconten); should be mail($toaddress, $subject, $mailcontent); -Original Message- From: merryE [mailto:[EMAIL PROTECTED] Sent: 12 October 2003 22:52 To: [EMAIL PROTECTED] Subject: [PHP] feedback form I create a feedback form in html and the action si to post to the php. It doesn't wotk well and i don't know what's is the problem. please help me to look at it. Tell me the errors, thank's. This is the form.php code: ? php $toaddress = [EMAIL PROTECTED]; $subject = Feedback testing; $mailcontent = Name: .$name.\n .Email: .$email.\n .comments:\n .$feedback.\n; mail($toaddress, $subject, $mailconten); ? This is the form.html code: form name=form1 method=post action=form.php table width=100% border=0 tr td width=83 class=textname :/td td width=432input name=name type=text class=text id=name/td /tr tr td class=textemail :/td tdinput name=email type=text class=text id=email/td /tr tr td valign=top class=textfeedback :/td tdtextarea name=feedback cols=30 rows=4 wrap=VIRTUAL class=text id=feedback/textarea/td /tr tr tdnbsp;/td tdinput name=Submit type=submit class=buttons value=Submit input name=Clear type=reset class=buttons id=Clear2 value=Clear/td /tr /table /form -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Installing PHP on XP
Are you installing the CGI or the ISAPI? -Original Message- From: Rinal Patel [mailto:[EMAIL PROTECTED] Sent: 09 October 2003 05:06 To: [EMAIL PROTECTED] Subject: [PHP] Installing PHP on XP Hello I am trying to install PHP on my personal computer, which runs Microsoft XP, but have had trouble installing it. I have an apache server(it came with the oracle database I installed). Could you please help me? I would appreciate a quick response Thank you -rinal _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- 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] Check if directory has changed
I would like to write a function to check if the contents of a directory, its files, have been changed. The idea is to check the directory every 2 minutes and take some actions if some files were updated or new files added. Does anyone has any ideas? I was considering listing the files (name, date modified, size) on a variable array, then list again and compare both arrays. In case there are different, take some action. Thank you, C.F.