RE: [PHP] Dynamic to Static

2004-07-15 Thread Edwards Jim
Hello Ed, We have used a combination of the following scripts on our site: /jim if ((filemtime(cache/$sidid) + 60) time()) { $cachefile = fopen(cache/$sidid,r); fpassthru($cachefile); exit(); } // start buffering the output ob_start(); // output format - either www or file $output =

Re: [PHP] Compile Php5: --with-mysql and --with-mysqli

2004-07-15 Thread Jacob Friis Larsen
Curt Zirzow wrote: * Thus wrote Jacob Friis Larsen: How do I install Php5 with both --with-mysql and --with-mysqli? 1. Follow instructions at http://php.net/mysqli. Is this correct: --with-mysqli=/usr/bin/mysql_config? (This works: ./configure --with-mysqli=/usr/bin/mysql_config --with-apxs2) 2.

[PHP] Re: Dynamic to Static

2004-07-15 Thread Jason Barnett
Ed Lazor wrote: Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it statically in order for pages to display more quickly when visitors access the site? If so, what solutions are you using to achieve this? Thanks, Ed Hey Ed, there are a couple of ways that you can do it

[PHP] Re: [Q] PHP 101 -- How to check for session existence?

2004-07-15 Thread Jason Barnett
Hey Michael, I think you really only need to check the $_SESSION array, not necessarily each index. if (!isset($_SESSION)) { // login header('Location: ' . MEMBER_LOGIN_PAGE); } else { // session exists } However, if you want to have non-empty values for your session variables you should

[PHP] Re: New object model

2004-07-15 Thread Jason Barnett
Troy S wrote: Is there an ini-file setting so that objects are passed by value as in PHP 4? If so, how long is this likely to be supported? Thanks, Troy Although you can turn on zend engine 1 compatibility, if you intend to distribute your code you cannot expect this on most servers. Another

[PHP] Re: [Q] PHP 101 -- How to check for session existence?

2004-07-15 Thread Ciprian Constantinescu
I think it would be better to use Apache facility of authentication through Mysq l Michael T. Peterson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] To protect certain web pages on my site, I am using the following code inserted at the very beginning (top) of the page: ?php

Re: [PHP] upload an image and store it in mysql

2004-07-15 Thread raditha dissanayake
I have php code that takes text input from a webpage and and stores it in a mysql data base. I tried uploading small images (jpg) using basically the same syntax but they don't make it into the data base. Does anyone know of a simple tutorial that shows how to do this? although I'm against

Re: [PHP] Dynamic to Static

2004-07-15 Thread raditha dissanayake
Ed Lazor wrote: Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it statically in order for pages to display more quickly when visitors access the site? If so, what solutions are you using to achieve this? The best example of this that I have seen is in the mediawiki

[PHP] RE: php vs. cgi app

2004-07-15 Thread Jason Barnett
Bruce, you need to start new threads when you ask a new question... a lot of people don't bother to check out a thread that's already got responses, and it really makes more logical sense to start a new one anyway (original post is below my response)... When you say cgi vs. php, I'm going to

Re: [PHP] Compile Php5: --with-mysql and --with-mysqli

2004-07-15 Thread Marek Kilimajer
Jacob Friis Larsen wrote: Curt Zirzow wrote: * Thus wrote Jacob Friis Larsen: How do I install Php5 with both --with-mysql and --with-mysqli? 1. Follow instructions at http://php.net/mysqli. Is this correct: --with-mysqli=/usr/bin/mysql_config? (This works: ./configure

Re: [PHP] Re: New object model

