[PHP] clearstatcache, how to use?

2004-10-25 Thread Louie Miranda
I have this code that checks for a file if it exists and do something if it doesnt exist. Problem exist when im updating my data on the directory, even if i did upload it. it still shows the non-existent data. I have read that i should add the clearstatcache();, how am i going to use it? after

Re: [PHP] Problem with file_exists() and clearstatcache()...

2004-10-25 Thread Louie Miranda
i also hve a similar problem like yours, and i dont know how can we solve this. On Wed, 21 Jul 2004 17:22:16 -0400, Scott Fletcher [EMAIL PROTECTED] wrote: I noticed the problem with the php functions, file_exists() and clearstatcache(). When I load a webpage, the php do the file_exists() and

[PHP] Re: clearstatcache, how to use?

2004-10-25 Thread Greg Beaver
Louie Miranda wrote: I have this code that checks for a file if it exists and do something if it doesnt exist. Problem exist when im updating my data on the directory, even if i did upload it. it still shows the non-existent data. I have read that i should add the clearstatcache();, how am i going

Re: [PHP] PHP5 Tutorials...?

2004-10-25 Thread Dirk Kredler
Here: http://www.zend.com/php5/ Am Sonntag, 24. Oktober 2004 21:01 schrieb Michael Lauzon: Where can I find detailed PHP5 tutorials, but written for the beginner...they must be online tutorials as I cannot afford any computer books at the moment?! -- Michael Lauzon

Re: [PHP] MySQL Scalability, part 2

