[PHP] curl?
Hi, Everybody! I got this when I execute the script: Fatal error: Call to undefined function: curl_init() in msnp9.class.php on line 259 is there anyway to solve it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] curl?
Wong HoWang wrote: >Hi, Everybody! > >I got this when I execute the script: >Fatal error: Call to undefined function: curl_init() in msnp9.class.php on >line 259 > >is there anyway to solve it? > Yes, by installing the curl libraries. If you are using Windows and PHP 5.0, you can get the curl library DLL from the PECL collection: http://www.php.net/get/pecl-5.0.4-Win32.zip/from/a/mirror If you are using Linux, you can add the --with-curl (or was it --enable-curl) configure argument and re-compile PHP. Regards, Torgny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array varible problems
Dear you, Now, I want to define a set of array varible with table structure as the following: Result page: Source page: for($i=1;$i<5;$i++) { } Only display the result of zero array, eg : f1[0] f2[0] f3[0] f4[0] So, how to write the source (Web page - when user click the submit button) by using loop ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help Building Dynamic Checkboxes
Hi, There are a couple of problems with your code. The first is that you have global variables enabled, which makes things easier, but also makes things less secure. You should definitely disable them in your php.ini file if possible. Also, when you put the square brackets after gmev (gmev[]), you turn $_POST['gmev'] into an array. Yet your code just checks to see if the $_POST['gmev'] variable has any value at all, which of course, it does. > if ($gmev) { > $checked = ' checked="checked"'; > } else { > $checked = ''; > } Therefore, when you go to present the form, $checked always has the string from the first case in the if statement, since you're not specifying which part of the $gmev array you really care about. My suggestion to everyone dealing with these form problems, which are a general pain... Use Lampshade. It's so much easier! You can do this all in three lines of code: two to set up your choices for the form element, and one to draw the element itself. http://www.thinkcomputer.com/software/lampshade I'd be glad to help you with it if you have any questions. Best of luck, Aaron Aaron Greenspan President & CEO Think Computer Corporation http://www.thinkcomputer.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sort multi array.
I´ve in a array the coluns: date , weekday , hour , etc... I need to sort him by coluns 0 and 2 but not found the correctly function to do it. Please, anyone know how can i do? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mail-id validation script
Hello, on 08/13/2005 01:49 AM Nahalingam Kanakavel said the following: This is naha, I am very new to PHP as well as this group, I am in need of your guidence all my way. Now I am doing a project using PHP, in that I created a form. That form has a field called e-mailid, to validate that I need a script (function), whether I have to write it in the server side or client side, which one is better?. I need your suggestions, If any script is there plz send it to me. This class does exactly what you ask: http://www.phpclasses.org/emailvalidation -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sort multi array.
João Cândido de Souza Neto wrote: >I´ve in a array the coluns: date , weekday , hour , etc... > >I need to sort him by coluns 0 and 2 but not found the correctly function to >do it. > Take a look at this manual page: http://www.php.net/manual/en/function.array-multisort.php Regards, Torgny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP without php.ini
Hi All, As my previous mail about fail on PHP5-MySQL, then I removed all of php.ini (included -recomended and -dist). Then used phpinfo(), I found there is php still work and found and informed "Configuration File(php.ini) Path = C:\WINNT". How can this be happenned? (I believe, this will answer why cannnot load MySQL extension problem on my Win2000) Thanks in advance for your answer.
RE: [PHP] PHP without php.ini
Actually, my problem is when used phpmyadmin it was generate error "cannot load mysql extension". Then I'm trying to resolve as refer php-manual(included edit system environment), googling but the result is none. I'm give up, and remove all php.ini to ensure is the problem on php.ini or others. Any idea, what is wrong? From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Sun 14-Aug-2005 03:44 To: Bagus Nugroho Subject: Re: [PHP] PHP without php.ini Bagus Nugroho wrote: > Hi All, > > As my previous mail about fail on PHP5-MySQL, then I removed all of php.ini > (included -recomended and -dist). > Then used phpinfo(), I found there is php still work and found and informed > "Configuration File(php.ini) Path = C:\WINNT". > if there is no php.ini php defaults to whatever is the default for all settings. and your on windows - php (IIRC) looks for a php.ini in the windows dir if it can't find on elsewhere (sometimes it live there too) > How can this be happenned? > (I believe, this will answer why cannnot load MySQL extension problem on my > Win2000) possibly or php can't find the extension or it a case of that you need to be using the mysqli extension (and load that) instead mysql. > > Thanks in advance for your answer. >
Re: [PHP] making checkbox's and radio buttons sticky
Ted Passey wrote: thanks Jochem - I am learning alot about arrays. I think this may be what i am looking for if (in_array('September 9th', $gmev)) it seems to work great... is that $gmev being created automatically? if so you are using register_globals - which is one step in the direction of the dark side - for the love of use the element in the $_POST superglobal array instead i.e. $_POST['gmev'] However...when you get one problem solved, another pops up... not problems - challenges. The checkboxes work as long as one is selected, but if the page is submitted without checking any boxes in the array.. you get the warning Warning: in_array(): Wrong datatype for second argument it wants an array - your not giving it an array. Any idea on how to resolve this? how do you think it should be resolved? what about checking the variable before blindly using it - time to find a way to check if a var is an array (or even exists in the scope of the current code) ... there is a function that does this - it's name is so selfevident that I'm not even going to name it - seek and you shall find. Thanks, Zedleon - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Ted Passey" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED] .php.net> Sent: Saturday, August 13, 2005 4:40 PM Subject: Re: [PHP] making checkbox's and radio buttons sticky Ted Passey wrote: ok, thanks again Jochem! Its good to know their is support for php from good people like you. The radio's are working great! However i still have a small issue with the checkboxes.. They appeared to be working properly...but now all the checkboxes in the array are "checking" Not sure whats going on...I can tell you this however..my brain in mush. here is what i have... HTML is: September 9th 14th">October 14th November 11th December 9th PHP looks like this: $_POST['gmev'] will be an array - you have to loop it and determine which of the date values (from the checkboxes) it contains - for each date found you have to set the corresponding checkbox. its time to learn about associative arrays, using array indexes and foreach loops! $checked = ' checked="checked"'; } else { $checked = ''; } echo ''; ?> any Idea's Thanks in advance zed - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Ted Passey" <[EMAIL PROTECTED]>; "[php] PHP General List" Sent: Friday, August 12, 2005 1:09 PM Subject: Re: [PHP] making checkbox's and radio buttons sticky Ted Passey wrote: Jochem, Thanks for your help...I can see your a great PHP programmer. flattery gets you everywhere - even if it isn't true. I'm not that bad - but lets leave the 'great' for those that really are - you know people who develop/invent the actual language - people who write books about it, people like that :-) oh and as long as it's php related make sure to atleast cc the list. The dynamic checkbox code you sent worked great! I am however have a problem with a set of radio buttons... I am trying to appy the same principle here... The problem I am encountering is the $checked value in the echo string will always show the button "checked" So no matter what is selected, it comes back to "checked" Any suggestions? HTML is: Member I assume that should be?: Member Prospective Member PHP is: if $member containseither 'Yes' or 'No' then it will equate to boolean true - which is what you are in fact testing try something like: if ($member == 'Yes') { $checked = ' checked="checked"'; } else { $checked = ''; } echo ''; ?> Thanks for the help... zed - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> Newsgroups: php.general To: "zedleon" <[EMAIL PROTECTED]> Cc: Sent: Thursday, August 11, 2005 9:18 PM Subject: Re: [PHP] making checkbox's and radio buttons sticky zedleon wrote: I am new to php and am in need of some guidance I am building a sticky form and am having trouble bringing in the data sticky as in honey? fields for checkbox's and radio button's. Any help on how to do this would be appreciated HTML form sample 9th"> PHP $gmev_day ?>"> am I on the right track here? maybe, partially - generally radio buttons and checkboxes have fixed values - it's the 'are they selected' part that probably want to make dynamic... basically you need to conditionally add the attribute 'checked' (i.e. checked="checked") to the radios and checkboxes you want selected when the form is first shown. e.g. '; ?> of course there are a million different ways to write this kind of thing (i.e. don't take my example verbatim perse) but hopefully you get the idea. zed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 'God' has spoken... :-)
if you haven't seen it yet and are interested in the future of php you might be interested in the _big_ thread on php-internals that starts with the message: http://www.manucorp.com/archives/internals/200508/msg00398.php IMHO every halfbaked php coder should read it ;-) to cut it short for those to busy, or what not, Rasmus offered his his vision of php6 (which seems will be the version that will first bring the awesome unicode [and date?] functionality to the masses - hey thats us! :-) ) and there seems to be pretty much unanimous agreement on his main points (lots of discussion on more issues/ideas other people have brung up in response) the future's bright, the future is green. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ALLOW FILE UPLOADS...?
<< z a p a n >> wrote: hello, sorry in advance if my question is naive.. i'm trying to allow file uploads. optimally i'd like to store these files (jpgs, mostly) directly to a folder in my httpdocs.. i've heard something about file uploads not being allowed if server is set to safemode.. not sure why but i've been getting don't know if that is true - but then you don't say whether the machine your on is running in safe_mode. you don't even say what errors - why don't you present some output from your script, no point in anyone running it somewhere else really is there? ** oh and DONT post a new question as a reply to an existing thread - bad bad bad. ** most probably your script (or rather the user it is running as - most likely something like 'apache' else the user account given to you on the box in question) doesn't have write permissions for the dir you want to move the upoaded files to. or maybe the directory /release_pics/ doesn't even exist, $uploads_dir need to contains path not a halfbaked URL - I'm assuming that your document root is not / ... so try something like: $uploads_dir = '/PATH/TO/YOUR/WEB/DOCUMENT/ROOT/release_pics/'; btw you have to replace the '/PATH/TO/YOUR/WEB/DOCUMENT/ROOT' bit with something valid ;-) oh and try checking the return values of functions (e.g. move_uploaded_file) - they might give you a hint. also check your error logs and start using functions like print_r(), var_dump() to see what's going on inside your script... errors.. here're the two files if you have time to check them out. thanks for your time! xo, -z -- [file1.html] FILENAME: -- [file2.php "; continue 2; case 3: print "the upload of file $filename was broken. please try again."; continue 2; } print "received: $filename."; print "type: $myfile['type']."; move_uploaded_file( $myfile['tmp_name'], $uploads_dir.$myfile['name']); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP without php.ini
Bagus Nugroho wrote: Actually, my problem is when used phpmyadmin it was generate error "cannot load mysql extension". Then I'm trying to resolve as refer php-manual(included edit system environment), googling but the result is none. I'm give up, and remove all php.ini to ensure is the problem on php.ini or others. Any idea, what is wrong? As you have already found, the default location for php.ini on windows is the windows directory ( c:\winnt\ on W2k ) PHP5 does not now load MySQL be default since the licence restrictions changed, and you now need to select the correct version of extension to match the version of MySQL. So you need to 'uncomment' extension=php_mysql.dll or extension=php_mysqli.dll for pre or post Version 4 MySQL -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
Jochem Maas wrote: > if you haven't seen it yet and are interested in the future > of php you might be interested in the _big_ thread on php-internals > that starts with the message: > > http://www.manucorp.com/archives/internals/200508/msg00398.php > > IMHO every halfbaked php coder should read it ;-) > I suppose I am halfbaked. Maybe even a bit burnt and crispy on the edges, Jochem. Greatest news I've heard in a long time. Remove register_globals and magic_quotes_*! Wow. Well, considering that they've been the cause for most of the simpler PHP hacks that could have been prevented had not register_globals been active. :P I am not so sure that removing function aliases and making identifiers case-sensitive is academic purity alone, though. I consider that a very good step towards more easily managed code, that way there's only one function, and no aliases, or case-specific variations thereof. After reading the responses to Rasmus' post I am delighted to see that most of the list has agreed to this as well, splendid. Some of these were what I had expected for 5.x though, so in part I am disappointed that they were not already removed/implemented. /Torgny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP without php.ini
I was uncomment php_mysql.dll and added php_mysqli.dll, put edited php.ini as recommended, also added libmysql.dll on c:\winnt\system32. But it still doesn't work, it still generate "cannot load mysql extension, ...". Previously, I was edit system variables(edit Path variable by add ;c:\php;c:\php\ext and add PHPRC > value c:\php), also edit Registry as the following : [HKLM\SOFTWARE\PHP] "IniFilePath"="C:\PHP" PHP installed on C:\PHP Apache 2.0 on C:\Program Files\Apache Group\ ... MySQL on C:\Program Files\MySQL I hope, someone can help me to solve the problem before I'm return back to PHP4. Thanks and Thanks -Original Message- From: Lester Caine [mailto:[EMAIL PROTECTED] Sent: Sunday, August 14, 2005 4:46 AM To: Bagus Nugroho Subject: Re: [PHP] PHP without php.ini Bagus Nugroho wrote: > Actually, my problem is when used phpmyadmin it was generate error "cannot > load mysql extension". Then I'm trying to resolve as refer > php-manual(included edit system environment), googling but the result is none. > > I'm give up, and remove all php.ini to ensure is the problem on php.ini or > others. > > Any idea, what is wrong? As you have already found, the default location for php.ini on windows is the windows directory ( c:\winnt\ on W2k ) PHP5 does not now load MySQL be default since the licence restrictions changed, and you now need to select the correct version of extension to match the version of MySQL. So you need to 'uncomment' extension=php_mysql.dll or extension=php_mysqli.dll for pre or post Version 4 MySQL -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
Torgny Bjers wrote: Jochem Maas wrote: if you haven't seen it yet and are interested in the future of php you might be interested in the _big_ thread on php-internals that starts with the message: http://www.manucorp.com/archives/internals/200508/msg00398.php IMHO every halfbaked php coder should read it ;-) I suppose I am halfbaked. Maybe even a bit burnt and crispy on the edges, Jochem. :-) Greatest news I've heard in a long time. Remove register_globals and magic_quotes_*! Wow. Well, considering that they've been the cause for most of the simpler PHP hacks that could have been prevented had not register_globals been active. :P I am not so sure that removing function aliases and making identifiers case-sensitive is academic purity alone, though. I consider that a very good step towards more easily managed code, that way there's only one function, and no aliases, or case-specific variations thereof. After reading the responses to Rasmus' post I am delighted to see that most of the list has agreed to this as well, splendid. Some of these were what I had expected for 5.x though, so in part I am disappointed that they were not already removed/implemented. the problem is BC. given that so many massive changes are scheduled for what will become 6.0 that will entail BC breakage anyway the core guys seem to think its a good point to break some more. I think it's sensible, breaking BC is a dangerous thing to do and not to be taken lightly when you have a user base as massive as that of php. in the mean time we have a faster 'execution model' to look forward to in 5.1 - _faster_ OO code! yippee :-) /Torgny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] header redirect not working
[snip]Can you place the following code just before the header() line, and post what it prints? die($this->CMS_base_path); In other words, tell us what the $this->CMS_base_path field contains when that line is executed.[/snip] It contains 'https://cms.mydomain.com', which is what it is supposed to contain. It's redirecting to the correct domain, just the incorrect page. Thanks, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
[EMAIL PROTECTED] wrote: Sorry, I will be out of the office until Monday 15th August. trust phil to be on holiday. Kind regards, Phil Ewington. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: frame help!
George B wrote: George B wrote: I made a left frame, then made the three pages, and all the frames show fine. But this is not my problem! I made a "leftpane" which has code to check if user exists (its for a login script). In the code for the login FORM I set it to go directly to the "userpane" file. It works fine! It recognizes me and all, says I am logged in. But if I set the Login FOrm to the main frame file (which shows the 2 frames) it says wrong user and password. What do I do to make this work?!?!?! fix it. which is about a vague an answer as is your question. are we supposed to smell out how your login works? what a 'userpane' is? Well can anyone help? :( :( I really need to know how to do this :( SFTW, RTFM, learn to ask a proper question. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] header redirect not working
[snip] I can think of a few, and my first instinct is to check to see whether your script produces any errors in one environment that it doesn't in the other. If you're displaying errors, they can affect the behavior of your scripts when you're also using header(). Replace header() with echo and compare the behavior. Also, comparing php.ini can help you identify differences in configuration. Configuration directives can be modified through other means, but this is a good starting point (and a good candidate for version control anyway - inconsistencies can cause you to waste time and effort).[/snip] Hi, Chris. I turned on error reporting for that script in production and no errors occurred. However, and this is even stranger to me, if I add the following after the call to header() die('foo'); the page redirects to the correct url. I remove die('foo'); and it redirects to itself again. I'll take a look at the two ini files to see if I can spot any differences, but I'm stumped as to what in there might cause just this one page to redirect to itself rather than the prescribed URL. The form submits to a controller url, and then is validated using a form generation/validation class I use for all my applications. If the validation fails it redirects back to the form page, with the appropriate form id appended to the url. If the validation succeeds, the delete event method is called, at the end of which the redirect back to the main event page should occur, but is not for some reason, unless I add that line of code after it. I know the form is validating since the event is deleted, since, well, it is deleted, and there is no form id appended to the url when it is redirected. Any other ideas? Thanks, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] making checkbox's and radio buttons sticky
Support wrote: okI got it!! not wanting to go down the path of the darkside...I inserted the superglobals.. if (isset($_POST['gmev']) && in_array('September 9th', $_POST['gmev'])) so did I get it right? there are many roads to Rome. using isset() and in_array() is a very good start indeed! (you'd be surprised at how many people don't check vars at all) you might consider either casting $_POST['gmev'] as an array at some stage: $myArr = (array)$_POST['gmev'] or also using is_array() to check that $_POST['gmev'] is actually an array. another technique sometimes used is to suppress the error in cases when you need speed AND you know the error is of no consequence: if (@in_array('September 9th', @$_POST['gmev'])) { // bla } notice 2 @ signs. the first suppresses the warning about possible in correct 2nd param to in_array() the second will suppress the notice if $_POST['gmev'] is not set. be very wary of the @ sign - don't use it lightly, most always using isset() in combination with a is_*() function is much much better (and more correct. also check out the ctype functions: http://php.net/ctype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] making checkbox's and radio buttons sticky
[EMAIL PROTECTED] wrote: Sorry, I will be out of the office until Monday 15th August. phil is risking being out of the office permanently ;-) Kind regards, Phil Ewington. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] one more mysql question
John Nichel wrote: Sebastian wrote: while were not on the subject John I have a question about your wife ... oh shit wrong list ;-) no no I meant to ask about sand - how do I make a CPU using the stuff? take what other say with a grain of salt.. im sure you're using php to pull info from mysql anyway.. And he might be using Apache on Linux like the majority of PHP users. More than likely outputting some HTML and maybe some JavaScript. Probably using a PC too. So what? the fact is without mysql php would be nowhere where it is today.. its like peanut butter w/o the jelly.. The fact is, without IBM, PHP would be nowhere it is today. Say, here's an idea, let's just make this the "IBM and anything which relates to it" list. see my reply in the other email.. im sure it will work for you. I'll be sure to tell everyone on the MySQL list that they can shut it down, since you have it covered over here. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
Jochem Maas wrote: if you haven't seen it yet and are interested in the future of php you might be interested in the _big_ thread on php-internals that starts with the message: http://www.manucorp.com/archives/internals/200508/msg00398.php IMHO every halfbaked php coder should read it ;-) to cut it short for those to busy, or what not, Rasmus offered his his vision of php6 (which seems will be the version that will first bring the awesome unicode [and date?] functionality to the masses - hey thats us! :-) ) and there seems to be pretty much unanimous agreement on his main points (lots of discussion on more issues/ideas other people have brung up in response) the future's bright, the future is green. why php6 and not php5? look how long it took to get to php4 (with php5 just starting to rolling out) and people are already talking about php6? sure it is just a 'versioning' thing, but right now huge numbers of php users aren't using php5 (including me) on production environments, let alone start talking about php 6. anyway, i think i will be with php4 for a long time to come. kinda of how apache2 hasn't been a real success over apache1. i just hope php doesn't end up being bloat-filled with the not-so-useful thing just taking up resources. i only been coding in php for a couple(3) years so maybe i have no idea what im talking about. maybe a 'php-lite' version ;) -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, MS Access & Transactions
Hi, folks. I have the unfortunate task of writing a PHP front-end for a client-server application that is back-ended in MS Access. I've tried using the transaction functionality in ADOdb (PHP implementation of ADO) but it doesn't work seem to work correctly, even though it says it does. If I intentionally submit a malformed query as part of a series of inserts, the ADOdb transaction supposedly rolls back, but when I look at the database, the inserts carried out before the error occurs are still there. Does anyone know if it's possible to use transactions with Access via PHP? Cheers and TIA, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP User Group in San Francisco
Are there any PHP user groups currently meeting in San Francisco? Johan Martin Catenare LLC 534 Pacific Ave San Francisco, CA. 94133 Phone: (415) 834-9802 Fax: (415) 294-4495 http://www.catenare.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] wrapping text
Folks are complaining mail arrives and text will not wrap. $message comes directly from a textarea. Old mail readers, I guess? How can I make their life better and make the text wrap? mail("[EMAIL PROTECTED]", stripslashes($subject), stripslashes($message), "Return-Path: <[EMAIL PROTECTED]>\r\nFrom: \"[foo] foo\" <[EMAIL PROTECTED]>\r\nbcc: $bcc \r\nReply-To: [EMAIL PROTECTED] \r\n"."X-Mailer: PHP/" . phpversion()); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Large forms to Mysql table...
Hello, I have a html page with 70+ form fields some like 40 fields are only used for entering quantity numbers… Is it a good idea to put this 50 fields of the form fields into a single text mysql field? Somehow process it with php before, put inside of some kind of xml structure? Just don’t want to do Mysql table with 70 fields… Thanks, Andras Kende http://www.kende.com -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 0.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005
Re: [PHP] wrapping text
John Taylor-Johnston wrote: Folks are complaining mail arrives and text will not wrap. $message comes directly from a textarea. Old mail readers, I guess? How can I make their life better and make the text wrap? http://www.php.net/wordwrap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: wrapping text
* John Taylor-Johnston <[EMAIL PROTECTED]>: > Folks are complaining mail arrives and text will not wrap. $message > comes directly from a textarea. Old mail readers, I guess? Not necessarily old. Many of us use text-based mail readers, where tradition and usability dictate line lengths of 72-80 characters. Also, many mail user agents render text/plain without wrapping lines (or make line wrapping optional). > How can I make their life better and make the text wrap? Yep. Investigate http://php.net/wordwrap: > mail("[EMAIL PROTECTED]", stripslashes($subject), stripslashes($message), > "Return-Path: <[EMAIL PROTECTED]>\r\nFrom: \"[foo] foo\" <[EMAIL > PROTECTED]>\r\nbcc: > $bcc \r\nReply-To: [EMAIL PROTECTED] \r\n"."X-Mailer: PHP/" . phpversion()); Make "stripslashes($message)" into "wordwrap(stripslashes($message), 72)". -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
* Sebastian <[EMAIL PROTECTED]> : > Jochem Maas wrote: > > if you haven't seen it yet and are interested in the future > > of php you might be interested in the _big_ thread on php-internals > > that starts with the message: > > > > http://www.manucorp.com/archives/internals/200508/msg00398.php > > > > IMHO every halfbaked php coder should read it ;-) > > > > to cut it short for those to busy, or what not, Rasmus offered his > > his vision of php6 (which seems will be the version that will first > > bring the awesome unicode [and date?] functionality to the masses > > - hey thats us! :-) ) and there seems to be pretty much unanimous > > agreement on his main points (lots of discussion on more issues/ideas > > other people have brung up in response) > > > > the future's bright, the future is green. > > why php6 and not php5? look how long it took to get to php4 (with php5 > just starting to rolling out) and people are already talking about php6? My observation was that more people jumped to PHP4 from PHP3 than have so far from PHP4 to PHP5. And PHP5 has hardly just started to roll out; the official 5.0.0 release was over a year ago. > sure it is just a 'versioning' thing, but right now huge numbers of php > users aren't using php5 (including me) on production environments, let > alone start talking about php 6. And why aren't you using PHP5? Is there any specific reason? Is it because your service provider doesn't offer it? If so, ask them why -- and report it here. As soon as PHP5 hit stable, I started using it, and I've never looked back. Performance is better, and there are many features -- exceptions, the new OOP model, autoload, iterators, etc. -- that simply have no analogs in PHP4. > anyway, i think i will be with php4 for a long time to come. Please tell the list why -- what does PHP4 offer over PHP5 for you? I honestly want to know, and I'm sure there are others who would be interested to see why people are not making the switch. > kinda of how apache2 hasn't been a real success over apache1. That's a completely different story. Apache2's internal structure adds thread support, and since many loadable modules are not necessarily threadsafe, using them with Apache2 often negatively impact performance (PHP, for instance, must be run non-threaded because many of the libraries against which it links are not threadsafe -- and thus running PHP on Apache2 is much less efficient than on Apache1). The differences between PHP4 and PH5 are much more trivial, and those people who choose to use the features of PHP5 are not going to lose performance or functionality -- actually, quite the opposite. > i just hope php doesn't end up being bloat-filled with the not-so-useful > thing just taking up resources. I think one of the things I like most about PHP is that you can easily compile it with *only* the features you need -- it only needs as much bloat as you need to use it. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
On Sat, 2005-08-13 at 23:51, Matthew Weier O'Phinney wrote: > * Sebastian <[EMAIL PROTECTED]> : > > Jochem Maas wrote: > > > if you haven't seen it yet and are interested in the future > > > of php you might be interested in the _big_ thread on php-internals > > > that starts with the message: > > > > > > http://www.manucorp.com/archives/internals/200508/msg00398.php > > > > > > IMHO every halfbaked php coder should read it ;-) > > > > > > to cut it short for those to busy, or what not, Rasmus offered his > > > his vision of php6 (which seems will be the version that will first > > > bring the awesome unicode [and date?] functionality to the masses > > > - hey thats us! :-) ) and there seems to be pretty much unanimous > > > agreement on his main points (lots of discussion on more issues/ideas > > > other people have brung up in response) > > > > > > the future's bright, the future is green. > > > > why php6 and not php5? look how long it took to get to php4 (with php5 > > just starting to rolling out) and people are already talking about php6? > > My observation was that more people jumped to PHP4 from PHP3 than have > so far from PHP4 to PHP5. And PHP5 has hardly just started to roll out; > the official 5.0.0 release was over a year ago. > > > sure it is just a 'versioning' thing, but right now huge numbers of php > > users aren't using php5 (including me) on production environments, let > > alone start talking about php 6. > > And why aren't you using PHP5? Is there any specific reason? Is it > because your service provider doesn't offer it? If so, ask them why -- > and report it here. As soon as PHP5 hit stable, I started using it, and > I've never looked back. Performance is better, and there are many > features -- exceptions, the new OOP model, autoload, iterators, etc. -- > that simply have no analogs in PHP4. > > > anyway, i think i will be with php4 for a long time to come. > > Please tell the list why -- what does PHP4 offer over PHP5 for you? I > honestly want to know, and I'm sure there are others who would be > interested to see why people are not making the switch. While I've dabbled with PHP5 and made my framework compatible with it I haven't bothered to make a wholehearted leap into it. The following reasons basicly sum up why, and are probably common amongst those that aren't leaping into PHP5. - Better the devil you know than the devil you don't. Many PHP developers have spent years using PHP4 and know it inside and out and have come to terms with all of it's deficiencies... as few as those may be once you learn how to adapt to them. - A multitude of code already exists that is known to work under PHP4 but can be expected to have quirks when run under PHP5. - Much of the code written in PHP4 works without the new features of PHP5 and so there's no compelling reason to invest time and resources for 0 ROI other than compatibility with PHP5. - PHP5 had a large focus on bringing missing OOP features to PHP that have little merit to those who write mostly procedural code. - Accelerators for PHP5 are not particularly good at this time, so unless you've got cash to shell out to Zend (which can be expensive for the little guy) then why move from your trusty PHP4 accelerators that already get the job done satisfactorily. I'm sure there's more reasons I just haven't bothered to think long enough about. These ones just came to the top of my head :) BTW I have no problem with the fact Zend charges for their accelerator, they are a business after all, I'm just arguing the case for those of limited resources. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
On 8/13/05 5:31 PM, "Jochem Maas" <[EMAIL PROTECTED]> wrote: > if you haven't seen it yet and are interested in the future > of php you might be interested in the _big_ thread on php-internals > that starts with the message: > > http://www.manucorp.com/archives/internals/200508/msg00398.php > Maybe even on a website that handles threads a bit more gracefully :) http://groups-beta.google.com/group/mailing.www.php-dev/browse_frm/thread/26 8910860a3f8255/37654d19dafac8a9?lnk=st&q=rasmus+lerdorf+6.0&rnum=1&hl=en#376 54d19dafac8a9 Or http://beeblex.com/lists/index.php/php.internals/17883 http://beeblex.com/lists/thread.php/363786 (RSS 2.0) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array varible problems
On Aug 13, 2005, at 8:35 AM, [EMAIL PROTECTED] wrote: for($i=1;$i<5;$i++) This means: * Start with $i = 1 * End loop if $i is less than 5 * Increment $i each time around So your loop is ending at the first check because $i is less than 5. You want $i > 4 instead, I think. -dan { } Only display the result of zero array, eg : f1[0] f2[0] f3[0] f4[0] So, how to write the source (Web page - when user click the submit button) by using loop ? -- Hey, did you hear? They took "gullible" out of the dictionary! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'God' has spoken... :-)
Matthew Weier O'Phinney wrote: * Sebastian <[EMAIL PROTECTED]> : why php6 and not php5? look how long it took to get to php4 (with php5 just starting to rolling out) and people are already talking about php6? My observation was that more people jumped to PHP4 from PHP3 than have so far from PHP4 to PHP5. And PHP5 has hardly just started to roll out; the official 5.0.0 release was over a year ago. sure it is just a 'versioning' thing, but right now huge numbers of php users aren't using php5 (including me) on production environments, let alone start talking about php 6. And why aren't you using PHP5? Is there any specific reason? Is it because your service provider doesn't offer it? If so, ask them why -- and report it here. As soon as PHP5 hit stable, I started using it, and I've never looked back. Performance is better, and there are many features -- exceptions, the new OOP model, autoload, iterators, etc. -- that simply have no analogs in PHP4. anyway, i think i will be with php4 for a long time to come. Please tell the list why -- what does PHP4 offer over PHP5 for you? I honestly want to know, and I'm sure there are others who would be interested to see why people are not making the switch i spent hundreds of hours building my site on php4, im not about to rewrite any of it to make it 'compatible' with php5. maybe my impressions of php5 are wrong, but last i heard apps built on php4 may or may not work right under php5 - meaning you would have to rewrite code. am i wrong? so i am 'afraid' of going with php5 in fear it will break my website. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array varible problems
Dan Lowe wrote: for($i=1;$i<5;$i++) This means: * Start with $i = 1 * End loop if $i is less than 5 * Increment $i each time around So your loop is ending at the first check because $i is less than 5. You want $i > 4 instead, I think. Umm, no, I don't think so... Your second point is wrong. The second part of a "for" statement indicates a statement that *must be true for the loop to continue*. I think you need to read this: http://www.php.net/for "In the beginning of each iteration, expr2 is evaluated. If it evaluates to TRUE, the loop continues and the nested statement(s) are executed. If it evaluates to FALSE, the execution of the loop ends." Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] one more mysql question
Hey! Stop it! I put a question on wrong place. I was "nailed" for it by John. I accepted I was wrong. I apologized. What do you want now? Sebastian wanted to help – in difference to you and John. Even it’s “wrong place”. I guess you would never stop and help to car in trouble on highway because you are IT or “it’s not your department”, ha? C’mon… It’s really not place to be sarcastic… -afan Jochem Maas wrote: John Nichel wrote: Sebastian wrote: while were not on the subject John I have a question about your wife ... oh shit wrong list ;-) no no I meant to ask about sand - how do I make a CPU using the stuff? take what other say with a grain of salt.. im sure you're using php to pull info from mysql anyway.. And he might be using Apache on Linux like the majority of PHP users. More than likely outputting some HTML and maybe some JavaScript. Probably using a PC too. So what? the fact is without mysql php would be nowhere where it is today.. its like peanut butter w/o the jelly.. The fact is, without IBM, PHP would be nowhere it is today. Say, here's an idea, let's just make this the "IBM and anything which relates to it" list. see my reply in the other email.. im sure it will work for you. I'll be sure to tell everyone on the MySQL list that they can shut it down, since you have it covered over here. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] one more mysql question
they are just grumpy old men i guess.. it is not like you asked a windows question on a linux list.. i've seen stupid html questions here.. yet they get answered. i always try to help when i can and if i cant offer help i dont say anything because that wasnt the way i was raised. it is rude. at least if it was too "offtopic" for the list someone could of just nicely said "ask on the mysql list" but that wasn't case. anyway, consider this a done deal as you already received help. [EMAIL PROTECTED] wrote: Hey! Stop it! I put a question on wrong place. I was "nailed" for it by John. I accepted I was wrong. I apologized. What do you want now? Sebastian wanted to help – in difference to you and John. Even it’s “wrong place”. I guess you would never stop and help to car in trouble on highway because you are IT or “it’s not your department”, ha? C’mon… It’s really not place to be sarcastic… -afan Jochem Maas wrote: John Nichel wrote: Sebastian wrote: while were not on the subject John I have a question about your wife ... oh shit wrong list ;-) no no I meant to ask about sand - how do I make a CPU using the stuff? take what other say with a grain of salt.. im sure you're using php to pull info from mysql anyway.. And he might be using Apache on Linux like the majority of PHP users. More than likely outputting some HTML and maybe some JavaScript. Probably using a PC too. So what? the fact is without mysql php would be nowhere where it is today.. its like peanut butter w/o the jelly.. The fact is, without IBM, PHP would be nowhere it is today. Say, here's an idea, let's just make this the "IBM and anything which relates to it" list. see my reply in the other email.. im sure it will work for you. I'll be sure to tell everyone on the MySQL list that they can shut it down, since you have it covered over here. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP without php.ini
Bagus Nugroho wrote: I was uncomment php_mysql.dll and added php_mysqli.dll, put edited php.ini as recommended, also added libmysql.dll on c:\winnt\system32. But it still doesn't work, it still generate "cannot load mysql extension, ...". Previously, I was edit system variables(edit Path variable by add ;c:\php;c:\php\ext and add PHPRC > value c:\php), also edit Registry as the following : [HKLM\SOFTWARE\PHP] "IniFilePath"="C:\PHP" PHP installed on C:\PHP Apache 2.0 on C:\Program Files\Apache Group\ ... MySQL on C:\Program Files\MySQL I hope, someone can help me to solve the problem before I'm return back to PHP4. Did you add the following line to your Apache configuration? # configure the path to php.ini PHPIniDir "C:/php" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: wrapping text
>"wordwrap(stripslashes($message), 72)". Thanks! Another reason why I gave up on Perl :) A fucntion made already since 4.0.2.! :) Matthew Weier O'Phinney wrote: Folks are complaining mail arrives and text will not wrap. $message comes directly from a textarea. Old mail readers, I guess? Yep. Investigate http://php.net/wordwrap: mail("[EMAIL PROTECTED]", stripslashes($subject), stripslashes($message), "Return-Path: <[EMAIL PROTECTED]>\r\nFrom: \"[foo] foo\" <[EMAIL PROTECTED]>\r\nbcc: $bcc \r\nReply-To: [EMAIL PROTECTED] \r\n"."X-Mailer: PHP/" . phpversion()); Make "stripslashes($message)" into "wordwrap(stripslashes($message), 72)". -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php