2004-07-15 Thread Marek Kilimajer
Jason Barnett wrote: Although you can turn on zend engine 1 compatibility, if you intend to distribute your code you cannot expect this on most servers. Another way to pass by value is to use the __clone method. function test($orig, $clone) { $orig-x = 'I am the original.'; $clone-x = 'I

Re: [PHP] Dynamic to Static

2004-07-15 Thread Mirek Novak
Hi, Ed Lazor wrote: Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it statically in order for pages to display more quickly when visitors access the site? If so, what solutions are you using to achieve this? Thanks, Ed I'm using two-way or two-step caching - I'll try to

RE: [PHP] RE: php vs. cgi app

2004-07-15 Thread Ed Lazor
-Original Message- When you say cgi vs. php, I'm going to assume you mean cgi versus apache module (correct me if I misunderstand). To be honest I don't know enough about the internals of the apache module to tell you why it's better for an apache server (would love it if someone

Re: [PHP] RE: php vs. cgi app

2004-07-15 Thread Jason Wong
On Thursday 15 July 2004 16:02, Ed Lazor wrote: There are some benefits to having the cgi available though. For example, if you're at a unix prompt and need to process a file. Or, more commonly, if you want to execute scripts in cronjobs. For these situations you would be better off using

[PHP] MIME files decoding

2004-07-15 Thread C.F. Scheidecker Antunes
Hello all, In order to use pear mimedecode.php I have a few questions that were not answered by the documentation. I have emails that have .zip, .pdf, .txt and .csv files. Some emails have more than one attachment. I would like to have a php script to fetch these emails and save only those with

Re: [PHP] Compile Php5: --with-mysql and --with-mysqli

2004-07-15 Thread Jacob Friis Larsen
execute /usr/bin/mysql_config --include. It's the path without include/mysql. In that case my configure is correct: ./configure --disable-all --with-mysqli=/usr/bin/mysql_config --with-mysql=/usr --with-apxs2 Also make sure you don't have multiple libraries installed, you should install

[PHP] Re: MIME files decoding

2004-07-15 Thread Aidan Lister
Hi Scheidecker, Try posting to [EMAIL PROTECTED], the author will be able to help you with your question. C.F. Scheidecker Antunes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, In order to use pear mimedecode.php I have a few questions that were not answered by the

RE: [PHP] PHP5 Windows not built with Soap Enabled?

2004-07-15 Thread Vincent Jansen
Did you adjust your php.ini file? -Original Message- From: Sean Malloy [mailto:[EMAIL PROTECTED] Sent: donderdag 15 juli 2004 3:50 To: [EMAIL PROTECTED] Subject: [PHP] PHP5 Windows not built with Soap Enabled? Am I the only one experiencing this: Fatal error: Class

[PHP] Regular Expressions

2004-07-15 Thread Arik Raffael Funke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello together, I am havin trouble with php regular expressions. I would like to implement following pattern Last Name:\s*(.*)\n. - From following text, Name: James Last Name: Jason Street: abc I get just 'Jason'. But what I currently get is: Jason

Re: [PHP] Regular Expressions

2004-07-15 Thread Marek Kilimajer
Arik Raffael Funke wrote: Hello together, I am havin trouble with php regular expressions. I would like to implement following pattern Last Name:\s*(.*)\n. - From following text, Name: James Last Name: Jason Street: abc I get just 'Jason'. But what I currently get is: Jason Street: abc Obviously

Re: [PHP] Regular Expressions

2004-07-15 Thread Matt M.
Obviously the new-line is missed. Any thoughts on this? sample code: ereg(Last Name:\s*(.*)\n, $strInput, $regs) echo $regs[1]; try this: ereg(Last Name:\s*(.*[^\n]), $strInput, $regs); echo $regs[1]; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Regular Expressions

2004-07-15 Thread Arik Raffael Funke
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 15 Jul 2004 08:02:13 -0500 Matt M. [EMAIL PROTECTED] wrote: Obviously the new-line is missed. Any thoughts on this? sample code: ereg(Last Name:\s*(.*)\n, $strInput, $regs) echo $regs[1]; try this: ereg(Last

[PHP] Re: Regular Expressions

2004-07-15 Thread Tim Van Wassenhove
In article [EMAIL PROTECTED], Arik Raffael Funke wrote: implement following pattern Last Name:\s*(.*)\n. I get just 'Jason'. But what I currently get is: Jason Street: abc This is behaviour because (.*) is greedy. As you noticed, it matched Jason \nStreet:abc /Last Name:\s+(.*?)\n/ --

Re: [PHP] Regular Expressions

2004-07-15 Thread Jason Wong
On Thursday 15 July 2004 21:15, Arik Raffael Funke wrote: However if I have, Last Name: Street: Teststreet (no entry after last name) Both search strings return me: Street: Teststreet Also why doesn't Last Name:\s*(.*)$ work, and neither ^Last Name:\s*(.*). Both strings are

[PHP] Log all GET AND POST?

2004-07-15 Thread Robert Sossomon
I was wondering if anyone knew of a way to log all GET and POST information being passed to a log file? Thanks, Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Log all GET AND POST?

2004-07-15 Thread Jay Blanchard
[snip] I was wondering if anyone knew of a way to log all GET and POST information being passed to a log file? [/snip] Yes. Create a log file. Pass all GET and POST information to it. Over and over. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] PHP5 release HTTP Authentication not working on FreeBSD.

2004-07-15 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Guys, I've just upgraded from 5.0 rc3 to 5.0 release on freeBSD (using the ports) and now find that HTTP Authentication dosent work. Here is the test script that i am using: ?php ~ error_reporting(E_ALL); ~

RE: [PHP] Dynamic to Static

2004-07-15 Thread Robert Sossomon
Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it statically in order for pages to display more quickly when visitors access the site? If so, what solutions are you using to achieve this? I looked at doing it, wrote a single PHP-page that when I accessed would make static

[PHP] problem including images in safe_mode

2004-07-15 Thread Frank Holtschke
Hall all, i have sometimes problems to include images. the reason are substrings like ? in the image. in that case the php-parser tries to parse the string and returns the error: parse error, unexpected ',' in unforunatly there in no other way to include the image, cause the server runs in

Re: [PHP] Log all GET AND POST?

2004-07-15 Thread James E Hicks III
On Thursday 15 July 2004 09:58 am, Robert Sossomon wrote: I was wondering if anyone knew of a way to log all GET and POST information being passed to a log file? Thanks, Robert $DEBUG_DATA = $_SERVER['PHP_SELF'].\n; while (list ($key, $val) = each ($_REQUEST)) { if

[PHP] including external C header files and libraries

2004-07-15 Thread Jeremy Booker
I have a 3rd party SDK written in C. It includes a compiled .a file and a header file (.h). Is there any way that I can call the functions included in the SDK from within a php script? Regards, Jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] problem including images in safe_mode

2004-07-15 Thread Jason Wong
On Thursday 15 July 2004 19:52, Frank Holtschke wrote: i have sometimes problems to include images. the reason are substrings like ? in the image. in that case the php-parser tries to parse the string and returns the error: parse error, unexpected ',' in unforunatly there in no other way

[PHP] File locking in PHP???

2004-07-15 Thread Scott Fletcher
Hi! I saw the php function flock(), since I never used it before so I thought I would ask you folks a couple of questions. 1) Is this function good or is there a better function somewhere that I'm not aware of? 2) If the flock() activated the file lock then is it possible that I manually unlock

Re: [PHP] Log all GET AND POST?

2004-07-15 Thread raditha dissanayake
Robert Sossomon wrote: I was wondering if anyone knew of a way to log all GET and POST information being passed to a log file? The GET stuff is already in your apache log file. The POST stuf you probably don't want to log because it can be rather huge if you are dealing with things like file

Re: [PHP] problem including images in safe_mode

2004-07-15 Thread Frank Holtschke
Jason Wong wrote: On Thursday 15 July 2004 19:52, Frank Holtschke wrote: i have sometimes problems to include images. the reason are substrings like ? in the image. in that case the php-parser tries to parse the string and returns the error: parse error, unexpected ',' in unforunatly there in no

Re: [PHP] File locking in PHP???

2004-07-15 Thread Matt M.
Hi! I saw the php function flock(), since I never used it before so I thought I would ask you folks a couple of questions. did you read all of the user comments on http://us2.php.net/flock There is a bunch of good info in there -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] File locking in PHP???

2004-07-15 Thread Scott Fletcher
Yea, read that, very good info there. Alright, I'll make one from scratch and do some testing to find what need to be add/change/remove to make it more a rock solid script. Boy, it remind me of Perl. Thanks, FletchSOD Matt M. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! I

Re: [PHP] File locking in PHP???

2004-07-15 Thread Scott Fletcher
Nah! I'll settle for a simplier one... file_exists() by checking to see if the file exist then spit out the error message. Meaning the file is in use... FletchSOD Matt M. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! I saw the php function flock(), since I never used it

[PHP] PHP upgrade... issues???

2004-07-15 Thread Tristan . Pretty
I've just got this mail from my host... = Dear customer, This email is sent to inform you that we'll upgrade the PHP version on your server to the latest stable version 4.3.8 within the next hour. = Are there any issues that I need to panic about...? I'm off to google

Re: [PHP] PHP upgrade... issues???

2004-07-15 Thread John W. Holmes
[EMAIL PROTECTED] wrote: I've just got this mail from my host... = Dear customer, This email is sent to inform you that we'll upgrade the PHP version on your server to the latest stable version 4.3.8 within the next hour. = Are there any issues that I need to panic

Re: [PHP] PHP upgrade... issues???

2004-07-15 Thread Jordi Canals
[EMAIL PROTECTED] wrote: This email is sent to inform you that we'll upgrade the PHP version on your server to the latest stable version 4.3.8 within the next hour. = Are there any issues that I need to panic about...? Don't worry about, I'm sure you will have any problem as it only

[PHP] date difference

2004-07-15 Thread JOHN MEYER
Hello, Is there a function to determine the difference between two dates? I am asking so I can do some date verification for COPA. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] ereg question/prob...

