php-general Digest 6 Nov 2007 07:35:19 -0000 Issue 5112

2007-11-05 Thread php-general-digest-help
php-general Digest 6 Nov 2007 07:35:19 - Issue 5112 Topics (messages 264072 through 264092): Re: Can I make a process run in background? 264072 by: Paul Scott Re: Mail function doesn't work 264073 by: Per Jessen 264075 by: Jim Lucas Re: More info on timeout problem

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Jon Westcot
Hi Nathan: No, I'm not familiar with Ajax. Where can I read up on it? More important, how can I find out if Ajax is implemented on the server? Or is it something I can add myself? Thanks again, Jon - Original Message - From: Nathan Nobbe [EMAIL PROTECTED] To: Jon

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Jon Westcot
Hi Jochem: Thanks for the suggestion. Not to sound more dense than I already seem, but how do I do this? How do I tell the browser that something is still running? I'm issuing a flush() after every 1000 records along with echoing a textual status update. Should I do it more frequently,

Re: [PHP] How to replace define in a require file with mysql?

2007-11-05 Thread Zoltán Németh
2007. 11. 5, hétfő keltezéssel 06.10-kor Ronald Wiplinger ezt írta: Jim Lucas wrote: Ronald Wiplinger wrote: I have a file linked with require into my program with statements like: define(_ADDRESS,Address); define(_CITY,City); I would like to replace this with a mysql table with

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Jochem Maas
Jon Westcot wrote: Hi Jochem: Thanks for the suggestion. Not to sound more dense than I already seem, but how do I do this? by calling the function somewhere near the top of your script? ignore_user_abort(); How do I tell the browser that something is still running? I'm issuing a

Re: [PHP] Page cannot be displayed error in IE6

2007-11-05 Thread tanzeem
Thanks nathan, But i cant use 'get' since the string being submitted is very big. I tried PHP headers as referred to by another website. This only produced warning message: headers already sent... etc . quickshiftin wrote: On 11/3/07, tanzeem [EMAIL PROTECTED] wrote: i have 3 php files

Re: [PHP] How to replace define in a require file with mysql?

2007-11-05 Thread Robin Vickery
On 05/11/2007, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 11. 5, hétfő keltezéssel 06.10-kor Ronald Wiplinger ezt írta: Jim Lucas wrote: Ronald Wiplinger wrote: I have a file linked with require into my program with statements like: define(_ADDRESS,Address); define(_CITY,City);

[PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread Colin Guthrie
Jon Westcot wrote: Hi all: I've been beating my head against a brick wall trying to figure this out and I'm still no closer than I was two weeks ago. How do I specify a local file on my computer to use with fopen() on the server? Keep on beating it until you get the concept of

[PHP] Problem with input name, how can i use . (dot) in a name of a input type text?

2007-11-05 Thread Jônata Tyska Carvalho
Hi Im having a big problem because the name of one input type text that is ' table.name' in my html, becomes 'table_name' in php, it is a kind of bug?? =S form method=post input type=text nametable.name /form in PHP we have: $_POST[table_name] instead of $_POST[table.name] someone knows

RE: [PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread admin
I simply do this $file=/home/images/index.html; $output = fopen($file, w); -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Colin Guthrie Sent: Monday, November 05, 2007 4:06 AM To: php-general@lists.php.net Subject: [PHP] Re: How do I specify a local file for

Re: [PHP] Problem with input name, how can i use . (dot) in a name of a input type text?

2007-11-05 Thread Stut
Jônata Tyska Carvalho wrote: Im having a big problem because the name of one input type text that is ' table.name' in my html, becomes 'table_name' in php, it is a kind of bug?? =S form method=post input type=text nametable.name /form in PHP we have: $_POST[table_name] instead of

Re: [PHP] Problem with input name, how can i use . (dot) in a name of a input type text?

2007-11-05 Thread Jochem Maas
Stut wrote: Jônata Tyska Carvalho wrote: Im having a big problem because the name of one input type text that is ' table.name' in my html, becomes 'table_name' in php, it is a kind of bug?? =S form method=post input type=text nametable.name /form in PHP we have: $_POST[table_name]

[PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread Colin Guthrie
[EMAIL PROTECTED] wrote: I simply do this $file=/home/images/index.html; $output = fopen($file, w); I'd read the post again! The OP was asking how the *server* could open a file on the *client*. You've just describe how the *server* opens a file on the *server* (e.g. itself). Quite

RE: [PHP] Re: How do I specify a local file for fopen()?

2007-11-05 Thread admin
I would like to change my answer to that question. Due to my lack in desire, to read the entire email at first I have made a bad judgment error in exactly what you was trying to do. Yes trying to open a file on your local computer from the server is not a good idea. HOW EVER. There are many

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Nathan Nobbe
On 11/5/07, Jon Westcot [EMAIL PROTECTED] wrote: Hi Nathan: No, I'm not familiar with Ajax. Where can I read up on it? More important, how can I find out if Ajax is implemented on the server? Or is it something I can add myself? if you arent familiar w/ ajax, no worries; the main

Re: [PHP] Problem with input name, how can i use . (dot) in a name of a input type text?

2007-11-05 Thread Stut
Jochem Maas wrote: Stut wrote: Jônata Tyska Carvalho wrote: Im having a big problem because the name of one input type text that is ' table.name' in my html, becomes 'table_name' in php, it is a kind of bug?? =S form method=post input type=text nametable.name /form in PHP we have:

Re: [PHP] Page cannot be displayed error in IE6

2007-11-05 Thread Nathan Nobbe
On 11/5/07, tanzeem [EMAIL PROTECTED] wrote: Thanks nathan, But i cant use 'get' since the string being submitted is very big. i guess that is an ie6 limitation, im not sure it still exists in 7. I tried PHP headers as referred to by another website. This only produced warning message:

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Daniel Brown
On 11/5/07, Jochem Maas [EMAIL PROTECTED] wrote: Jon Westcot wrote: Hi Jochem: Thanks for the suggestion. Not to sound more dense than I already seem, but how do I do this? by calling the function somewhere near the top of your script? ignore_user_abort(); How do I tell the

Re: [PHP] How to replace define in a require file with mysql?

2007-11-05 Thread Jim Lucas
Ronald Wiplinger wrote: Jim Lucas wrote: Ronald Wiplinger wrote: I have a file linked with require into my program with statements like: define(_ADDRESS,Address); define(_CITY,City); I would like to replace this with a mysql table with these two fields (out of many other fields). How can I

Re: [PHP] mysql_fetch_array

2007-11-05 Thread Philip Thompson
On 11/3/07, Eduardo Vizcarra [EMAIL PROTECTED] wrote: Hi guys After doing some changes, I believe it is partially working, what I did is the following: while($row=mysql_fetch_array($fotos)) { $fotos_mostrar[] = $row; } $primer_foto = reset($fotos_mostrar[0]); // This is to set

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Jochem Maas
Nathan Nobbe wrote: On 11/5/07, Jon Westcot [EMAIL PROTECTED] wrote: Hi Nathan: No, I'm not familiar with Ajax. Where can I read up on it? More important, how can I find out if Ajax is implemented on the server? Or is it something I can add myself? although it might sound cool -

Re: [PHP] Problem with input name, how can i use . (dot) in a name of a input type text?

2007-11-05 Thread Jochem Maas
Jônata Tyska Carvalho wrote: Well if i cant, i cant! But dont say i dont need why not? Im working with a framework that works in that way. Need to put the name of the column of please name the framework - I like to know what to avoid :-) my database like the name of the input. And i

[PHP] Strange warning: preg_match compilation warning

2007-11-05 Thread Paul Scott
Does anyone have any idea as to why the following line is generating a warning? } else if (preg_match('/^([0-9]{4})-([0-9]{4})? (AVOIR \)$/', $content) === 0) { The warning text is as follows: Warning: preg_match(): Compilation failed: missing ) at offset 34 in ... Offset 34 seems to be the

Re: [PHP] Strange warning: preg_match compilation warning

2007-11-05 Thread Daniel Brown
On 11/5/07, Paul Scott [EMAIL PROTECTED] wrote: Does anyone have any idea as to why the following line is generating a warning? } else if (preg_match('/^([0-9]{4})-([0-9]{4})? (AVOIR \)$/', $content) === 0) { The warning text is as follows: Warning: preg_match(): Compilation failed:

Re: [PHP] Problem with input name, how can i use . (dot) in a name of a input type text?

2007-11-05 Thread Jônata Tyska Carvalho
with regard to things not to do, don't f'ing reply off-list (unless asked), etiquette asks that you keep the conversation on the mailing list. if you wAnt to call me an ass because you don't like the way I tried to help that's fine but please do it in public :-) sorry but i thought when im

Re: [PHP] Strange warning: preg_match compilation warning

2007-11-05 Thread Paul Scott
On Mon, 2007-11-05 at 12:08 -0500, Daniel Brown wrote: You canceled-out the final closing param with a backslash here: (AVOIR \) Oh geez, thanks! How embarrassing... I suppose that's what you get for coding on long haul flights... Thanks! --Paul All Email originating from

Re: [PHP] what is better way to write the query

