Re: [PHP] getting mysql dump using php
Hello, ...seems like Rich is not available yet so let me try :) "See Kok Boon" <[EMAIL PROTECTED]> wrote: > hi Rich, > > yes think i need more info to the "mysqldump utility". i suppose you mean > there is in fact this utility? Well, most probably you'll be able to find it inside your mysql/bin directory. Check the manual for more info: http://www.mysql.com/doc/en/mysqldump.html And of course you can google for some related info ;) http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=mysqldump HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Secureing PHP.
Hello, "Steven Adams" <[EMAIL PROTECTED]> wrote: > Hi, > I am looking to secure my php install, like the settings in php.ini etc. > > I am using apache 1.3.27 and running latest php. > > Is there like a tut or something that can take u thought the php.ini and > explain ina little more detail? > > safe_mode = Off > > is that a bad idea or should i leave it on.. I suggest you leave it on. (Never really had any reason myself to turn it on.) More info in the manual: http://www.php.net/manual/en/features.safe-mode.php - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] does //commenting reduce performance?
Hello, "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote: > As PHP is an interpreter it needs to scan every line and every token of > code as it runs it. Thus said, of course using comments takes more time to > execute than having no comments. > > I have no profiling yet how much having comments or blank lines would > actually effect execution times, but I doubt it would be really an issue > since PHP, once a comment start is encountered, doesn't parse the text but > just scans for the end-comment tag. That said, it's reasonable to think that // // I // have // long // comments // that // extends // hundreds, // if not, // thousands // of lines. // Just kidding! :) // would be faster (unnoticeable it may be) than /* - I have long comments that extends hundreds, if not, thousands of lines. Just kidding! :) - */ Anyway, it's *always* better to have comments than nothing at all... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upgrade issues
Hello, "Chris Knipe" <[EMAIL PROTECTED]> wrote: > Lo all, > > I upgraded from PHP 4.2.1 to 4.2.2, and now all of a sudden the following > code is generating a WARNING??? > > > if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) { > $modpath = "themes/$ThemeSel/"; > } > > I don't get it? > > Warning: Unable to access themes/DeepBlue/modules/News/index.php in > /usr/local/www/v-webs/games.savage.za.org/html/index.php on line 46 > > Line 46 is the if statement If you have using a new php.ini file, perhaps you can compare it with an old one and see if there's anything different--might give you a hint. Or, you might want to check the manual about error reporting and see what you can do about it: http://www.php.net/manual/en/function.error-reporting.php But then again, perhaps the problem is somewhere else... (i.e. file is not there, permissions, etc.) HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Send multiple SQL staments in one query
Hello, "Seth Remington" <[EMAIL PROTECTED]> wrote: [snip] > Here's a function that I use to run multiple SQL statements at once - [/snip] ...perhaps, a better way to put it is "run multiple SQL statements" _one after another_ :) It's a good approach though. ;) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send multiple SQL staments in one query
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: [snip] > No, can't do it. Only one query per mysql_query() call. Not sure with other > database interfaces, but it should be the same. [/snip] Yes, you cannot do it in MySQL. But you can do it with others. (I think it was discussed before--about "sql injection" or something...) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: image generation with PHP
Hello, Myrage wrote: > No luck > I have installed GD lib and zlib and all into c:\php\extensions bur i > still > get an error > > *Fatal error*: Call to undefined function: imagecreate() in > *c:\inetpub\wwwroot\image.php* on line *24* Run phpinfo() and check again (under GD). See if you can find some hints... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending POST vars to pop-up window - How?
Hello, "Monty" <[EMAIL PROTECTED]> wrote: > I'm writing a poll app. I want it to work this way: > > 1. On web page, user selects choice, clicks VOTE. > > 2. Clicking VOTE triggers a pop-up window. > > 3. PHP script running in pop-up records vote, displays results. > > Problem is, POSTed vars that come from forms aren't available in the popup > window if I make the FORM action = javascript:popWin('/poll.php'). > > Is setting the vote choice in a session var the only way to make this work, > or is there a way to pass vars via a form POST to the popup window? I think one way you can try is to use JavaScript's onClick() with submit.form. There was a discussion on a similar subject ("passing js values to php") not long time ago. Maybe you can check the archives... But, what if JavaScript is turned off? - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Connection string and Monday Morning blues
Hello, There could be a lot of problems here but what *exactly* is the problem? No more coffee, perhaps? :) Post the error, if there's any. Or, take away the "@" sign and see what happens... - E "Paul Dionne" <[EMAIL PROTECTED]> wrote: > Ug, I hate Mondays. must drink more coffee. > > Anyway, got a problem I hope someone can help with or at least jumpstart my > brain. > > I wrote a few web pages, work fine on my machine. Uploaded them on Friday > and they don't seem to work. Looks like I am not connecting to the > database because every page I look at seems to end when it is suppose to > connect. > > //** > function ConnOpen($CheckForError) > { > > > > @ $db = mysql_pconnect("webserver", "username", "password"); > if (!$db) > { > $CheckForError= "Error: Could not connect to database. Ple > ase try again later."; > return $CheckForError; > exit; > } > mysql_select_db("database"); > > > > } > //** > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux Question
Just to add... Here's something that might interest you: http://www.alistapart.com/stories/alternate/ ... and here's another one: (Should be better than the one discussed above :) ) http://www.alistapart.com/stories/phpswitch/ - E "Marek Kilimajer" <[EMAIL PROTECTED]> wrote: > You might solve this by providing different style sheet to on linux > running browsers: > if(ereg('Linux',$_SERVER['HTTP_USER_AGENT'])) { > echo ''; > } else { > echo ''; > } > > > conbud wrote: > > >Hey. This really isnt a PHP question. but what fonts do you reccomend using > >so they look decent on linux. Mainly looking for a good font that will look > >nice in MoZilla and Galeon. Almost all the fonts Ive used so far appear > >really tiny or really bold and not very good to read. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browser going to page twice?
Hello, "Leif K-Brooks" <[EMAIL PROTECTED]> wrote: > I'm having a weird problem. I guess so. I don't understand what it is :) > When I submit a form on my site, it often > sends twice. Sends what twice? > I'm not sure if this is a client-side or server-side > problem, but it doesn't happen on other sites. Which sites? > Is this a common > problem, or am I making some dumb mistake? I'm not sure :) But perhaps you can post some code or something... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sorting parsed XML
Hello, "Chris" <[EMAIL PROTECTED]> wrote: > I'm trying to write PHP code that will not only parse the XML but also > allow me to sort the parsed information by the values parsed. I'm not sure if I really understand but let me try... ...[snip code]... Adding echo ''; before this and > $xml_parser = xml_parser_create(); ...[snip code]... after this > xml_parser_free($xml_parser); echo ''; shows a good view that you have a table with two columns. If you'd like to sort these, then I think you might be able to do something like this: 1. Instead of printf()'ing your 's or 's inside the class/function, why don't you try "putting" it inside an array? (Maybe with array_push() or something.) Then, 2. If you already have an array, perhaps you can use one of the functions here for sorting: http://www.php.net/manual/en/ref.array.php HTH, - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upgrade issues
"Chris Knipe" <[EMAIL PROTECTED]> wrote: > > > if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) { > > > $modpath = "themes/$ThemeSel/"; > > > } > > > > > > I don't get it? > > > > > > Warning: Unable to access themes/DeepBlue/modules/News/index.php in > > > /usr/local/www/v-webs/games.savage.za.org/html/index.php on line 46 > > > > > > Line 46 is the if statement > > > > If you have using a new php.ini file, perhaps you can compare it with an > old > > one and see if there's anything different--might give you a hint. > > Yeah, and no. It's FreeBSD-Ports, my php.ini is unchanged. FreeBSD > installs the new / updated ini files as ini-dist, so hence, nothing on my > settings has changed. I did also check to verify this, and it is indeed the > correct ini file, with the correct settings... > > > But then again, perhaps the problem is somewhere else... (i.e. file is not > > there, permissions, etc.) > > Yes the file does not exist. But isn't that why file_exists() is there? Right, I might be typing faster than I am thinking... :) Still, just make sure that PHP is using the php.ini file that you think it's using. The file that _you_ check didn't change but _php_ might be looking somewhere else... Of course, I could be wrong--haven't used FreeBSD/Ports--only linux. Perhaps, somebody else knows the answer... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to obtain unique XML Elements
Hello, "David Pratt" <[EMAIL PROTECTED]> wrote: > Anyone have a simple technique for obtaining a unique list of elements from > an XML file? > > Am looking for something that will identify the first opening tag ie > and the single tag so that I get an array of tags > that I can print out. Having a bit of trouble with regex to get something > to work. > > Basic idea I had is to open file, read through each line with regex, add > matches to array, and then do unique elements of array and write to another > file. > > Is there a better way? Yes. Have you checked the manual? :) http://www.php.net/manual/en/ref.xml.php - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql -> xml
Hello, "Snijders, Mark" <[EMAIL PROTECTED]> wrote: > hello, > > For connection data between my site, and another site, I need to export my > MySql data to a XML file. > > Does anybody know any excisting scripts for this? so I don't have to make it > all myself? Have you checked the latest version of phpMyAdmin? You can export to XML--check how it works :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sorting parsed XML
"Geoff Hankerson" <[EMAIL PROTECTED]> wrote: > This seems to me to be more easily handled by XSLT. (Not the only option > but a good one). > XSLT lets you select only the nodes you want and also sort them as well. Perhaps... but not all browsers support it. Anyway, you can also select the nodes in PHP and you can sort them as well. And you can do more than that... ;) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sorting parsed XML
"Geoff Hankerson" <[EMAIL PROTECTED]> wrote: > You don't need to do client-side transformation (although you could > check user agent and do it client-side if the browser supports it). > You can use Php's XSLT functions see the manual for more info. > > I was just suggesting this as a potential option. It may not be > appropriate in this situation. I don't really know enough about the > programming challenge we are looking at to say for sure I see. I thought you were saying that use XSLT and access the xml file directly--my apologies. Anyway, _that_ is certainly a potential option... :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using mbstring without having /configure'd it
Hello, (B (B"Oliver Spiesshofer" <[EMAIL PROTECTED]> wrote: (B (B> Hi, (B> (B> Is it possible to use mbstring after setting the necessary values in (B> ini_set() or htaccess without having it enabled during /configure? (B (BNo. (B (BWell, if you're using windoze, you can probably just do it in your php.ini (Bbut it seems like you're not, so... (B (BAnyway, (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: & in Query String
Hello, "Jonathan Rosenberg (Tabby's Place)" <[EMAIL PROTECTED]> wrote: [snip] > I'm missing something here. If you use '&' to separate arguments on the > query string, how do they get separated out for access via $_GET? [/snip] Don't worry about it, just try it :) Anyway, the link that has & would be translated to &. (The browser should take care of this since it's the proper way to do it anyway...) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple page form
"Chris Boget" <[EMAIL PROTECTED]> wrote: > > So, you are using a database to store the records? > > Yes. What's the point in taking the user's information if you aren't > going to store it somewhere. Even if all you need to do is email > the data upon completion of the form, storing the data for later use > would be a good idea. Not always. Are your users aware of this? Just wondering... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php bugs (Chinese word display problem)-help
Hello, "Tom Culpepper" <[EMAIL PROTECTED]> wrote: > I am not positive of the problem as I can not see your code, but if you > want to display the words that end in '5C' the you can do them like so: > \(escape character) like this: \(95 5C 5C) Putting a space (or some other character) after the character in question is actually a good "workaround"--though not really a solution :( Anyway, this kind of problem also exist with Chinese characters used in Japanese (sjis encoding). There could be various ways to handle this but here are some: 1. Try using a different encoding. Like utf-8 or some other Chinese encoding. (In Japanese, you can use euc instead of sjis.) 2. Creating your own addslashes function for "escaping". These are basically from the Japanese ML: (It's, of course, in Japanese.) http://ns1.php.gr.jp/pipermail/php-users/2001-August/001641.html By the way Samuel, there's a patched version of php that I've mention here: http://marc.theaimsgroup.com/?l=php-general&m=103781121614978&w=2 The patched version corrected some problems having to do with multi-byte strings so it might just work for Chinese as well. There were also some other info in the site I mentioned above but I'm afraid they're all in Japanese so... Anyway, I justed to post some ideas that might help. Also, please make sure to check the manual about multibyte strings-- http://www.php.net/manual/en/ref.mbstring.php - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: & in Query String
Hello, "Chris Shiflett" <[EMAIL PROTECTED]> wrote: [snip] > Does it not work for you? [/snip] It does, just like I said earlier :) Anyway, I just wanted to add that not only in IE6 but even in NN4 or N7 (also in linux) it works perfectly fine. - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] printing array
Hello, "empty" <[EMAIL PROTECTED]> wrote: > Hi > $stra=("aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll"); > $splited = array(); > $splited = split(",",$stra); > $c=count($splited); > for($i=0 ; $i<$c ; $i+=2){ > echo "$splited[$i]"; > echo "$splited[$i+1]"; // *error is here > > //Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in D:\sites\c\htemp.php on line 12 > echo "" > } > ?> > > I want to see on the screen is that > aabb > ccdd > eeff > gghh > iijj > kkll > > but the code above says wrong :( Try incrementing $i outside: for($i=0 ; $i<$c ; $i++){ echo "$splited[$i]"; $i++; echo "$splited[$i]"; echo ""; } HTH, - E PS BTW, notice the $i++ on the top as well. And also, the semi-colon after ""--you'll get a "parse error" again :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IIS 5
Hello, "Chris Edwards" <[EMAIL PROTECTED]> wrote: > I'm getting "You are not authorized to view this page" when trying to run > .php files. You mean plain html files work fine? > How do I fix this? I'm running php isapi on iis 5 on w2k > server. How did you configure it? Anyway, it sounds like a permission problem so try checking whether your server (or the user running as the server) is allowed to read files and traverse directories that you're trying to access. Just some ideas, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP --with-dbm enabled???
Hello, (B (B"Vernon" <[EMAIL PROTECTED]> wrote in message (B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... (B> I'm being told that I need to have php compiled --with-dbm and it is not, (B> but it is complied --with-db3. Is that the same thing or do I need (B> recopile --with-dbm to use the dbmopen() function? (B (BI think you can find the answer here: (B (B http://www.php.net/manual/en/ref.dba.php (B (B- E (B (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Validating get and post data
Hello, "Matt" <[EMAIL PROTECTED]> wrote: > I think what's happening here is a type issue. The comparison is returning a > boolean, so when $c != '0', the switch is true and the case is resolving to > true, and executing. But when $c == '0', with switch is (false), but the > case is true. Change the case to > ($c > chr(58) and $c < chr(58)): > pass in '09090' and see what you get. Perhaps the case isn't the right > structure for this test. I think you're in the right track. Running these would produce different results: -- script 1 -- $s = '0'; switch ($s){ case ($s > chr(47) && $s < chr(58)): echo 'Yehey!'; break; default: echo 'Boo!'; } -- script 2 -- $s = 0; switch ($s){ case ($s > chr(47) && $s < chr(58)): echo 'Yehey!'; break; default: echo 'Boo!'; } BTW, there's no problem if you use "if...else" clause... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Validating get and post data
"John W. Holmes" <[EMAIL PROTECTED]> wrote: > I think the problem is just the incorrect use of a switch. If you change > your code to > > switch(1) Or, switch(true) for that matter... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script not working from one computer
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: [snip] > So, I'm sure it's not the PHP script, so I'm looking for ideas of what I > should check, settings wise, on the client computer? Any help is greatly > appreciated. [/snip] Well, "my magic PHP 8-ball says..." Just kidding :) Anyway, here's a long shot: What browser are you using? Encryption is 128bit? If you're using one with 40bit or 56bit(?), I'm sure it won't work against a server with 128bit SSL... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check wheter GD function is working
Hello, <[EMAIL PROTECTED]> wrote: > Hello list, > > how can I check wheter GD-function is working and running? First check phpinfo() and see under "gd" then read more info here: http://www.php.net/manual/en/ref.image.php - E PS: Pls. don't flood the list with same messages... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output of MySQl sorted query to text or Word file.
Hello, <[EMAIL PROTECTED]> wrote: ...[snip]... > What do I need to use to create real linefeeds or new lines when viewing > under windows? Try the manual again and check specifically the "User Contributed Notes"--I'm sure you'll find something :) http://www.php.net/manual/en/function.fputs.php - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output of MySQl sorted query to text or Word file.
Oops... <[EMAIL PROTECTED]> wrote: > success. And I have read through the user contributed notes and havent' > found it there. Sorry 'bout the link earlier. (You could find some hints under file() though...) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problems...
Hello, "Anthony Ritter" <[EMAIL PROTECTED]> wrote: > DL, > I'm not sure I understand. Let me try :) > I had this working a few months ago by changing the php.ini settings to: > > SMTP = localhost ;for win32 only > sendmail_from = [EMAIL PROTECTED] ;for win32 only > > and I was able to run that script on my box and get an e-mail returned to > me. > > Now, I getting a "failed to connect". Strange... (I mean it's strange that it worked before. I don't think that setting would work unless you have your own mail server in your pc.) > Please advise. I think what DL meant was to change "localhost" to (Ex.) smtp.yourdomain.com > I'm using MS OE5. In that case you'll find that info by clicking Tools -> Account -> Mail -> Property then click "Server" and check under SMTP. HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where can I find a new HowTo of compiling php with gd support???
Did you try Google? Keyword: "compiling php with gd support" <[EMAIL PROTECTED]> wrote: > Hi folks, > > a single and simple question : > > Where can I find a new HowTo of compiling php with gd support??? > > Incl Bugtraps? > > Oliver Etzel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] String to an Array
Hello, "Rodrigo de Oliveira Costa" <[EMAIL PROTECTED]> wrote: > Hi guys, I got a string that I need to be transformed into na array of > characters, something like: > > > $str ="im the one trying to do this"; > > //this is the string > > I'd like to get an array that I can access something like $array[0] and > get the value " i ". And this foward. Anyone have any clues on this? You can actually treat $str "like" an array so $str[0] would be "i". If you're after something else, check the archives for more info: http://marc.theaimsgroup.com/?t=100526380400016&r=1&w=2 - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Humour me
Hello, "John Taylor-Johnston" <[EMAIL PROTECTED]> wrote: > Humour me. New server. I'm a little tired. > Where is my php.ini on a red hat server? I took it :) Anyway, Run phpinfo() --should give you a hint... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Allowed memory size exhausted
Hello, "Jeff Schwartz" <[EMAIL PROTECTED]> wrote: > > I have a large amount of data (1,948,280 bytes) that I tried to write out to a file using > > if ($fp = fopen($file,"w")): > > fwrite($fp,$contents,strlen($contents)); > > fclose($fp); > > endif; I'm not sure if I understand this correctly but don't you think you don't need strlen($contents) up there? Also, try fopen($file,"wb"). And here, > and got "Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1948281 bytes)" on the 2nd line. So, I tried to write out smaller portions with: > > if ($fp = fopen($file,"w")): > > $size = 4096; > > while (strlen($contents)){ > > $temp = substr($contents,0,$size); > > fwrite($fp,$temp,$size); > > $contents = substr($contents,$size+1); > > } > > fclose($fp); > > endif; ...doing "$contents = substr($contents,$size+1);" would actually cause you to lose some data. Try this instead: if ($fp = fopen($file,"wb")): // add "b" $size = 4096; while (strlen($contents)){ $temp = substr($contents,0,$size); fwrite($fp,$temp); // remove $size $contents = substr($contents,$size); // remove "+1" } fclose($fp); endif; I didn't test so I'm not sure if it'll work--just some ideas... HTH, - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
Hello, "John W. Holmes" <[EMAIL PROTECTED]> wrote: > Daylight Savings Time? John, I think "Daylight Saving Time" creates a difference of 1 hour and not 1 day :) Anyway, I live in a place where we don't practice this so I could be wrong... ...[snip]... > > Now, what could be causing this problem? IMHO, no matter where you > are in > > the world (or more to the point, what timezone you are in), 1039525200 > > seconds after a certain date (in this case the unix epoch) should be > > another > > certain date, yes? Justin, it depends how you got your "timestamp" in the first place, I think... I could be wrong again here but aren't these different? mktime() gmmktime() - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
But, then again, it could be just because the other server's time is really late... (caused by old motherboard batteries, etc.) - E "@ Edwin" <[EMAIL PROTECTED]> wrote: > Hello, > > "John W. Holmes" <[EMAIL PROTECTED]> wrote: > > > Daylight Savings Time? > > John, I think "Daylight Saving Time" creates a difference of 1 hour and not > 1 day :) > > Anyway, I live in a place where we don't practice this so I could be > wrong... > > ...[snip]... > > > > Now, what could be causing this problem? IMHO, no matter where you > > are in > > > the world (or more to the point, what timezone you are in), 1039525200 > > > seconds after a certain date (in this case the unix epoch) should be > > > another > > > certain date, yes? > > Justin, it depends how you got your "timestamp" in the first place, I > think... > > I could be wrong again here but aren't these different? > > mktime() > gmmktime() > > - E > > ...[snip]... > > -- > 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] date() on two diff. servers
"Justin French" <[EMAIL PROTECTED]> wrote: [snip] > Perhaps strtotime() is NOT running off GMT, [/snip] Bingo! ...or, Bull's eye!, whatever :) Anyway, I think this is "implied" in the manual. http://www.php.net/manual/en/function.strtotime.php Also, check "User Contributed Notes": piran at pobox dot com php at webdevelopers dot cz HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
"Justin French" <[EMAIL PROTECTED]> wrote: > on 09/12/02 3:06 PM, @ Edwin ([EMAIL PROTECTED]) wrote: > > > [snip] > >> Perhaps strtotime() is NOT running off GMT, > > [/snip] > > > > Bingo! > > *GULP*... so, what we're saying is, that if I intend to pass data around on > multiple servers (in different timezones) using a unix timestamp for dates > (which i prefer to do), I should be using gmdate() and gmmktime() rather > than date() and strtotime()? I'm afraid so... > That will sure as hell be a few lines of code to dig through Well... just hope that others chime in and suggest a better solution :) > I'll also need an accurate (and daylight savings compliant!) way of > determining the how far ahead of the GMT the server currently is, or for a > specific timezone for a specific project (eg this current one, which is > basing it's dates on Sydney, Australia. If I understand the problem correctly and if my understanding of the functions are correct, I'm not sure if you'd really need something like this. Consider this: "; echo "GMT Timestamp: $timestamp_gmt"; echo "This script was run on: "; echo "$run_local (DATE with Local Timestamp)"; echo "$run_gmt (GMDATE with GMT Timestamp)"; ?> As you can see, although the timestamps are different, they produce the same results. So, *I think*, using gmdate() and gmmktime() would be enough. (Or, if you insist on using strtotime(), consider the example(s) in the "User Contributed Notes" I mentioned earlier.) I hope this give you some hints. - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
Hello gurus, "Ford, Mike [LSS]" <[EMAIL PROTECTED]> wrote: [snip] > To amplify on this: > ... [/snip] Interesting comments! ...not sure if I understood everything though :( Anyway, for Justin's original problem, I think it'll be solve by "simply" doing two things: 1. Add " GMT" to the end of the string being passed to strtotime(). 2. Use gmdate() instead of date(). Ex. 1039558389 // without it, echo $my_stamp --> 1039525989 $my_stamp = strtotime($my_date); echo "$my_stamp"; echo gmdate('D, d M Y G:i:s', $my_stamp); // Conclusion: Using strtotime() with GMT will create // a timestamp that if used with gmdate() will produce // desired result whichever timezone you run the script. ?> That should work. If not, tell me about it later--I'm more than happy to be corrected. But for now, I'll be taking some rest :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script not working from one computer
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: ...[snip]... > Browser's are the same (128bit). It's not a laptop. > The web page can pull up You mean, the web "browser", right? :) > any other external web page correctly. And, I assume pull up "external web page" means web pages served from the same server where you cannot login? > What gets me is that the computer can pull up the log in page. It can pull > up another, unprotected page from that web server. But, no matter who tries > to log in from that machine, I get a bad username and password, even though > they are right. It's like the browser is sending bad data to a script that > works fine from every other computer. > > Anyone else have any other ideas? Have you tried using another browser and see what happens? - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Theoretical - Device server using PHP - Is this possible?
Hello, "Steve Jackson" <[EMAIL PROTECTED]> wrote: > Hi all, > > I work for a company that manufactures device servers. They currently > have a very low internal memory (about 8MB) which is more than enough > for TCP/IP connections (which BTW we just released the code open source > to anyone interested www.opentcp.org) to devices but I was wondering if > there was any way we could give these device servers more functionality > by somehow using PHP. Obviously the device server itself has nowhere > near enough memory to have PHP installed upon it but it would be > interesting to see if anyone has any ideas or theories about if this is > possible. Not that I can answer you question but I think it is possible to run php (maybe a stripped down version?) with a small amount of memory--there's one that runs on a pda... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help - uploading multiple files
Hello, "Allred, Mark" <[EMAIL PROTECTED]> wrote: > Darn, that's what I was afraid of. > > Is there a way to do this in a client-side language like JavaScript? Javascript? No, I don't think so. (Maybe Java.) But, of course, you can always get a second opinion from a Javascript ML :) - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] run query
Or, "Jon Haworth" <[EMAIL PROTECTED]> wrote: > Hi Diana, > > > After I run a query lik this, > > $db->query($sql); > > > > what is the quickest way to find out how many > > records result? > > Look into mysql_num_rows (or the equivalent if you're not using MySQL) ... you can even do it faster by using a "select count(*) as something from some_table" More info (found in the manual): http://www.faqts.com/knowledge_base/view.phtml/aid/114/fid/12 HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] run query
Oops, ok, I misread the original question :) "Rich Gray" <[EMAIL PROTECTED]> wrote: > Er... but the original poster wanted a count of rows returned by a > particular query... your method just returns the number of rows in the > table... Anyway, you're right. If you already have a result then use mysql_num_rows(). - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: filemtime -help
Hello, (B (B"Mekrand" <[EMAIL PROTECTED]> wrote in message (B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... (B> i have a problem with filemtime function, i want script print out the date (B> of file last modified. (B> here is code, (B> $fp=fopen("ex.txt","r"); (B> echo date("j F Y H:i", filemtime($fp)); (B> fclose($fp); (B (BI guess you have to check the manual again :) (B (BYou don't need fopen() and fclose() here. Just do: (B (B echo date("j F Y H:i", filemtime("ex.txt")); (B (B- E (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fgetcsv Help
Hello, "Justin French" <[EMAIL PROTECTED]> wrote: [snip] > Sample line from your CSV should look like this: > > --- > "1","foo","harry said \"what is it?\"","foo" > "1","bah","\"don't know\" said sally","something" > --- > > When echoing these values to the browser, you would strip the slashes. [/snip] The double quotes aren't really necessary unless 1. You have a comma in the field 2. You have double quotes in the field So, 1,foo,"Harry said ""what is it""",foo would have no problem with fgetcsv(). And, btw, the " are also "escaped" with another ". - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms
Hello, "Chris Hewitt" <[EMAIL PROTECTED]> wrote: [snip] > GET or POST method (I'm not sure whether there is a default). [/snip] GET is the default... should be... I guess... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can PHP do this...?
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: > > OK. I think I understand this, but let me ask just to be sure. > > > > So if I setup in my page something to this effect: > > if ($_SERVER['!HTTPS']) { > > echo "Switching over to SSL..."; > > echo ""; > > } else { > > echo "**Rest of Page**"; > > } > > > > Would this work? I am about to add a secind site to my site using an alias > > in Apache. Example is http://www.mysite.com for first site and > > http://www.mysite.com/2ndsite. Except I want everything for the second > site > > to be https. Make sense? > > if(!isset($_SERVER['HTTPS'])) > { header("Location: https://www.mysite.com/2ndsite";); } > > That should work. Or you could echo the META redirect if you wanted to > display a page, but this should do it transparently. There is probably a way > to do it with just Apache, too, that wouldn't involve PHP. I think there's some useful info here (about doing it with "just Apache"): http://httpd.apache.org/docs-2.0/ssl/ssl_howto.html Just in case... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] socket_set_blocking()
Hello, <[EMAIL PROTECTED]> wrote: > I was not able to get php's ftp functions working for me, they were uploading zero byte files, so I am now attempting to use fsockopen to accomplish the task. > > I found this script: http://www.phpbuilder.com/mail/php-general/2001102/1333.php > > It uses the function: socket_set_blocking(), and php.net says that this is an alias for stream_set_blocking(). What does blocking mode mean? I am not familiar with this concept, can someone explain. > I think it's explained here. (Not sure if it'll help though...) http://www.php.net/manual/en/function.stream-set-blocking.php > As for the issue of socket_set_blocking() being an alias for stream_set_blocking(), why would I not just use stream_set_blocking? > The reason is also found above. (Hint: Because it may not be available in the version of php you are using.) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] loading a different web page ...
Looking for this? http://www.php.net/manual/en/function.header.php - E "Kenn Murrah" <[EMAIL PROTECTED]> wrote: > i know this is an elementary question, but i can't even figure out > what to search for at php.net > > i need php code that, when executed, takes you to a different web > page, i.e. > when browser goes to www.abc.com, he's automatically redirected to > www.xyz.com ... > > thanks in advance for the help. __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system()
Hello, Richard Baskett <[EMAIL PROTECTED]> wrote: > When using the system() function, let's say starting up a program, can > that program start in the background while the rest of the page is > parsed or does it have to wait until the system command has finished > whatever it is doing? You can use the "&" to make it run in the background. Like this: program_to_start & (in linux) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() not working on Win2k
Hello, "Rad Craig" <[EMAIL PROTECTED]> wrote: > yes, I've tried: > > SMTP = localhost > SMTP = 127.0.0.1 > SMTP = mail.mydomain.com > SMTP = internal.ip.address > > None made any difference, so I've set it back to localhost. ...and of course you restarted your web server after each changes? Have you tried another SMTP server? Perhaps, one outside? - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini - changes aren't taking?
..in other words, it's possible that you could be editing/making changes on the *wrong* php.ini file... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] progress page
Hello, [EMAIL PROTECTED] (Edward Peloke) wrote: > I am working on an application that will take data from the user and > run then check through all the data to find matches. Instead of the > user seeing a blank screen while the page is loading, I would like to > pop up a page that says, processing, please wait and maybe have an > icon like a progress bar or something. How do I pop up a page and > have it disappear when the the other page is done loading? You can use javascript + (perhaps) an animated gif that runs left on the browser window. Just don't expect it to work esp. on browsers that has javascript turned off ;) This has been discussed many times--please check the archives... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() not working on Win2k
"Rad Craig" <[EMAIL PROTECTED]> wrote: [snip] > I don't have another outside SMTP server to check it on. Will yahoo > and others like that work for testing this? [/snip] Yes and no. I think this depends on the server. With Yahoo? No, it wouldn't/shouldn't work... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] time stamp screwing up
"- [ Paul Ferrie ] -" <[EMAIL PROTECTED]> wrote: > So > > Is NOW() a mysql function? Well, you can check for yourself ;) It should be somewhere around here: http://www.mysql.com/doc/en/Date_and_time_functions.html - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] string prints out as number (E+10...), why?
Hello, Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: > I'm passing a var into a function which is a 16 digit number, but when I > try to print it out I get 1.111E+15 instead of the expected > 11. > > Why? I guess it's because the number is converted automatically to an exponential notation if it goes over a certain number of digits--makes it easier to read... > How can I change this behaviour? Perhaps, you can use sprintf() http://www.php.net/manual/en/function.sprintf.php HTH, - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] string prints out as number (E+10...), why?
Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: > - Edwin wrote: > > > > I guess it's because the number is converted automatically to an > > exponential notation if it goes over a certain number of digits--makes > > it easier to read... > > I figured as much. But why? I found a solution by changing the precision > of floats in the php.ini file. > > But I still find it strange that PHP will, internally, happily treat my > variable as a string but when it comes time to print it out, it decides > that it's a number and formats it without my asking it to. Mmm, I'm not sure if I understand this correctly but I don't think PHP will "just decide" that your string IS a number and *formats* it. Consider this: '; echo $var2; // echoes ?> As you can see, PHP didn't "touch" the string version... Anyway, I don't think the conversion to an exponential notation is peculiar to PHP--my math teacher required me to do the same :) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make server response to emails
Hello, "See kok Boon" <[EMAIL PROTECTED]> wrote: > Hi experts, Well, I'm no expert ;) so let me just tell you where you can find more info. I think you're looking for something like what PHP's mailing list is using. It's called ezmlm. Pls. check their site: http://www.ezmlm.org/ - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gettext and translations
Hello, "electroteque" <[EMAIL PROTECTED]> wrote: > hi i am just reading up on gettext , it says its for translating messages > , how about translating entire site content ? Mmm, I don't think anything like that exists--at least, not yet. There are or no sites (or software) that can perfectly translate any entire site. And, don't expect anything that would translate your entire encyclopaedia automatically as well... :) > and a question i have been > asked is how authentic is the translations ? Well, for gettext's translations, I believe the translators are real humans (and they're native speakers) so you can expect a high quality translation that serves its purpose... Just MHO, - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] checking status of a HTML checkbox
"Shams" <[EMAIL PROTECTED]> wrote: [snip] > At the moment I am doing this: > > if ( $_POST["insurance"] == "yes" ) > { > } > > But is there a more "accurate" way of checking the exsistence of > "insurance"? [/snip] I think you're looking for isset(): http://www.php.net/manual/en/function.isset.php - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: how to passing two dimension array
Or, "Noel Wade" <[EMAIL PROTECTED]> wrote: > You're missing string concatenation operators. I use "echo" instead of > "print" - but here's how it should look with either: > > echo ""; Try this instead: Just add curly brackets before and after the variable and don't forget the "$" sign. So, this > > print ""; would be like this: print ""; or this: echo ""; - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Column size, user input and htmlspecialchars
Hello, "Jim" <[EMAIL PROTECTED]> wrote: ...[snip]... > How do you guys go about resolving this situation? Well, first, increase the size of your field, say VARCHAR(100) then in your form, use "maxlength" like this: That would prevent them from entering more that 50 characters. (At least, that's how it should work.) But, just to make sure, count the characters entered using strlen() or something before you use htmlspecialchars()... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I use an external 'template' file and still use PHP variables?
"Daevid Vincent" <[EMAIL PROTECTED]> wrote: > I've posted this a few weeks ago with no response. I want to use an > external > "email template" as it were, so that the sales guys can edit it as they > like and simply shuffle the variables around that they need > $username and $password (either with or without the tags). > > I don't want them mucking around in my code and potentially screwing it > up. Not to mention having a huge 'email' text in between those > HTMLMESSAGE markers is ugly as hell and ends up making the color-coding > in HomeSite all kinds of whack at the end of it. > > I tried to use: > > $message = << include("/pathto/customer_email.php"); > HTMLMESSAGE; > > But $message has the literal string > ''include("/pathto/customer_email.php");'' instead of including the > file. Grr.. (wouldn't it make sense that an include() should be parsed > FIRST with the contents put in place basically? This seems like a 'bug' > not a feature. Well, include() will parse the file--maybe you're just doing it the wrong way... ;) I'm not sure how your customer_email.php looks like but consider this: Then in inc.php you have: Running the first script should echo: General PHP, how are you doing? So, as you can see the $name was replaced. Just a simple example... - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] checking status of a HTML checkbox
"Larry Brown" <[EMAIL PROTECTED]> wrote: > Also look at empty(). I don't know if the $_POST array will send the > key if it as no variable. I know on a regular post it does send the > variable, but it has no value. What's a "regular post" anyway? Well, the key is passed even when there's even though the field might be empty. > I have used isset with just receiving post data and got > strange results. On one I had an isset statement that ran a result > that Maybe you can post the code--I'm sure somebody here can fix it... ...[snip]... > then isset may not always work. At least not in my experience--it always served its purpose ;) - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: how to passing two dimension array
"Larry Brown" <[EMAIL PROTECTED]> wrote: > For some reason I was not able to find the original question here. Well, you can always check the archives/thread... > The original question is about inserting the value from a two > dimensional array into a form not passing a two dimensional array from > a php script to a php script right? ??? I don't think I understand this but anyway I was just trying to add to the last thread. The purpose of which is just to show another way to echo... - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HEEELP...please
[EMAIL PROTECTED] wrote: [snip] > Problem is - the only php.ini file is in a work directory for mod_php4 > installation. As far as I know, this file would not be read by apache > or the php module. [/snip] Run phpinfo() and see whether there's a reference to where the php.ini being used resides... Then, edit it accordingly (as somebody already mentioned). HTH, - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pg_connect $B$,;H$($J$$(B
$B$3$s$K$A$O!#(B (B $BNS(B $B7C72(B <[EMAIL PROTECTED]> wrote: (B (B> $B;O$a$^$7$F!#(Blin $B$H?=$7$^$9!#(B (B> (B> php$B$N(Bpg_connect$B$G(BpostgreSQL $B$K@\B3$r;n$_$^$7$?$,!"4X?t$,(B (B> $B8+$D$+$j$^$;$s$H%(%i!<$,=P$F$7$^$$$^$7$?!#F1MM$J8=>]$,Ax(B (B> $B6x$7$?J}$,$$$?$h$&$G$9$,!"4N?4$J2r7hJ}K!$O8+$D$+$j$^$;$s(B (B> $B$G$7$?!#$I$J$?$+$,2r7hJ}K!$r$4B8CN$G$7$?$i!"CN7C$r$*B_$7(B (B> $B$/$@$5$$!#(B (B $B$^$:!"F|K\8l$N(BML$B!J(Bhttp://ns1.php.gr.jp/mailman/listinfo/php-users$B!K(B $B$b$"$j$^$9$N$G!"F|K\8l$G=q$/>l9g$O$=$A$i$N$GJ9$$$?$[$&$,$H;W(B $B$$$^$9!#(B (B $BEj9F$9$kA0$K!"A0$N%a!<%k$r8!:w$7$F$+$iEj9F$7$?$[$&$,$G$9!#$"(B $B$H!"Ej9F$9$k$H$-$K!"4D6-$d%$%s%9%H!<%kJ}K!$J$I$r=q$$$F$/$@$5$$%M!#(B (B $B$G!"http://bb.yahoo.co.jp/ (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] re-populate array keys
Hello, Justin French <[EMAIL PROTECTED]> wrote: > Hi, after asort()ing an array, the numeric keys are obviously > out of order. > what i'd like to do is reset the keys, starting at zero. > > is there a function for this, or do I just walk through the > array with a foreach() and do it manually? So, in other words, after sorting them, you'd like to "change" the keys starting from zero? In that case, I think you can use array_values() ... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
Hello, "Sunfire" <[EMAIL PROTECTED]> wrote: > hi.. > > i have a button on a web page that is supposted to go to > another web page > when either clicked with a mouse or when someone presses enter > on it.. : > > post a prayer > > that is my basic code for the button... my problem is the fact > that when you click the button or hit enter on it all it does > is refresh the page if it even does that. how would i actually > make this button load another page > using php?? Just wondering... why would you need a just to load another page? Aren't links enough? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
Hello "Mr Percival" <[EMAIL PROTECTED]> wrote: > Hi, > > According to the PHP manual session_start always returns true. > > Ther are times (like when there is a disk full error on the > server) that the sesison_start will fail because its unable to > write the session tmp file. > > So shouldnt session_start be able to return false if the file > write fails? > > Or does it return false but the manual doesnt say so? > -- I haven't had any "disk full error" experience so I'm not sure but I think what will happen is just php will crash (complain or return an error in other words because your script will stop) instead of returning "FALSE" which you can check later on... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
"Sunfire" <[EMAIL PROTECTED]> wrote: > actually yes a link would be rather nice for just going to > another page but my client doesnt want a link he is paying for > a button to be there instead of a link.. so if thats what he > wants and pays for i guess wether i agree with it being there > or not i put it there for him.. I see. Well, in that case, you have another option. You can make an image that looks like a "button" and have that image link to the page in question. One advantage is, it would even work with Javascript turned off... ;) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
"Sunfire" <[EMAIL PROTECTED]> wrote: > this is true i guess but he doesnt want an image that looks > like a button he wants a 100% true authentic button that is > depressed when you click it and if the image doesnt move when ? You can make something that can be "depressed" with just images--only you have to use javascript to make it work... > you click on it he will throw a 600% royal fit and none the > less he doesnt really care if people with no java support can > or cant get to his site .. that is more the less their problem > to figure out not mine or his... > > guess you have to make everybody happy somehow when making web > sites and stuff... Sounds like you and you're client are not at all concerned about the *visitors* of your website. Who is going to use the site anyway? I hope you're client understands the term "user-friendly". .. > but i tested a browser with java support turned on and one with > it turned off and from what i could see they both worked with > the button i have (and my client should be very impressed since > the button actually depresses when you click it or hit enter on > it).. Java and javascript are different--please don't confuse the two... try it again and see if it'll work with JAVASCRIPT turned off... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What am i doing wrong? SQL Query in PHP
Hello, "Rahul.Brenda" <[EMAIL PROTECTED]> wrote: > Ok i tried this.. and i didn't get any error listed.. > so it seems that the mySQL Query is not failing in > syntax or logic.. but it's not picking up any rows. > Which is really stupid because i used my phpmyadmin > and i ran this SQL Query there and even then i got my > results.. So, you still have a "blank" page? Check the resulting html source code and see how it looks like. Also, do you have "display_errors = On" in your php.ini? Btw, see if changing this: > > > echo(" $myrow[title] "); to this: echo $myrow["title"]; makes any difference. Just my 2 cents... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying a file
Todd Cary <[EMAIL PROTECTED]> wrote: > OK! This makes sense. What is the syntax to do Hmm, did you read (and try) the article mentioned earlier? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Images out side the wwwroot
"Philip J. Newman" <[EMAIL PROTECTED]> wrote: > If i was to use PHP to call all my images from out side the > wwwroot, dose anyone have a method that they use? By using an absolute path? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] auto_increment $value
Hello, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > Anyone know how to get the auto_increment $value out of a mysql > table. > I'm thinking it is in mysql_fetch_array but don't see how to > get it. What do you exactly mean by "get the auto_increment $value"? Perhaps, you're looking for this? http://www.php.net/manual/en/function.mysql-insert-id.php - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Manual w/ Comments?
Hello, John Nichel <[EMAIL PROTECTED]> wrote: > Wasn't the php manual with user comments available for download > at one time? Is it still there and I'm just not seeing it? If > it was never there, can I suggest that as an option for the > manual download from you good people at PHP? Damn, I'm just > full of questions. If you're on Window$, check the "extended chm" here: http://www.php.net/download-docs.php or here: http://weblabor.hu/php-doc-chm/#download and see if this is what you were looking for... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to force a refresh?
> There is an HTML solution, but I can't remember offhand what it > is. http://where2go.after"; /> ? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to force a refresh?
Or, just: ...if the same page. Note: "1" is the number of seconds... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing appended chars - please help, quite urgent
Hi, "Adriaan Nel" <[EMAIL PROTECTED]> wrote: > Do any1 know how I can check for spaces here, > and remove them if present http://www.php.net/manual/en/function.trim.php ? http://www.php.net/manual/en/function.rtrim.php ? http://www.php.net/manual/en/function.lrim.php ? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/HTML table layout?
Hi, "Bev" <[EMAIL PROTECTED]> wrote: [snip] > I wanted to fixed sized cells and that when I type do not > increase/decrease the surronding cells.Can this be done? [/snip] Try having your with a fixed width as well: Ex. then with your columns: I think you also have to take note of your "cellspacing" and " cellpadding"... (Default is "3", I think.) And, yes, this has nothing to do with PHP ;) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RSS
Hi, "Sebi" <[EMAIL PROTECTED]> wrote: > > Hi, > Does some one know where I can find a RSS parser exmple? I think you can find one here: http://www.google.co.jp/search?q=PHP+RSS+parser&ie=UTF-8&oe=UTF-8&hl= en&lr= ;) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Writing a fileparser
Hi, (B (BAlexander Gruber <[EMAIL PROTECTED]> wrote: (B> Hi together, (B> (B> i$B%((Bm currently working on a php script to read a txt file into a mysql (B> database. but i have several problems i don$B%((Bt know how to fix. (B> the file looks like the following example: (B> (B> category 1 (B> Data1 ::#:: 27 (B> Data2 ::#:: 0 (B> Data3 ::#:: (152) (B> (B> category 2 (B> Data1 ::#:: 2b3 (B> Data2 ::#:: 234 (B> Data3 ::#:: (1) (B> (B> the qeuestion i have is how can i parse each line and use the (B> "category" fields as identifier for the tables, the left side of ::#:: (B> as identifier for the row$B%((Bs and the right side as the data. the (B> problem is collecting the several pieces of data in different (B> variables. (B (BWell, one way you could do this is: (B1. Use file() to read your txt file and the contents into an array. (B2. Loop thru the array using foreach() (B3. While you're looping, check each value, perhaps using strstr(), (B if it has "category" then assign it as identifier. If not, you're (B probably on the row:data line so use explode() to explode the value (B into two parts, using "::#::" as your separator. Assign them again (B accordingly. (B (BThen, after that, you can now do something with the variables... (B (B> perhaps someone can give me some help or a url where i can find some (B> documentation. (B (BCheck the manual for those functions. (B (BNOTE: There must be some other, more elegant, way of doing it but this (Bis just to give you an idea. (B (BHTH, (B (B- E (B (B__ (BDo You Yahoo!? (BYahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http->https->http redirection causes browser to show alert dialog
Hi, Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: [snip] > Is there a way around this? The messages are annoying at best and > probably scary to users ... [/snip] This is a browser issue and is actually a security "feature". Unless the users themselves turn it off, the messages would appear again, and again, and again... Well, just hope I'm wrong :) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Splitting a string
Hi, "Christopher J. Crane" <[EMAIL PROTECTED]> wrote: [snip] > If that number start with a "S", I want to strip it off. [/snip] Why don't you just check whether the first character is an "S" then return only the rest of the string if it is? Like: Of course, there could be some other way... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/HTML table layout?
Chris Hewitt <[EMAIL PROTECTED]> wrote: [snip] > I'd suggest you consider not having fixed width cells. [/snip] Good idea esp. if you can do better without having one. But sometimes, you really just need to have one ;) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Splitting a string
Hi, David Rice <[EMAIL PROTECTED]> wrote: > > $str = "S12345"; > $str1 = ltrim($str,"S"); Good idea but you'd have problem if you have $str = "SS12345"; and you only want to get rid of the first one... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form/text area input problem
Hi, "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> wrote: [snip] > I am just looking for a more efficient way of solving this, can anyone > give me any idea? [/snip] I think you'll save yourself from so much trouble if: 1. You just leave those long text. If they didn't press ENTER, it means that they were typing a looong paragraph, no? 2. Use the nl2br() function to make sure that those parts where they pressed ENTER (a newline), would be turn into . http://www.php.net/manual/en/function.nl2br.php Just my idea... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems (Apache + PHP) and conection to Oracle8i
Hi, "Jaime Villarroel Valdera" <[EMAIL PROTECTED]> wrote: > I have problems to pass HTML content that contains accentuated > characters from a form (editor) to an Oracle9i database ... through > PHP. I'm not sure what you meant exactly by "accentuated" but if you mean single quotes (') then perhaps you can try "escaping" it using another single quote. (You can use str_replace() to replace one single quote character with two.) > It is a problem of character set? Maybe, maybe not. Maybe you need to give more details... > or It is a problem of php?. I don't think so ;) > Somebody knows this situation and how it is possible repair? Probably... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form/text area input problem
"Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> wrote: [snip] > the problem is when I display it it would be a one lined paragraph. > THe page's format is ruin since this is one long line and the user > will have to scroll across to read the paragraph which look pretty bad. > > I hope you know what i am trying to say. [/snip] Hmm, I guess I know what you're trying to say but *that* is NOT the normal behaviour (if I may say). Putting one long paragraph inside tags "should" automagically wrap it... If not, you can probably use CSS to limit the width of your 's (paragraphs) so it wouldn't destroy the "format" of your page. - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/HTML table layout?
I think you meant to send this to the list... :) - E "bev" <[EMAIL PROTECTED]> wrote: > Chris, I took off the "nowrap" (as all that dones is makes same line bigger...) > > I have the table cells defined as 250 pixels etc so thats fixed width but I can still type more into each cell as they keep streching, there must be a way of having fixed pixel based column. > > See below simply example that lets me type over the 100 pixel wide cell, have a look in any editor... > > > > > > > border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FF" width="760"> > > > > > > abcdefghijklmnopqrstuvwxyz01234567890666 c6 > > > > > > > > > > > > > > > > > - Original Message - > From: - Edwin > To: Chris Hewitt > Cc: Bev ; [EMAIL PROTECTED] > Sent: Thursday, March 13, 2003 2:37 PM > Subject: Re: [PHP] PHP/HTML table layout? > > > Chris Hewitt <[EMAIL PROTECTED]> wrote: > > [snip] > > I'd suggest you consider not having fixed width cells. > [/snip] > > Good idea esp. if you can do better without having one. But sometimes, > you really just need to have one ;) > > - E > > __ > Do You Yahoo!? > Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ > > > __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removed the bundled MySQL client library. (Sterling)
On Tue, 1 Jul 2003 23:51:09 -0400 "Vincent Bouret" <[EMAIL PROTECTED]> wrote: > I found this in the ChangeLog of PHP5: Removed the bundled MySQL client > library. (Sterling) > > What does that mean? We can't access MySQL anymore from PHP? > Check this thread: http://marc.theaimsgroup.com/?t=10569918734&r=1&w=2 - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail + regex + somethoughts
Hi, "Shivanischal A" <[EMAIL PROTECTED]> wrote: > Hi friends, > > I was just wondering about this. Whenver we reply to the posts here, we just > click on the reply button and fire off our messages. This results in long > messages (fresh content + earlier content) within a single mail. Now, the > question is how would we use the regex functions to remove the older content > from a fresh mail. I think you all beginning to get the picture. > > What would we do if we want just the responses/comments to an earlier and > not the earlier mail verbatim in the fresh one? Copy -> Paste and/or Highlight -> Delete ? - E - ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql detect
[EMAIL PROTECTED] wrote: > helo all , > > what command in linux , to see default direcktory instalation mysql > database dan mysql library RPMs? $ rpm -ql - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Optional form variables (IDEA?)
Hello, "Miranda, Joel Louie M" <[EMAIL PROTECTED]> wrote: > Hello, im doing a form that when you pass it will generate a preview report. > My problem is some fields are optional the optional fields are 5. And for > those fields I need to make it fit when it generate what idea or codes can > you suggest? > > Ex, a businesscard preview form. When it generates it will show you a > businesscard template. But how about those un-filled fields. > > Can this be done thru if and else statement? > Yes. Try it first. Let us know if (and how) it doesn't work. - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browscap
"Milan Reznicek" <[EMAIL PROTECTED]> wrote: > Hi everybody, > I'm trying to get_browser() function, but everytime I get from my apache > could not open browscap.ini for reading. Does someone know how to correct > it, or is there any other way how to determine users browser type and OS > without using browscap? $_SERVER['HTTP_USER_AGENT'] ? - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail + regex + somethoughts
Hello, "Shivanischal A" <[EMAIL PROTECTED]> wrote: > Hi Edwin, > > Let me restate my question... > > I'm now replying to ur mail. I've left ur message to me untouched. (whatever > follows '- Original Message - '). What i want is that some > SERVER-SIDE SCRIPT should be able to identify these original messages and > remove them before storing the actual responses. Hmm... I'm not really sure if I understand this but... First, NOT all "mail clients" will add this: - Original Message - to the original message. Besides, there are many ways how each individual would quote the original message. So, writing a script that would identify THE original messages would be, IMHO, next to impossible... What is the purpose anyway? - E - ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php