2004-07-15 Thread bruce
hi... i have the following... $file = .txt; ereg((\.)([a-z0-9]{3,5})$, $file, $regs); echo ww = .$regs. brbr; i'm trying to figure out how to get the portion of the regex that's the extension of the file. my understanding of the docs, says that the extension should be in the $reg

[PHP] Re: ereg question/prob...

2004-07-15 Thread Tim Van Wassenhove
In article [EMAIL PROTECTED], Bruce wrote: $file = .txt; ereg((\.)([a-z0-9]{3,5})$, $file, $regs); echo ww = .$regs. brbr; i'm trying to figure out how to get the portion of the regex that's the extension of the file. my understanding of the docs, says that the extension should be

[PHP] Re: [mysql]Problem with PHP5

2004-07-15 Thread Ciprian Constantinescu
I have included the extension. Now I get Unable to load dynamic library 'C:\php\ext\php_mysql.dll' - The specified procedure could not be found I have in Windows\System32 the file libmysql.dll. I have also put it in the php\ext directory without any result. -- PHP General Mailing List

Re: [PHP] PHP upgrade... issues???

2004-07-15 Thread Tristan . Pretty
Phew! However, While reading about php upgrades, I've got the impression that version 5, will not support MySQL by default... Does that mean that I'll have to ensure my hosts install an extra module, or worse case senario, I'll have to re-write all my pages, to take new code into effect... I'