2007-11-05 Thread Shafiq Rehman
Hi, If possible, write your inserts queries in a text file and use LOAD DATA for bulk inserts. -- Keep Smiling Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On 11/2/07, Andrew Ballard [EMAIL PROTECTED] wrote: On Nov 2, 2007 10:41 AM, afan pasalic

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Nathan Nobbe
On 11/5/07, Jochem Maas [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: On 11/5/07, Jon Westcot [EMAIL PROTECTED] wrote: Hi Nathan: No, I'm not familiar with Ajax. Where can I read up on it? More important, how can I find out if Ajax is implemented on the server? Or is it

[PHP] Mail function doesn't work

2007-11-05 Thread Alberto García Gómez
What could happen that my mail function isn't working. I check twice my php.ini conf and it's fine. I test sendmail manually and it's OK. I also try to send mails with sendmail stoped and started and nothing happen Este correo ha sido enviado desde el Politécnico de Informática Carlos Marx de

[PHP] More info on timeout problem

2007-11-05 Thread Jon Westcot
Hi all: First, thanks for the multiple suggestions. I'm pretty new at PHP programming, so all suggestions are great learning opportunities. Now, some observations: I've tried placing the ignore_user_abort(TRUE); in the code. It seems to have made little, if any, impact -- the page

[PHP] Can I make a process run in background?

2007-11-05 Thread Luca Paolella
Hi, Before I start explaining my problem I'd like to say one thing: I'm aware that php isn't the best-suited language for what I'm trying to do (an IRC bot), but unfortunately by now it's the only way I have for various reasons; I want the bot to run a process in background (a periodic

RE: [PHP] Mail function doesn't work

2007-11-05 Thread Jay Blanchard
[snip] What could happen that my mail function isn't working. I check twice my php.ini conf and it's fine. I test sendmail manually and it's OK. I also try to send mails with sendmail stoped and started and nothing happen [/snip] Can we see your code? -- PHP General Mailing List

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Satyam
- Original Message - From: Jochem Maas [EMAIL PROTECTED] Dan Brown (the nice guy on this list, not the twat that wrote the 'daVinci Code') suggests a *much* better way to go- namely using a CLI script. the fun part is getting a button push on an admin page to somehow initiate the CLI

Re: [PHP] Can I make a process run in background?

2007-11-05 Thread Paul Scott
On Mon, 2007-11-05 at 19:20 +0100, Luca Paolella wrote: I want the bot to run a process in background (a periodic message, for example) while listening for events (like a user joining a channel or using a certain command) and consequentially executing the corresponding functions, is

Re: [PHP] Mail function doesn't work

2007-11-05 Thread Per Jessen
Alberto García Gómez wrote: What could happen that my mail function isn't working. I check twice my php.ini conf and it's fine. I test sendmail manually and it's OK. I also try to send mails with sendmail stoped and started and nothing happen Does your mail-server otherwise work? /Per

RE: [PHP] More info on timeout problem

2007-11-05 Thread Instruct ICC
I'm now wondering if some error is occurring that, for some reason, is silently ending the routine. I'm building what may be a very long SQL INSERT statement for each line in the CSV file that I'm reading; could I be hitting some upper limit for the length of the SQL code? I'd think

Re: [PHP] Mail function doesn't work

2007-11-05 Thread Jim Lucas
Alberto García Gómez wrote: What could happen that my mail function isn't working. I check twice my php.ini conf and it's fine. I test sendmail manually and it's OK. I also try to send mails with sendmail stoped and started and nothing happen Este correo ha sido enviado desde el Politécnico

Re: [PHP] More info on timeout problem

2007-11-05 Thread Jon Westcot
Hi Instruct ICC: I'm now wondering if some error is occurring that, for some reason, is silently ending the routine. I'm building what may be a very long SQL INSERT statement for each line in the CSV file that I'm reading; could I be hitting some upper limit for the length of the SQL

RE: [PHP] More info on timeout problem

2007-11-05 Thread Instruct ICC
Sounds much like what I'm trying to do. I have had to give up, for the time being, on using PHP to upload the datafile; it's about 56 MB in size and nothing I do seems to let me upload anything larger than a 2MB file. :( I don't know if it's been mentioned in this thread, but 2M is a default

RE: [PHP] More info on timeout problem

2007-11-05 Thread Kristen G. Thorson
-Original Message- From: Instruct ICC [mailto:[EMAIL PROTECTED] Sent: Monday, November 05, 2007 3:34 PM To: php-general@lists.php.net Subject: RE: [PHP] More info on timeout problem Sounds much like what I'm trying to do. I have had to give up, for the time being, on using PHP to

Re: [PHP] More info on timeout problem

2007-11-05 Thread Wolf
One thing to note, if you have not upped the max file size to be over what you are trying to load, the server will hang. ;;; ; Resource Limits ; ;;; max_execution_time = 7200 ; Maximum execution time of each script, in seconds max_input_time = 7200 ;

Re: [PHP] More info on timeout problem

2007-11-05 Thread Jon Westcot
Hi Wolf: Thanks for the suggestion. I've tried setting these in a php.ini file, but that file seems to be constantly ignored, other than the fact that its presence seems to cause every value to take on its default settings. ::sigh:: I am going to try and put the values into a .htaccess file

Re: [PHP] More info on timeout problem

2007-11-05 Thread Jon Westcot
Hi Instruct ICC: How do I save the individual query statements to a file? That may give me a good option for checking a log of activity when the process fails again. I'm assuming you are building an $sql variable, so you would write that to a file instead of executing it in a query. Look

Re: [PHP] More info on timeout problem

2007-11-05 Thread Jon Westcot
Hi Kristen: I'm jumping in here late, so I haven't seen previous posts. Another possible place I have seen limiting post/upload sizes: There is an Apache directive called LimitRequestSize or somesuch which will take precedence (silently) over any PHP max post size you set. I found this

Re: [PHP] More info on timeout problem

2007-11-05 Thread Daniel Brown
On 11/5/07, Jon Westcot [EMAIL PROTECTED] wrote: I'm really starting to hate shared servers. In general, keep in mind that a shared server is for low-level activities. If you're doing something that big, you may want to move to a VPS, a smaller hosting company such as plug

Re: [PHP] Problem with input name, how can i use . (dot) in a name of a input type text?

2007-11-05 Thread Jochem Maas
Jônata Tyska Carvalho wrote: with regard to things not to do, don't f'ing reply off-list (unless asked), etiquette asks that you keep the conversation on the mailing list. if you wAnt to call me an ass because you don't like the way I tried to help that's fine but please do it in public :-)

Re: [PHP] Looking for ways to prevent timeout

2007-11-05 Thread Jochem Maas
Nathan Nobbe wrote: On 11/5/07, Jochem Maas [EMAIL PROTECTED] wrote: ... yes yes yes to all that, except for one thing. Im personally of the opinion such 'import' operation should involve no human interaction and garanteed to complete (e.g. auto resume), save for possibly initializing a

Re: [PHP] More info on timeout problem

2007-11-05 Thread Jochem Maas
Jon Westcot wrote: Hi all: just show us the code. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Close a session knowing it's ID (not the current session)

2007-11-05 Thread Jochem Maas
Richard Heyes wrote: ?php unlink('/tmp/sess_' . session_id()); unlink(session_save_path().'/'.session_id()); // no? ? You'll need to know the session_id of the session you want to close. The code above closes/ends the current users session, but simply substitute the desired session

[PHP] Installing php_pgsql.dll to Apache - this is unreal

2007-11-05 Thread Martin Zvarík
Hi, I am trying now for almost 2 hours to get this working: I had Apache and PHP with modules installed as CGI (also tryed as module). Now I added extension (in php.ini) php_pgsql.dll and also installed postgreSQL. And it shows me error when starting apache: module could not be found. The

[PHP] gzuncompress() Not Working.

2007-11-05 Thread Casey
Hello, list! I'm trying to translate some code from Python to PHP so it will work on my server. The Python code is: x = zlib.decompressobj() x.decompress(blah) # blah is a 100KB string When I try gzuncompress() on the same data (I checked), it returns a Data error. I also tried

[PHP] More info on timeout problem, with code

2007-11-05 Thread Jon Westcot
Hi all: As requested, here's the code: ?php if(isset($_POST['process'])){ $old_session_gc_maxlifetime = ; $old_max_execution_time = ; $old_max_input_time = ; $old_session_gc_maxlifetime = ini_set(session.gc_maxlifetime,1800); $old_max_execution_time =

[PHP] Chinese input character count

2007-11-05 Thread Ronald Wiplinger
I thought I did it correct to define in the header: meta http-equiv=Content-Type content=text/html; charset=utf-8 to display chinese characters correct. It works. However, if you type in a form directly, than each character will be translated to UTF-8 with a sequence of #; I could then

[PHP] Memory Allocation Error

2007-11-05 Thread heavyccasey
Hi! I have a script that reads a 120 MB remote file. This raises a Memory Allocation Error unless I use: ini_set('memory_limit', '130M'); I doubt this is good for my server... I tried both fopen and file_get_contents. This used to work fine in PHP 4 until I upgraded to PHP 5. Any ideas?