2004-10-25 Thread Curt Zirzow
* Thus wrote Kevin Grigorenko: Zareef Ahmed [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -Original Message- From: Kevin Grigorenko [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 12:36 AM To: [EMAIL PROTECTED] Subject: [PHP] MySQL Scalability, part 2

[PHP] A problem about urlencode

2004-10-25 Thread Teng Wang
I have a url containing some multi-byte characters. So I need urlencode() to change these characters into the %xx form. However, when I encode the whole url string, / is also be encoded as %2F. How to solve this problem? I don't want to analyze the url string before/after urlencode(). Thanks a

Re: [PHP] clearstatcache, how to use?

2004-10-25 Thread Curt Zirzow
* Thus wrote Louie Miranda: I have this code that checks for a file if it exists and do something if it doesnt exist. Problem exist when im updating my data on the directory, even if i did upload it. it still shows the non-existent data. I have read that i should add the clearstatcache();,

Re: [PHP] Need function to process tab delimited file using associative array

2004-10-25 Thread Justin French
On 25/10/2004, at 12:22 PM, Eric Wood wrote: Does anyone have a function stored away that can selectively let me trim out only the columns *by name* I need from a delimited text file? For Example: FNametabLNametabPhone JohntabSmithtab345335 JamestabSmithtab2345223533

[PHP] transfer file

2004-10-25 Thread Akshay
How to transfer text file from one machine to another using php Please give the code if possible akshay -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] transfer file

2004-10-25 Thread Akshay
How to transfer text file from one machine to another using php Please give the code if possible akshay -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Most efficient way of fetching 1,000 records from MySQL ?

2004-10-25 Thread Steve McGill
Hello, In my script I have generated an array of 1,000 userIDs for example. Now for I need to fetch each user's record and I am wondering what is the best way to go about it: 1) 1000 sql queries // code is sort of pseudo for clarity foreach($users as $userID) { $user = sql(select * from

Re: [PHP] Most efficient way of fetching 1,000 records from MySQL ?

2004-10-25 Thread Ian Firla
I think you'll find that your first approach is not only more correct, it's the only manageable one. Ian On Mon, 2004-10-25 at 10:15 +0200, Steve McGill wrote: Hello, In my script I have generated an array of 1,000 userIDs for example. Now for I need to fetch each user's record and I am

Re: [PHP] transfer file

2004-10-25 Thread raditha dissanayake
Akshay wrote: How to transfer text file from one machine to another using php Please give the code if possible It depends on what protocol you want to use. Please pick from FTP, HTTP, NFS etc and let us know. akshay -- Raditha Dissanayake.

Re: [PHP] Most efficient way of fetching 1,000 records from MySQL ?

2004-10-25 Thread Marek Kilimajer
Ian Firla wrote: I think you'll find that your first approach is not only more correct, it's the only manageable one. No, it will be very slow. The biggest overhead is in transfering data to and from sql server. It's always better to get the results in one sql query. Use this aproach: $users =

[PHP] Sessions problem bug

2004-10-25 Thread Reinhart Viane
Some days ago I asked some questions concerning php and sessions Apparently it seems to be a bug: 'When you use a session name that has only numbers, each call to session_start seems to regenerate a new session id, so the session does not persist.'

[PHP] chm file for tutorial

2004-10-25 Thread murugesan
Hello all, I am new to PHP programming.. It will be nice to have a chm file on php tutorial. Can anyone point me to that location ? Also I would like to know how how to code the following line ? a href='http://www.geocities.com/murugesangct/index.html'Mail

Re: [PHP] chm file for tutorial

2004-10-25 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: Hello all, I am new to PHP programming.. It will be nice to have a chm file on php tutorial. Can anyone point me to that location ? http://www.php.net/download-docs.php Also I would like to know how how to code the following line ? a

RE: [PHP] chm file for tutorial

2004-10-25 Thread murugesan
Thanks Marek... a href='http://www.geocities.com/murugesangct/index.html'Mail http://www.geocities.com/murugesangct/index.html /a You just did. and got the answer from the tutorial... Regards, Dinesh_P_V -Original Message- From: Marek Kilimajer [mailto:[EMAIL

RE: [PHP] Most efficient way of fetching 1,000 records from MySQL ?

2004-10-25 Thread Graham Cossey
I would certainly agree with Marek. I recently changed a query from using 20 or so 'OR' conditions to use the 'IN' statement and it drastically improved the performance of the query. Graham -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: 25 October 2004 11:37

Re: [PHP] Most efficient way of fetching 1,000 records from MySQL ?

2004-10-25 Thread Steve McGill
I think you'll find that your first approach is not only more correct, it's the only manageable one. No, it will be very slow. The biggest overhead is in transfering data to and from sql server. It's always better to get the results in one sql query. Use this aproach: $users =

[PHP] Convert an array in an object instance

2004-10-25 Thread Francisco M. Marzoa Alonso
Hi, Is it possible to convert an array in an object instance? I can convert an object in an array as follows: $Test = new MyClass (); $TestArray = (array) $Test; Then I've an array with all members of the object $Test, but it seems that I cannot simply do: $TestObject = (MyClass) $TestArray; To

[PHP] Passing regexp substrings to a function

2004-10-25 Thread Ville Mattila
Hi there, I have a few e-mail templates in a file that should be parsed. A template can include also some module codes that should be replaced by a return value of a certain function. For example, if the template include a text {ProductInfo:1032}, the value 1032 would be passed as an argument

[PHP] Re: Convert an array in an object instance

2004-10-25 Thread M. Sokolewicz
Francisco M. Marzoa Alonso wrote: Hi, Is it possible to convert an array in an object instance? I can convert an object in an array as follows: $Test = new MyClass (); $TestArray = (array) $Test; Then I've an array with all members of the object $Test, but it seems that I cannot simply do:

[PHP] Substr

2004-10-25 Thread Shaun
Hi, I have a string as follows: pid_1_date_2004_10_25 pid tells me the Project_ID and date tells me the date(!). I need to extract this information from the string so to get the date I need everything after 'date_' as follows: substr(strstr($key, 'date_'), 4) However, to get the Project ID I

Re: [PHP] Substr

2004-10-25 Thread raditha dissanayake
Shaun wrote: However, to get the Project ID I need to extract everything after 'pid_' and everything before 'date_'. Can someone help me with this please as PHP doesn't seem to provide a function for extracting information from a string that occurs before the 'needle'? yes it doe. look under

Re: [PHP] Substr

2004-10-25 Thread Francisco M. Marzoa Alonso
Use regular expresions: ?php $string = pid_1_date_2004_10_25; preg_match ( '/^pid_(.*?)_date_(.*?)$/', $string, $regs ); print_r ($regs); ? Shaun wrote: Hi, I have a string as follows: pid_1_date_2004_10_25 pid tells me the Project_ID and date tells me the date(!). I need to extract this

Re: [PHP] A problem about urlencode

2004-10-25 Thread raditha dissanayake
Teng Wang wrote: I have a url containing some multi-byte characters. So I need urlencode() to change these characters into the %xx form. However, when I encode the whole url string, / is also be encoded as %2F. How to solve this problem? I don't want to analyze the url string before/after

Re: [PHP] Substr

2004-10-25 Thread Francisco M. Marzoa Alonso
You can also use split function if you do not know about regular expressions and do not want to learn: ?php $string = pid_1_date_2004_10_25; $regs = split (_, $string ); print_r ($regs); ? I think its autoexplicative. Shaun wrote: Hi, I have a string as follows: pid_1_date_2004_10_25 pid tells

RE: [PHP] Substr

2004-10-25 Thread Graham Cossey
What about using explode()? $array = explode('_', 'pid_1_date_2004_10_25'); $pid = $array[1]; $yr = $array[3]; $mn = $array[4]; $dy = $array[5]; Graham -Original Message- From: Shaun [mailto:[EMAIL PROTECTED] Sent: 25 October 2004 14:00 To: [EMAIL PROTECTED] Subject: [PHP] Substr

Re: [PHP] Need function to process tab delimited file using associative array

2004-10-25 Thread Eric Wood
- Original Message - From: Justin French The disadvantage is that you have to loop through the data twice (once as a tab-delimited file, once as an assoc. array), which would have obvious problems when there's a large set of data that needs to be looped through often. Justin French

Re: [PHP] Passing regexp substrings to a function

2004-10-25 Thread Octavian Rasnita
Hi, In perl, you can do something like: $string =~ s/---piece of text that contains a certain (VALUE) in it---/function($1)/gse; This expression replaces its first part with the result of the function function called with the parameter VALUE. Is this what you want? Maybe you can do something

[PHP] Php files with .html extension?

2004-10-25 Thread Phpu
Hi, How can i do a php script with a html extensionsuch as http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html Thanks

Re: [PHP] Substr

2004-10-25 Thread M. Sokolewicz
split() uses the POSIX regular expressions engine, and thus also uses regular expressions. The loading of this engine is a massive overhead when dealing with simple splitting of a string. To do basic things like this it's a lot faster to use explode(). - Tul Francisco M. Marzoa Alonso wrote:

[PHP] Re: Php files with .html extension?

2004-10-25 Thread M. Sokolewicz
Phpu wrote: Hi, How can i do a php script with a html extensionsuch as http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html Thanks when using eg. apache, you can add a .htaccess file with the following line: AddType application/x-httpd-php .html That will overwrite the normal

Re: [PHP] Re: overiding functions (constructors mostly)

2004-10-25 Thread Daniel Schierbeck
M Saleh Eg wrote: OR you could control ur method and have optional arguments in ur argument list and decide what to do according to that. e.g. public function _construct($param1=0, $param2=, $param3=null) { if($param1) if($param2) if($param3) } $obj=new

Re: [PHP] Re: Convert an array in an object instance

2004-10-25 Thread Francisco M. Marzoa Alonso
[EMAIL PROTECTED] wrote: No. You need to remember that in most cases where you cast a variable from one type to another, you will experience data (precision) loss. This is also the case in converting an object to an array. Only the properties are copied over (since functions can not be part of an

Re: [PHP] Php files with .html extension?

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 16:37:52 +0300, Phpu [EMAIL PROTECTED] wrote: How can i do a php script with a html extensionsuch as http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html If you use Apache you can edit you httpd.conf and add: AddType application/x-httpd-php .html --

Re: [PHP] Php files with .html extension?

2004-10-25 Thread Brian V Bonini
On Mon, 2004-10-25 at 09:37, Phpu wrote: Hi, How can i do a php script with a html extensionsuch as http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html AddType application/x-httpd-php .php .php3 .html -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key

RE: [PHP] Php files with .html extension?

2004-10-25 Thread Jay Blanchard
[snip] How can i do a php script with a html extensionsuch as http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html [/snip] You set it up in your httpd.conf You should have AddType application/x-httpd-php .php change it to AddType application/x-httpd-php .php .html -- PHP

Re: [PHP] Php files with .html extension?

2004-10-25 Thread Matt M.
How can i do a php script with a html extensionsuch as http://www.blinds-wise.com/shop/p/blind/bid/1/venetian_blinds.html apache could do this a couple ways http://httpd.apache.org/docs/mod/mod_mime.html#addhandler http://httpd.apache.org/docs-2.0/mod/core.html#setinputfilter

[PHP] cant override session variables

2004-10-25 Thread Lizet Peña de Sola
Hi all, This is drving me insane... I have a logout script, logout.php: ? $_SESSION['validlogin']=; $_SESSION['username']=; $_SESSION['password']=; unset($_SESSION['validlogin']); unset($_SESSION['username']); unset($_SESSION['password']); session_unset();

Re: [PHP] Re: Convert an array in an object instance

2004-10-25 Thread Marek Kilimajer
Francisco M. Marzoa Alonso wrote: [EMAIL PROTECTED] wrote: No. You need to remember that in most cases where you cast a variable from one type to another, you will experience data (precision) loss. This is also the case in converting an object to an array. Only the properties are copied over

Re: [PHP] Re: Convert an array in an object instance

2004-10-25 Thread Francisco M. Marzoa Alonso
Marek Kilimajer wrote: Francisco M. Marzoa Alonso wrote: [EMAIL PROTECTED] wrote: No. You need to remember that in most cases where you cast a variable from one type to another, you will experience data (precision) loss. This is also the case in converting an object to an array. Only the

Re: [PHP] Re: Convert an array in an object instance

2004-10-25 Thread Curt Zirzow
* Thus wrote Francisco M. Marzoa Alonso: FYI, the reason I need this is because I'm creating my own object's serialization routines. Why would you want to do this? Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: Convert an array in an object instance

2004-10-25 Thread Francisco M. Marzoa Alonso
Curt Zirzow wrote: * Thus wrote Francisco M. Marzoa Alonso: FYI, the reason I need this is because I'm creating my own object's serialization routines. Why would you want to do this? I was walking through the forest when, suddenly, a white light comes from the west through the trees

RE: [PHP] Php files with .html extension?

2004-10-25 Thread Graham Cossey
Do not forget that if you do this ALL files with the .html extension will be parsed by PHP whether they are PHP scripts or not which could be something you need to consider from a performance perspective. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: 25 October

RE: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
That's definitely a good point. I'm curious though, would it really be a significant performance issue? Even if a lot of HTML files are being processed by PHP? I mean, if the PHP parser goes through and never sees a ? Or ?php, does it do any more than just output the file? True, that's

Re: [PHP] cant override session variables

2004-10-25 Thread Richard Davey
Hello, Monday, October 25, 2004, 3:13:02 PM, you wrote: LPdS I know globals are on...what's a happening? why the LPdS variables are cleaned fine why there's no override? Are you trying to do all of that in the same script? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP

[PHP] PHP Crypt on MacOSX

2004-10-25 Thread Kris
I recently moved a site to a MacOSX based Apache/PHP server. Apparently crypt only uses DES. I read somewhere that there is no way to get it use use MD5, which sounds hard to beleive considering the OS is BSD based. So.. here is my dilema.. My db contains usernames and passwords. The

Re: [PHP] Re: overiding functions (constructors mostly)

2004-10-25 Thread M Saleh EG
Exactly Daniel ! I should've mentioned that too. Thanx for making it clear. On Mon, 25 Oct 2004 15:45:36 +0200, Daniel Schierbeck [EMAIL PROTECTED] wrote: M Saleh Eg wrote: OR you could control ur method and have optional arguments in ur argument list and decide what to do according to

[PHP] php extension problem

2004-10-25 Thread Pierre Ancelot
Hi ! I am having some trouble creating a php extension. as show in the documentation i did a ./ext_skel --extname=mymodule which created the directory mymodule i edited the config.m4 file to tune it to something very basic : PHP_ARG_WITH(mymodule, for mymodule support, [ --with-mymodule

Re[2]: [PHP] Php files with .html extension?

2004-10-25 Thread Richard Davey
Hello Trevor, Monday, October 25, 2004, 4:47:53 PM, you wrote: GT processed by PHP? I mean, if the PHP parser goes through and never sees GT a ? Or ?php, does it do any more than just output the file? True, GT that's something, but is it anything really significant. True, it doesn't do

[PHP] Content-Type header required for POST?

2004-10-25 Thread Olaf van der Spek
Hi, Since which version does PHP require the Content-Type header in POST requests? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: Re[2]: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
True, it doesn't do anything other than output the HTML. But it's that load - scan - determine - output that takes up CPU time and memory. Sure, on most sites it doesn't matter one bit. But on popular sites.. well, you can do the math I'm sure. I guess at the end of the day it comes down

Re: [PHP] Re: overiding functions (constructors mostly)

2004-10-25 Thread Daniel Schierbeck
M Saleh Eg wrote: Exactly Daniel ! I should've mentioned that too. Thanx for making it clear. No problem 8) -- Daniel Schierbeck Help spread Firefox (www.getfirefox.com): http://www.spreadfirefox.com/?q=user/registerr=6584 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: PHP Crypt on MacOSX

2004-10-25 Thread Daniel Schierbeck
Kris wrote: I recently moved a site to a MacOSX based Apache/PHP server. Apparently crypt only uses DES. I read somewhere that there is no way to get it use use MD5, which sounds hard to beleive considering the OS is BSD based. So.. here is my dilema.. My db contains usernames and passwords.

Re[4]: [PHP] Php files with .html extension?

2004-10-25 Thread Richard Davey
Hello Trevor, Monday, October 25, 2004, 6:31:07 PM, you wrote: GT I could see someone wanting to use .html to obscure the fact that GT they were using PHP scripts (for various reason), but if that's GT intended as a security measure, then it's classic security through GT obscurity, which will

Re: [PHP] Php files with .html extension?

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 16:30:14 +0100, Graham Cossey [EMAIL PROTECTED] wrote: Do not forget that if you do this ALL files with the .html extension will be parsed by PHP whether they are PHP scripts or not which could be something you need to consider from a performance perspective. I setup a

Re: [PHP] Content-Type header required for POST?

2004-10-25 Thread Chris Shiflett
--- Olaf van der Spek [EMAIL PROTECTED] wrote: Since which version does PHP require the Content-Type header in POST requests? Content-Type is required for any request that has content. It's an HTTP requirement and has very little to do with PHP. Can you explain what you're talking about?

Re: [PHP] Php files with .html extension?

2004-10-25 Thread Curt Zirzow
* Thus wrote Greg Donald: The summary results: For 10K local requests: 27.1 seconds with .html not parsed as PHP vs. 30.2 seconds with .html parsed as PHP. I only ran these tests locally, and only on the one server.. so it's definatly not very scientific. I think we all sorta knew

[PHP] Register Globals

2004-10-25 Thread Matthew Sims
I just signed up with a new hosting site. So first thing I did was check what phpinfo() had to say. I see that register_globals is turned on. Now I always use the $_GET and $_POST vars but will this still affect me? -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List

RE: [PHP] Register Globals

2004-10-25 Thread Jay Blanchard
[snip] I just signed up with a new hosting site. So first thing I did was check what phpinfo() had to say. I see that register_globals is turned on. Now I always use the $_GET and $_POST vars but will this still affect me? [/snip] Nope, you can keep using, and should keep using, the $_GET and

[PHP] Compiling PHP with extension; CLI works, Apache doesn't

2004-10-25 Thread Aaron Gould
I just compiled PHP with an extension for testing purposes (mnoGoSearch). After all was said and done, the CLI version sees the mnogosearch extension just fine (php -m), but the Apache module doesn't see it at all (nothing mnogosearch related at all in PHPINFO()). I've added

Re: [PHP] @session_start generates a new session_id

2004-10-25 Thread Mark-Walter
Hi Sadeq, Check your PHP config file. You may enable auto session start. I think this is the reasone of problem. sorry for the delay and indeed your suggestion solves now my problem. Thank's a lot :-) -- Best Regards, Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] Register Globals

2004-10-25 Thread Matthew Sims
[snip] I just signed up with a new hosting site. So first thing I did was check what phpinfo() had to say. I see that register_globals is turned on. Now I always use the $_GET and $_POST vars but will this still affect me? [/snip] Nope, you can keep using, and should keep using, the $_GET

Re: [PHP] Register Globals

2004-10-25 Thread Andre Dubuc
On Monday 25 October 2004 02:50 pm, Matthew Sims wrote: [snip] I see that register_globals is turned on. Now I always use the $_GET and $_POST vars but will this still affect me? [snip] Matthew, Although it shouldn't affect you, I had a terrible time trying to get anything to pass via

Re: [PHP] Php files with .html extension?

2004-10-25 Thread zooming
On a related note I was wondering what people thought of php files with no extensions? So if I changed index.php to just index then I can create url like www.mydomain.com/index/articleid/29 so it's search engine friendly. # .htaccess file DefaultType application/x-httpd-php -- PHP General

Re: [PHP] Register Globals

2004-10-25 Thread John Holmes
Jay Blanchard wrote: [snip] I just signed up with a new hosting site. So first thing I did was check what phpinfo() had to say. I see that register_globals is turned on. Now I always use the $_GET and $_POST vars but will this still affect me? [/snip] Nope, you can keep using, and should keep

[PHP] Re: http request using fsockopen

2004-10-25 Thread Manuel Lemos
Hello, On 10/25/2004 09:46 AM, Rob wrote: I have a form on page A which is submitted trough a POST method to page B. On the start of page B I check var $foo. If true I want to forward the request to page C. Sending the POST data also though the POST method. I manually create a HTTP request to

Re: [PHP] Register Globals

2004-10-25 Thread Simas Toleikis
And this won't pose as a security risk to me? It will. You could emulate namespaces in php. Do something like this: function init_namespace() { // all your script code goes here } init_namespace(); // notice the call This way any globally registered post/get/cookie etc variables wont be

[PHP] What is better ROs or pdflib and why?

2004-10-25 Thread Eugene Voznesensky
What is better ROs or pdflib and why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] @session_start generates a new session_id

2004-10-25 Thread Lizet Peña de Sola
How can I set session_auto_start On, I have a similar problem and I think it's because my web hosting has that feature off. -Original Message- From: Sadeq Naqashzade [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:47 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject:

Re: [PHP] Php files with .html extension?

2004-10-25 Thread The Snake from Hell!
You would probably brake a heck of a lot of things. CGI scripts, etc. On a related note I was wondering what people thought of php files with noextensions? So if I changed index.php to just index then I can create urllike www.mydomain.com/index/articleid/29 so it's search engine friendly. #

Re: [PHP] Content-Type header required for POST?

2004-10-25 Thread Olaf van der Spek
Chris Shiflett wrote: --- Olaf van der Spek [EMAIL PROTECTED] wrote: Since which version does PHP require the Content-Type header in POST requests? Content-Type is required for any request that has content. It's an HTTP requirement and has very little to do with PHP. Can you explain what you're

[PHP] file upload

2004-10-25 Thread Victor C.
Hi, I'm trying to submit a file from index.php to index2.php. I know how to do file upload in PHP. On index.php I have: FORM ACTION=index2.php METHOD=POST ENCTYPE=multipart/form-data INPUT TYPE=file NAME=myfile SIZE=30 INPUT TYPE=submit NAME=Upload File /FORM The next page would only need to

Re: [PHP] Php files with .html extension?

2004-10-25 Thread zooming
I don't use cgi scripts. - Original Message - From: The Snake from Hell! [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 25, 2004 4:25 PM Subject: Re: [PHP] Php files with .html extension? You would probably brake a heck of a lot of things. CGI scripts, etc. On a

Re: [PHP] file upload

2004-10-25 Thread Chris
You can't, at least you SHOULDN'T. Just think about what you're asking for, you want to download a file from a users computer, without them knowing about it. Major security/privacy issues there that browsers try to prevent. Chris Victor C. wrote: Hi, I'm trying to submit a file from index.php

Re: [PHP] Content-Type header required for POST?

2004-10-25 Thread Chris Shiflett
--- Olaf van der Spek [EMAIL PROTECTED] wrote: Content-Type is required for any request that has content. It's an HTTP requirement and has very little to do with PHP. Can you explain what you're talking about? I was talking about the request, not about the response. As was I. That's

Re: [PHP] Register Globals

2004-10-25 Thread John Holmes
Simas Toleikis wrote: And this [register globals] won't pose as a security risk to me? It will. No, it won't. register_globals is not a security risk. Poorly written code that does not adequately initialize variables or account for variables from outside sources can present security risks. You

[PHP] PHP 5 abstract method and class type hints of extending classes

2004-10-25 Thread Jeremy Weir
The quesion is: how would one make an abstract method that can be compatible with all extending classes that define the method using different class type hints? The php block below is how I thought it should work, but will give this error at parse time: errorFatal error: Declaration of

[PHP] Pure PHP menu tree

2004-10-25 Thread Ryan A
Hi, I have been searching on the net for the past 2 hours without success, so need a recommendation now :-) Basically i am looking for a PHP menu tree, looking on google I have found many but most of them use Javascript with php, or are pure JS or DHTML, I want one that is pure php so it will

Re: [PHP] Register Globals

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 11:50:39 -0700 (PDT), Matthew Sims [EMAIL PROTECTED] wrote: I see that register_globals is turned on. Now I always use the $_GET and $_POST vars but will this still affect me? .htaccess php_flag register_globals off -- Greg Donald Zend Certified Engineer

Re: [PHP] Is flock() necessary on a simple file append?

2004-10-25 Thread Paul Fierro
On 10/24/2004 5:11 PM, Kevin Grigorenko [EMAIL PROTECTED] wrote: I am appending to a file one line of text on every page hit, so there could be many occurrences of this append simultaneously. I am not opening for write (w) but for append (a). Do I need to use flock() to be sure there are no

Re: [PHP] file upload

2004-10-25 Thread Victor C.
Thanks for answering Chris.. What if I want to send a file from my web server to another site for them to parse? I already know what file I want to send and I do not want to have to select the file by doing browsing. Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You can't, at

Re: [PHP] @session_start generates a new session_id

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 15:59:18 -0400, Lizet Peña de Sola [EMAIL PROTECTED] wrote: How can I set session_auto_start On, I have a similar problem and I think it's because my web hosting has that feature off. .htaccess php_flag session.auto_start on -- Greg Donald Zend Certified Engineer

Re: [PHP] Php files with .html extension?

2004-10-25 Thread Greg Donald
On Mon, 25 Oct 2004 18:44:41 +, Curt Zirzow [EMAIL PROTECTED] wrote: Nice work! I wonder what the stats would be like with apache2 :) Suse 9.1 box: cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 4 model name : AMD Athlon(tm)

[PHP] Re: Pure PHP menu tree

2004-10-25 Thread Jason Motes
snip Basically i am looking for a PHP menu tree, looking on google I have found many but most of them use Javascript with php, or are pure JS or DHTML, I want one that is pure php so it will work accross all browsers. snip http://phplayersmenu.sourceforge.net/ -- PHP General Mailing List

Re: [PHP] file upload

2004-10-25 Thread Chris
Server to Server transfers are a bit different. There are MANY ways to do it. You can put the file in the document root of one server, and download it with the other server. Or you could FTP the file from one server to the other. Just 2 examples. And, you could even POST the file from one to

RE: [PHP] Pure PHP menu tree

2004-10-25 Thread Vail, Warren
Do you really want to have every single click go back to the server and then have the browser need to reload your entire page just to expand a limb (not sure limb is the right term) of the tree? That is what you would have to do to be pure PHP solution since the only place PHP can execute is on

Re: [PHP] file upload

2004-10-25 Thread Victor C.
See... basically, I have two sites. One site provides user authentication and another one requests the authentication. The requesting site need to send to the authentication site its request in an XML. The authentication site is suppose to get the XML file using $HTTP_POST_FILES. I'm using PHP

[PHP] Good Class/API Design ?

2004-10-25 Thread Adam Reiswig
Hey all, I just got my hands on the excellent books PHP Anthology 1 2 and am wanting to start playing around with classes. My question to the list is, what, in your opinion, constitutes good class/api design? Is it better to design several smaller classes that each focus on one task and do

[PHP] Re: PHP 5 abstract method and class type hints of extending classes

2004-10-25 Thread Greg Beaver
Jeremy Weir wrote: The quesion is: how would one make an abstract method that can be compatible with all extending classes that define the method using different class type hints? The php block below is how I thought it should work, but will give this error at parse time: errorFatal error:

[PHP] Re: Pure PHP menu tree

2004-10-25 Thread Greg Beaver
Ryan A wrote: Hi, I have been searching on the net for the past 2 hours without success, so need a recommendation now :-) Basically i am looking for a PHP menu tree, looking on google I have found many but most of them use Javascript with php, or are pure JS or DHTML, I want one that is pure php

[PHP] Re: Good Class/API Design ?

2004-10-25 Thread Greg Beaver
Adam Reiswig wrote: Hey all, I just got my hands on the excellent books PHP Anthology 1 2 and am wanting to start playing around with classes. My question to the list is, what, in your opinion, constitutes good class/api design? Is it better to design several smaller classes that each focus

Re: [PHP] php extension problem

2004-10-25 Thread Pierre Ancelot
fixed. i downloaded the source from php.net and it works now... the previous source i had came from apt system. maybe the source is patched ? if i'm not the only one to have had this problem, let me know, i'll mail the debian maintener thanks, On Monday 25 October 2004 19:19, Pierre Ancelot

Re: [PHP] Re: Good Class/API Design ?

2004-10-25 Thread Curt Zirzow
* Thus wrote Greg Beaver: Adam Reiswig wrote: Hey all, I just got my hands on the excellent books PHP Anthology 1 2 and am wanting to start playing around with classes. My question to the list is, what, in your opinion, constitutes good class/api design? Is it better to design several

[PHP] File uploads and handling

2004-10-25 Thread Philip Thompson
Hi all. I have a form to upload a file from a user's computer to the server. I want to then modify the file, and then let the user save it back. However, I am having troubles opening the file. It says it doesn't exist. Any suggestions? --- if (is_uploaded_file($_FILES['userfile']['name']))

Re: [PHP] file upload

2004-10-25 Thread Chris
Ahh, if you *have* to push the data (which you obviously do) and the authentication site has no other authentication methods then you have to POST the file with PHP. It can be done, there are many classes for it, I can't recommend any specific class, but I'm sure someone else here could. I

Re: [PHP] not _that_ fixed....

2004-10-25 Thread Robert Cummings
On Tue, 2004-10-26 at 00:37, Pierre Ancelot wrote: in fact i got it in the ./configure --help : [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ ./configure --help | grep -i spider --enable-spider Enable spider support [EMAIL PROTECTED]:~/phpsource/php-4.3.9$ which is okay. but if

[PHP] Specifying Variable Document Path in PHP

2004-10-25 Thread Anthony Baker
Hey Folks, My first post to this list and forgive me if this is ground that's been trod before, but this has been bugging me for a bit. I'm developing a site that's going to be running on a staging environment and a production environment. Have a number of PHP includes in the production site

  1   2   >