[PHP] Problem with ImageJPEG and quality 75

2004-07-15 Thread Ewout
I have a problem with my image resize function When i resize/save an image with 'ImageJPEG($DEST_IMAGE,$OUTPUT_FILE)' everything works fine, but with 'ImageJPEG($DEST_IMAGE,$OUTPUT_FILE,100)' it displays only the first half of the image, the bottom is blank any suggestions on how to fix this ?

[PHP] How to tell if the file is already locked with flock()???

2004-07-15 Thread Scott Fletcher
Hi! How do we tell if the file is already locked when someone use a flock() on the file?? FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Andrew Wood
I'm trying to use PHP to read text from an HTML textarea form field and store in in MySQL using the longtext data type but it's cutting off everything after the first carriage return. I suspect I need to iterate through the text looking for CRs then do something? But I don't know what. Can

RE: [PHP] How to tell if the file is already locked with flock()???

2004-07-15 Thread Jay Blanchard
[snip] How do we tell if the file is already locked when someone use a flock() on the file?? [/snip] If your flock attempt returns FALSE then it is likely locked already -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Vail, Warren
http://www.php.net/manual/en/function.addslashes.php Warren Vail -Original Message- From: Andrew Wood [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 12:19 PM To: php-gen Subject: [PHP] Storing text with carriage returns in MySQL I'm trying to use PHP to read text from an

AW: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Ron Stiemer
Hi Andrew, I'm also saving html input from textarea fields into my msql DB...but try to use the filed type TEXT instead of LONGTEXT that it should work fine. Greetings, Ron -Ursprüngliche Nachricht- Von: Andrew Wood [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 15. Juli 2004 21:19

RE: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Vail, Warren
The major difference between TEXT and LONGTEXT data types is the size (65k vs 4Meg). The function addslashes() will resolve many user input problems where the user; Inputs a quoted value in the middle of his string. Uses and and in text. Inputs other ASCII control characters like tab and bell

[PHP] Re: ereg question/prob...

2004-07-15 Thread Red Wingate
$regs is an array not a string ! try print_r or var_dump to determine $regexp's content Tim Van Wassenhove wrote: In article [EMAIL PROTECTED], Bruce wrote: $file = .txt; ereg((\.)([a-z0-9]{3,5})$, $file, $regs); echo ww = .$regs. brbr; i'm trying to figure out how to get the portion of the

[PHP] Re: PHP5 release HTTP Authentication not working on FreeBSD.

2004-07-15 Thread Red Wingate
known problem, will be fixed soon in 5.0.1 which should be released asap William Bailey wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Guys, I've just upgraded from 5.0 rc3 to 5.0 release on freeBSD (using the ports) and now find that HTTP Authentication dosent work. Here is the

[PHP] Re: Regular Expressions

2004-07-15 Thread Red Wingate
Yep, but to avoid his problem with empty Strings he should use something like: /Last Name: *(.*?)\n/ outerwise \s* will match the first newline and continue to the end of the next line ! Tim Van Wassenhove wrote: In article [EMAIL PROTECTED], Arik Raffael Funke wrote: implement following pattern

[PHP] Re: Regular Expressions

2004-07-15 Thread Red Wingate
Oh guess it would be even better and faster to only use: /Last Name:([^\n]*)/ and trim() the result :-) -- red Red Wingate wrote: Yep, but to avoid his problem with empty Strings he should use something like: /Last Name: *(.*?)\n/ outerwise \s* will match the first newline and continue to the end

Re: [PHP] How to tell if the file is already locked with flock()???

2004-07-15 Thread Red Wingate
http://de2.php.net/manual/en/function.is-writeable.php Jay Blanchard wrote: [snip] How do we tell if the file is already locked when someone use a flock() on the file?? [/snip] If your flock attempt returns FALSE then it is likely locked already -- PHP General Mailing List

[PHP] Re: Regular Expressions

2004-07-15 Thread Tim Van Wassenhove
In article [EMAIL PROTECTED], Red Wingate wrote: Oh guess it would be even better and faster to only use: /Last Name:([^\n]*)/ In most environments is strpos and substr even faster ;) -- Tim Van Wassenhove http://home.mysth.be/~timvw -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Andrew Wood
That only seems to work for quotation marks and apostrophes etc. Not carriage returns? Unless I'm missing something. On 15 Jul 2004, at 20:23, Vail, Warren wrote: http://www.php.net/manual/en/function.addslashes.php Warren Vail -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: File locking in PHP???

2004-07-15 Thread Manuel Lemos
Hello, On 07/15/2004 12:28 PM, Scott Fletcher wrote: Hi! I saw the php function flock(), since I never used it before so I thought I would ask you folks a couple of questions. 1) Is this function good or is there a better function somewhere that I'm not aware of? It depends on what you want to

Re: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Andrew Wood
Umm this is very weird - I've checked the database and the string is only stored upto the first carriage return everything else appears to be missing, BUT, when I display it in the webpage (using stripslashes()) the entire original message is intact - but on a single line!!! :S On 15 Jul

Re: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Matthew Sims
Umm this is very weird - I've checked the database and the string is only stored upto the first carriage return everything else appears to be missing, BUT, when I display it in the webpage (using stripslashes()) the entire original message is intact - but on a single line!!! :S Magic

Re: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Andrew Wood
Sorry, its the crap software I'm using to view the DB! phpMyadmin shows that yes, the text is all there with CRs. so it IS something at the display end? any ideas, cos I haven't aclue? cheers AW On 15 Jul 2004, at 21:28, Vail, Warren wrote: Perhaps you have another problem. Do you have PHPMyAdmin

RE: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Vail, Warren
Is your form method POST or GET, I know the browser will strip out returns, etc for a GET? Grabbing at straws here. Warren Vail -Original Message- From: Matthew Sims [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 1:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Storing text

RE: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Vail, Warren
Are you displaying it in a form control, like another TEXTAREA? Or are you displaying say in a table cell? I know that CR's are ignored by most normal html, unless coded between pre and /pre; Warren Vail -Original Message- From: Andrew Wood [mailto:[EMAIL PROTECTED] Sent: Thursday,

[PHP] Re: date difference

2004-07-15 Thread Torsten Roehr
John Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Is there a function to determine the difference between two dates? I am asking so I can do some date verification for COPA. Convert your dates to timestamps which will be 10-digit integers (the time since 1.1.1970 in

Re: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Brian Tully
Not sure if I understand the issue completely, but if it's a matter of displaying the text from the database you could use the nl2br function. http://us3.php.net/manual/en/function.nl2br.php Hope that helps, Brian on 7/15/04 4:40 PM, Andrew Wood at [EMAIL PROTECTED] wrote: Sorry, its the

Re: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread Jason Wong
On Friday 16 July 2004 03:52, Vail, Warren wrote: The function addslashes() will resolve many user input problems where the user; When using MySQL it is better to use the more specific: mysql_real_escape_string() Usually MySQL will strip slashes when the column is retrieved No. Slashes

Re: [PHP] How to tell if the file is already locked with flock()???

2004-07-15 Thread Scott Fletcher
Um, I think I'll stick to file_exist instead and to unlock, I'll grab the IP address in the text file and match it against the current browser of whoever is using before deleting the file. That way, I'll know who is the guilty party if the person doesn't finish whatever he/she is doing on the

[PHP] Got JavaScript error when using PHP's include()...

2004-07-15 Thread Scott Fletcher
When an include file contain plain JavaScript codes, with the echo command before and after the include file. I get the javascript error saying undefined jsTest... Anyone know why is that? --snip-- echo tabletrtd/td/tr/table; echo script type='text/javascript'; include('test.inc'); echo var

Re: [PHP] Log all GET AND POST?

2004-07-15 Thread Marek Kilimajer
Robert Sossomon wrote: I was wondering if anyone knew of a way to log all GET and POST information being passed to a log file? Thanks, Robert $get = serialize($_GET); $post = serialize($_POST); and store the variables somewhere, eg. database -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] PHP upgrade... issues???

2004-07-15 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: Phew! However, While reading about php upgrades, I've got the impression that version 5, will not support MySQL by default... Does that mean that I'll have to ensure my hosts install an extra module, or worse case senario, I'll have to re-write all my pages, to take new

Re: [PHP] Storing text with carriage returns in MySQL

2004-07-15 Thread John W. Holmes
Vail, Warren wrote: The function addslashes() will resolve many user input problems where the user; Inputs a quoted value in the middle of his string. Uses and and in text. Inputs other ASCII control characters like tab and bell (remember that one). addslashes() does not escapecharacters

Re: [PHP] File locking in PHP???

2004-07-15 Thread Curt Zirzow
* Thus wrote Scott Fletcher: Nah! I'll settle for a simplier one... file_exists() by checking to see if the file exist then spit out the error message. Meaning the file is in use... Don't use file_exists() for that, it will fail miserable with racing conditions. a better more portable way

Re: [PHP] Got JavaScript error when using PHP's include()...

2004-07-15 Thread Neal Owen
You defined jsTest after the include where it should be before. On Thu, 2004-07-15 at 16:24, Scott Fletcher wrote: When an include file contain plain JavaScript codes, with the echo command before and after the include file. I get the javascript error saying undefined jsTest... Anyone know

[PHP] problem with super global '$_REQUEST'

2004-07-15 Thread Dennis Gearon
I have a function in a class that unsets the superglobal $_REQUEST; Well, it's supposed to, it doesn't do it. I'm on version 4.2.3 of PHP. This page: http://us2.php.net/manual/en/language.variables.predefined.php#language.variables.superglobals says that $_REQUEST is a super global as of

Re: [PHP] problem including images in safe_mode

2004-07-15 Thread Jason Wong
On Thursday 15 July 2004 23:30, Frank Holtschke wrote: Even if you could prevent an included file from being parsed, I can't see how it would help you as you can't assign the contents to a variable. But you say that you sometimes have problems which implies that sometimes it works. Could

[PHP] Email Forms

2004-07-15 Thread PHP User
Hi, I am trying unsuccessfully to set up an email form and as far as I know my code is fine, but it won't send. I suspect that it's because my server requires authentication. Running my script on my Windows machine I get the following. Warning: mail() [function.mail

Re: [PHP] problem with super global '$_REQUEST'

2004-07-15 Thread Justin Patrin
You can't unset $_REQUEST. All it does is unset the reference to it in the current context. It still exists elsewhere. If you *really* want to get rid of $_REQUEST, you should do it this way: unset($GLOBALS['_REQUEST']); But I would advise against that. Why exactly are you unsetting a

Re: [PHP] How to tell if the file is already locked with flock()???

2004-07-15 Thread Marek Kilimajer
Scott Fletcher wrote: Um, I think I'll stick to file_exist instead and to unlock, I'll grab the IP address in the text file and match it against the current browser of whoever is using before deleting the file. That way, I'll know who is the guilty party if the person doesn't finish whatever

[PHP] Re: Email Forms

2004-07-15 Thread Manuel Lemos
Hello, On 07/15/2004 07:06 PM, Php User wrote: I am trying unsuccessfully to set up an email form and as far as I know my code is fine, but it won't send. I suspect that it's because my server requires authentication. Running my script on my Windows machine I get the following. Warning: mail()

[PHP] Encrypting passwords from page to page -mcrypt question

2004-07-15 Thread Scott Taylor
I would like to go from page to page, submitting the password through a GET query string. Of course I wouldn't want to do this unencrypted. So is mcrypt the best option? When submitting the data, would I also need to sumit the IV as well as the encrypted data? Or am I completely off base

Re: [PHP] Email Forms

2004-07-15 Thread Jason Wong
On Friday 16 July 2004 06:06, PHP User wrote: I am trying unsuccessfully to set up an email form and as far as I know my code is fine, but it won't send. I suspect that it's because my server requires authentication. Well does it or does it not require SMTP AUTH? If it does then the standard

[PHP] Re: problem with super global '$_REQUEST'

2004-07-15 Thread Dennis Gearon
OK, after lots of reading, I find out it's not possible to unset something that has been 'globalized' in a function, nor ANY global value. However, some online manual pages documented that it's possible to assign NULL to the value. Well that's NOT unset. But,that got me to thinking. What about

Re: [PHP] problem with super global '$_REQUEST'

2004-07-15 Thread Dennis Gearon
I found the answer, as my second post on this told. Why unset the globals? I plan on implementing filters on all User input to ALL scripts in the prepend file. And if someone wants to get a variable that was supplied by a user, they have to specifiy if it's going to be INT, STR(with options to

Re: [PHP] Re: problem with super global '$_REQUEST'

2004-07-15 Thread Justin Patrin
You *can* unset it, you just have to unset the place where it really sits. When you have a global in a function, then unset it, you only disconnect the variable. unset doesn't destroy a variable, it just breaks the reference. As I said in my earlier e-mail, using this *will* work (I tested it):

[PHP] Offset error

2004-07-15 Thread C.F. Scheidecker Antunes
Hello, error: PHP Notice: Undefined offset: 1 in /home/ant/test.app/teste3/getfiles.php on line 217 I have this Undefined offset error in PHP because I am trying to get a value from this $att[$k]-parameters[1]-value that sometimes does not exist with offset 1 as the parameters go up to 0

Re: [PHP] problem with super global '$_REQUEST'

2004-07-15 Thread Justin Patrin
Ok Why not just set the values in $_REQUEST then? AbstractEnvironment::stripTagsArr($_REQUEST); Or something like this: foreach($_REQUEST as $key = $val) { $_REQUEST[$key] = stripTagsNStuff($key, $val); } On Thu, 15 Jul 2004 15:45:45 -0700, Dennis Gearon [EMAIL PROTECTED] wrote: I found

Re: [PHP] Offset error

2004-07-15 Thread Justin Patrin
if(isset($att[$k]-parameters[1])) { //use $att[$k]-parameters[1]-value } or, assuming indexes start at 0 and are sequential: if(count($att[$k]-parameters) 1) { //use $att[$k]-parameters[1]-value } On Thu, 15 Jul 2004 17:08:16 -0600, C.F. Scheidecker Antunes [EMAIL PROTECTED] wrote: Hello,

[PHP] image

2004-07-15 Thread php
how do you catch an image request and instead of the image display php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] model view and control with php

2004-07-15 Thread asolomon15
I wanted to know has anyone implemented the model view and control (mvc) with php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] model view and control with php

2004-07-15 Thread Justin Patrin
Yep, just search the list for previous MVC discussions. On Thu, 15 Jul 2004 20:09:07 -0400, asolomon15 [EMAIL PROTECTED] wrote: I wanted to know has anyone implemented the model view and control (mvc) with php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] image

2004-07-15 Thread Jason Wong
On Friday 16 July 2004 08:06, php wrote: how do you catch an image request and instead of the image display php? Please elaborate. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications

Re: [PHP] image

2004-07-15 Thread php
like i call an image if the img tag but instead of loading the image it loads a php script Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Friday 16 July 2004 08:06, php wrote: how do you catch an image request and instead of the image display php? Please elaborate.

RE: [PHP] image

2004-07-15 Thread Vail, Warren
I would recommend you start here; http://www.php.net/manual/en/ref.image.php As I understand you are trying to understand the process where an image tag in hmtl causes a browser to request an image be loaded, but because the image statement looks something like the following; img

Re: [PHP] image

2004-07-15 Thread Jason Wong
On Friday 16 July 2004 08:43, php wrote: Please do not top post. like i call an image if the img tag but instead of loading the image it loads a php script img src=my.php It's still not clear what your eventual goal is. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source

Re: [PHP] image

2004-07-15 Thread php
thanks Warren Vail [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I would recommend you start here; http://www.php.net/manual/en/ref.image.php As I understand you are trying to understand the process where an image tag in hmtl causes a browser to request an image be loaded, but

Re: [PHP] Encrypting passwords from page to page -mcrypt question

2004-07-15 Thread Jordi Canals
Scott Taylor wrote: I would like to go from page to page, submitting the password through a GET query string. Of course I wouldn't want to do this unencrypted. So is mcrypt the best option? I think to submit the password on the query string is a really bad idea. What will happend if a user

[PHP] Embedded Email Directives

2004-07-15 Thread Jordi Canals
Dennis Gearon wrote: remove carriage returns to prevent embedded email directives In an other thread, I readed that sentence. I'm interested to find more information about that. I have some mail forms and want to make them as secure and possible, but do not know about what and where should I

  1   2   >