Re: [PHP] Regex to wrap a href= tag around a p tag

2005-12-01 Thread M
The second parameter to preg_replace is the replacement string (with optional backreferences), not another patern. Use '/p\(.*)(?=\/p)/' for patern, 'a href=edit_paragraphtext=$1p$1' for replacement string, however, this does not urlencode the text parameter. You can use preg_replace_callback

[PHP] Re: problem in installing php5

2005-12-01 Thread Ben
R.Vijay Daniel wrote: is that possible to install php5 in redhat7.2 ?. Yes, but it is impossible to help you without more information. What error messages are you receiving, what configure options are you using, what version of libxml2 do you have installed, do you have the libxml2

Re: [PHP] Passing objects between pages

2005-12-01 Thread Jochem Maas
Matt Monaco wrote: What is the best way to pass an object between pages? Currently I am first serializing, then doing a base64_encode, this doesn't seem entirely efficient. (Especially the encode). I am however using the encode because I have the serialized object as the value of a hidden

[PHP] $_POST returns Array when getting data from multiple dropdown

2005-12-01 Thread Erfan Shirazi
Hi all I want to get all data passed on to a certain page, I use this to make it happen: foreach($_POST as $key = $tempvalue) { $cVariable .= $key.=.$tempvalue.; } This works fine as long it is textfields etc... I.e: $cVariable //Contains foobar=something But if it is multiple

RE: [PHP] FW: Merging two images (GD PNG)

2005-12-01 Thread Albert
Jochem Maas wrote: the output image resource you create should be created with $xxx = imagecreatetruecolor(1000,1000), you should call imagealphablending($xxx, true) on the output image resource after you create and before copying [which you are as far as I can tell], and you should use

RE: [PHP] $_POST returns Array when getting data from multiple dropdown

2005-12-01 Thread Albert
Erfan Shirazi wrote: I want to get all data passed on to a certain page, I use this to make it happen: foreach($_POST as $key = $tempvalue) { $cVariable .= $key.=.$tempvalue.; } Try: ? function getValues($arrayWithValues, $pre='') { $tmpVal = ''; foreach($arrayWithValues as

RE: [PHP] $_POST returns Array when getting data from multiple dropdown

2005-12-01 Thread Ahmed Saad
On 12/1/05, Erfan Shirazi [EMAIL PROTECTED] wrote: foreach($_POST as $key = $tempvalue) { $cVariable .= $key.=.$tempvalue.; } Is there anyway I can get the values chosen instead of just Array? check for that first using is_array() and then loop through it appending it to the string

RE: [PHP] Database Class Help

2005-12-01 Thread Ahmed Saad
On 12/1/05, Albert [EMAIL PROTECTED] wrote: The downside of this is that you do not have persistent connections which last beyond the end of the script. Maybe it's not a real downside :) http://wordpress.org/support/topic/42389 and

Re: [PHP] hi everyone

2005-12-01 Thread Mehmet Fatih AKBULUT
hi. me is registered but till now have had no crucial questions to ask :p but soon will need professional help on php ldap functions :) then will ask for help from you masters :p Regards. Bye for now.

Re: [PHP] MVC platform choice.

2005-12-01 Thread Ahmed Saad
On 11/30/05, Gregory Machin [EMAIL PROTECTED] wrote: Hi.. Any body recomend a good MVC platform that is easy to work with, and build on... http://www.agavi.org 0.10rc is already in the svn -ahmed

RE: [PHP] FW: Merging two images (GD PNG)

2005-12-01 Thread Albert
Jochem Maas wrote: try this site: http://php.amnuts.com/ I had a look at the way Andy does the masking and changed my code to do a pixel compare and only transfer the pixels to the satellite image I needed. This now takes quite a bit longer but at least everything is working as it should.

Re: [PHP] FW: Merging two images (GD PNG)

2005-12-01 Thread Jochem Maas
Albert wrote: Jochem Maas wrote: try this site: http://php.amnuts.com/ I had a look at the way Andy does the masking and changed my code to do a pixel compare and only transfer the pixels to the satellite image I needed. This now takes quite a bit longer but at least everything is

[PHP] Re: Using POST to pass variables

2005-12-01 Thread David Robley
Todd Cary wrote: Except this passes the message in the URL. Is there a way to pass variables as a POST (not in the URL)? If you use the POST method, the message won't be passed in the URL - unless there is something you aren't telling us :-) I have a class that creates a new socket,

[PHP] Automatic log out

2005-12-01 Thread Adrian Bruce
Hi I currently use an automatic logout out system that sets a time out in two ways. (If the ip address on computer is recognized then set timeout to 10 mins, if not then set to 2 mins.) 1) The time out setting is used to create a meta refresh tag that will re-direct the user to the

RE: [PHP] custom CAD directory/file browser

2005-12-01 Thread Jay Blanchard
[snip] You can include information in the query string of the URL a href=foo.php?directory=/path/to/may/files/Click Here/a The information would be available in the $_GET array as $_GET['directory'] This did the trick but, how do I clear out the $_GET array? As I move around the

[PHP] Re: $_POST won't work for me

2005-12-01 Thread Matt Monaco
As I learned recently, register_globals should always be off, you do not need it to enable GET and POST variables. I believe enabling it will do something like set $_POST[name] to $name automatically (of course there's always the 90% chance that I'm absolutely wrong). You might want to see if

Re: [PHP] page duration tracking

2005-12-01 Thread Gustavo Narea
Hello. Jesús Fernández wrote: I think you could use cookies for this. When the user loads the page you can write a cookie with the timestamp and the page loaded writen on it. Then when the user request another page, load if the cookie exists and then you can calculate the time spent on a

Re: [PHP] MVC platform choice.

2005-12-01 Thread Greg Donald
On Thu, 1 Dec 2005, Ahmed Saad wrote: http://www.agavi.org 0.10rc is already in the svn Do you still have to reassign the data in the view for use in the template after having already created it once in the action? That is quite the pain. -- Greg Donald Zend Certified Engineer MySQL

Re: [PHP] custom CAD directory/file browser

2005-12-01 Thread Marlin Unruh
Jay Blanchard wrote: [snip] http://localhost/cad.php?directory=c:/suncosys/cyl/../sbr/../act/2d/obsolete /.. [/snip] I would have to see your code to see how the $_GET array grows. [/snip] Following is my code as it is. I wrote something similar in Python but it creates static html pages

Re: [PHP] shortest possible check: field is set, integer or 0

2005-12-01 Thread Jochem Maas
Ray Hauge wrote: Richard Lynch wrote: On Wed, November 30, 2005 5:10 pm, Chris Lott wrote: What is the shortest possible check to ensure that a field coming from a form as a text type input is either a positive integer or 0, but that also accepts/converts 1.0 or 5.00 as input?

Re: [PHP] shortest possible check: field is set, integer or 0

2005-12-01 Thread Steve Edberg
Only problem with intval() is that it returns 0 (a valid value) on failure, so we need to check for 0 first. Adding more secure checks would make this more than just a one-liner, eg; $_CLEAN['x'] = false; if (isset($_POST['x'])) { if (0 == 1*$_POST['x']) { $_CLEAN['x'] = 0; } else

[PHP] CDATA in PHP DOM

2005-12-01 Thread Guy Brom
Any idea what's wrong with the following? ($this_item['description'] has some html text I would like to paste as a CDATA section) $item-appendChild($dom-createElement('description', $dom-createCDATASection($this_item['description']))); Thanks! -- PHP General Mailing List

Re: [PHP] Re: $_POST won't work for me

2005-12-01 Thread Norbert van Nobelen
register_globals=on will result in a totally non transparant way of variables from a post being usuable. For example: You post the variable tt_name with a value, than echo $tt_name will show that value without you having to assign it from the post. It is not only insecure, it is also very bad

[PHP] do this OR that

2005-12-01 Thread Judson Vaughn
Group, I have a function that grades a quiz. I want to show a page if the student scores 80% or above. Currently, the script reads: snippet $total = ($mygrade/$quiz-grade) ; if ($total .80) { /snippet That means that if you score 80% precisely, you don't get the follow-up script. I

RE: [PHP] do this OR that

2005-12-01 Thread Jim Moseby
Group, I have a function that grades a quiz. I want to show a page if the student scores 80% or above. Currently, the script reads: snippet $total = ($mygrade/$quiz-grade) ; if ($total .80) { /snippet That means that if you score 80% precisely, you don't get the

Re: [PHP] do this OR that

2005-12-01 Thread Richard Davey
Hi Judson, Thursday, December 1, 2005, 12:40:16 PM, you wrote: I believe I should re-write it like this: snippet $total = ($mygrade/$quiz-grade) ; if ($total .80 | .80) { /snippet Is that right? Thanks in advance for your help. 'OR' is ||, but you

Re: [PHP] MVC platform choice.

2005-12-01 Thread Richard K. Miller
On Dec 1, 2005, at 3:14 AM, Ahmed Saad wrote: On 11/30/05, Gregory Machin [EMAIL PROTECTED] wrote: Hi.. Any body recomend a good MVC platform that is easy to work with, and build on... http://www.agavi.org 0.10rc is already in the svn I haven't tried these yet, but these are

Re: [PHP] shortest possible check: field is set, integer or 0

2005-12-01 Thread Jochem Maas
Steve Edberg wrote: Only problem with intval() is that it returns 0 (a valid value) on I knew that. :-) failure, so we need to check for 0 first. Adding more secure checks do we? given that FALSE casts to 0. would make this more than just a one-liner, eg; $_CLEAN['x'] = false; if

[PHP] weird error, cookies??

2005-12-01 Thread Angelo Zanetti
Hi guys. Been working on my site and then been trying to navigate through it, the once page redirects to another. then all of a sudden I get this weird popup (in mozilla) Redirection limit for this URL exceeded. Unable to load requested page Also IE seems to timeout. The page redirects

[PHP] Re: CDATA in PHP DOM

2005-12-01 Thread Rob Richards
Guy Brom wrote: Any idea what's wrong with the following? ($this_item['description'] has some html text I would like to paste as a CDATA section) $item-appendChild($dom-createElement('description', $dom-createCDATASection($this_item['description']))); createElement takes a string not a

Re: [PHP] weird error, cookies??

2005-12-01 Thread David Grant
Hi Angelo, This simply means that the redirection keeps going, like so: foo.php ?php header('Location: /bar.php'); ? bar.php ?php header('Location /foo.php'); ? Check the logic in your application that decides if the user gets redirected and make sure you're not making any incorrect

Re: [PHP] weird error, cookies??

2005-12-01 Thread Jochem Maas
Angelo Zanetti wrote: Hi guys. Been working on my site and then been trying to navigate through it, the once page redirects to another. then all of a sudden I get this weird popup (in mozilla) Redirection limit for this URL exceeded. Unable to load requested page Also IE seems to timeout.

Re: [PHP] shortest possible check: field is set, integer or 0

2005-12-01 Thread Steve Edberg
At 5:30 PM +0100 12/1/05, Jochem Maas wrote: Steve Edberg wrote: Only problem with intval() is that it returns 0 (a valid value) on I knew that. :-) I figured so, but I thought I'd make it explicit for the mailing list... failure, so we need to check for 0 first. Adding more secure checks

[PHP] Re: CDATA in PHP DOM

2005-12-01 Thread Guy Brom
worked!! Rob Richards [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Guy Brom wrote: Any idea what's wrong with the following? ($this_item['description'] has some html text I would like to paste as a CDATA section) $item-appendChild($dom-createElement('description',

[PHP] Problems with PHP and Apache 2.x 404 ErrorDocument handlers

2005-12-01 Thread Jason Z
I used to have a number of sites direct 404 errors towards PHP scripts for error handling and the such. Recently I upgraded my PHP installs to 4.4.1(from 4.3.11) with the configure parameters listed below. Now, none of my PHP handlers are functioning. They are all returning 0 size responses.

[PHP] Manage directory security on iis

2005-12-01 Thread Mariano Guadagnini
Hi guys, I wonder if it would be able to manage access to some directories using php, on a website using iis 6.0. To be more clear, the application i'm working on has a database with users, accounts and an administrator. So, i need to grant access to specific directories in the site to the

RE: [PHP] Manage directory security on iis

2005-12-01 Thread Jay Blanchard
[snip] Hi guys, I wonder if it would be able to manage access to some directories using php, on a website using iis 6.0. To be more clear, the application i'm working on has a database with users, accounts and an administrator. So, i need to grant access to specific directories in the site to

[PHP] javascript, forms and php

2005-12-01 Thread Kelly Meeks
Hi all, I'm hoping someone can help me with this problem. I'm using javascript for some client side field validation in a form (method=post) that gets managed via php. This particular form makes extensive use of checkboxes. I've always like how when named properly (field name of

Re: [PHP] Manage directory security on iis

2005-12-01 Thread Richard Lynch
On Thu, December 1, 2005 1:03 pm, Mariano Guadagnini wrote: Hi guys, I wonder if it would be able to manage access to some directories using php, on a website using iis 6.0. To be more clear, the application i'm working on has a database with users, accounts and an administrator. So, i need to

Re: [PHP] javascript, forms and php

2005-12-01 Thread Brent Baisley
You should have posted this to a javascript board, it has nothing to do with PHP. That said, if the form field name contains special characters, like [], you can reference it like this: document.formname.elements['checkbox1[]']. Use the elements[] reference style. On Dec 1, 2005, at 12:42

[PHP] how to resolve this conflict?

2005-12-01 Thread Bing Du
Hello, I've already posted it on the MySQL General Discussion list. Thought I wanted to try this list as well in case somebody knows. 5.0.11-beta-standard is already running. Now I need to install php-mysql which requires mysql-3.23.58-15.RHEL3.1.i3. Here is what I did and the errors I

[PHP] Question about Request.php

2005-12-01 Thread Danilo Azevedo
Hi, my name is Danilo, i am from Brazil I need your assistence with a code made by your self, if you are not too busy :P I am using PHP/XML with your request.php file, but i cant get some attributes from a Tag, everything is working fine, but it :( The Tag name is RUA and have some attributes that

Re: [PHP] Question about Request.php

2005-12-01 Thread jonathan
do a: print_r($_REQUEST) on the php page. if nothing, things aren't configured correctly or you aren't passing in variables correctly. On Dec 1, 2005, at 12:15 PM, Danilo Azevedo wrote: Hi, my name is Danilo, i am from Brazil I need your assistence with a code made by your self, if you

[PHP] Re: how to resolve this conflict?

2005-12-01 Thread James Benson
You obviously need to remove the old package or compile your own from source Bing Du wrote: Hello, I've already posted it on the MySQL General Discussion list. Thought I wanted to try this list as well in case somebody knows. 5.0.11-beta-standard is already running. Now I need to

[PHP] Re: Question about Request.php

2005-12-01 Thread James Benson
Try checking for the error after:- $Req-sendRequest(); Example:- $response = $Req-sendRequest(); if (PEAR::isError($response)) { die($response-getMessage()); } $Response = $Req-getResponseBody(); You may also want to include some options like so:- $options = array( 'method' = 'GET',

[PHP] Re: Question about Request.php

2005-12-01 Thread Danilo Azevedo
Jonathan, thanks for ur assistence, i did the print_r($_REQUEST) , its working fine all my get vars returned i did all my website using the Request.php/PEAR class but only this page dont work, because i never used a Tag with attributes before :(

Re: [PHP] Manage directory security on iis

2005-12-01 Thread Mariano Guadagnini
Well, the htaccess on iis seems to be the best solution for us, thanks people! Cheers, Mariano -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 30/11/2005 -- PHP General Mailing List

Re: [PHP] Lowest PHP version to work with MySQL 4.1.x

2005-12-01 Thread AmirBehzad Eslami
Brent and Oliver, Thank you for your assistance. I found some notable solutions from MySQL Forums: http://forums.mysql.com/read.php?11,6400,6400#msg-6400 Regards, Behzad

Re: [PHP] Re: $_POST won't work for me

2005-12-01 Thread Unknown Unknown
I have heard from someone you must keep turning register_globals on and off while restarting your web server for $_POST and $_GET to work properly although I'm not very sure.. On 12/1/05, Norbert van Nobelen [EMAIL PROTECTED] wrote: register_globals=on will result in a totally non transparant

[PHP] PHP server problem

2005-12-01 Thread Eric Lommatsch
Hello, This is my first time posting to this particular list, so please be patient with me. I am not exactly sure if this is the right list to post this to or if the description of what is happening will be enough to really make what my questions is We have a Linux server that we use to run

Re: [PHP] PHP server problem

2005-12-01 Thread John Nichel
Eric Lommatsch wrote: Hello, This is my first time posting to this particular list, so please be patient with me. I am not exactly sure if this is the right list to post this to or if the description of what is happening will be enough to really make what my questions is We have a Linux

Re: [PHP] script won't work on other server

2005-12-01 Thread Unknown Unknown
What are the server types like Apache IIS or something else? i am asking because the webserver might not give the PHP script all the data from the browser like browser name and stuff... On 11/30/05, Peppy [EMAIL PROTECTED] wrote: Short tags are on on both servers. - Original Message

[PHP] Re: how to resolve this conflict?

2005-12-01 Thread Bing Du
James Benson wrote: You obviously need to remove the old package or compile your own from source Bing Du wrote: Hello, I've already posted it on the MySQL General Discussion list. Thought I wanted to try this list as well in case somebody knows. 5.0.11-beta-standard is already

[PHP] Re: PHP server problem

2005-12-01 Thread James Benson
It probably modified your httpd.conf, if your being prompted to download the file it sounds like the following line is missing from it, AddType application/x-httpd-php .php .phtml Eric Lommatsch wrote: Hello, This is my first time posting to this particular list, so please be patient

Re: [PHP] Database Class Help

2005-12-01 Thread Unknown Unknown
Echo should be echo and also are you sure that you have those tables and databases?? make some DB's called table1 and table 2 and in that make tables db1 and db2 that might work... On 12/1/05, Ahmed Saad [EMAIL PROTECTED] wrote: On 12/1/05, Albert [EMAIL PROTECTED] wrote: The downside of this

FW: [PHP] PHP server problem

2005-12-01 Thread Eric Lommatsch
I have looked at this page and and in the httpd.conf file that file had this information in it. But when I look at the httpd2.conf file this file is missing this information I have tried adding this information to this file I am still getting the same result. One thing that I did notice in

Re: FW: [PHP] PHP server problem

2005-12-01 Thread James Benson
Have you tried removing the ifdefine HAVE_PHP4 James Eric Lommatsch wrote: I have looked at this page and and in the httpd.conf file that file had this information in it. But when I look at the httpd2.conf file this file is missing this information I have tried adding this information

Re: FW: [PHP] PHP server problem

2005-12-01 Thread James Benson
I cant see why you have two httpd.conf files, unless that app installed another, in which case I would remove the ifdefine HAVE_PHP4 block, im sure thats only their for when/if you need to disable PHP James Eric Lommatsch wrote: I have looked at this page and and in the httpd.conf file

[PHP] Re: Problems with PHP and Apache 2.x 404 ErrorDocument handlers

2005-12-01 Thread James Benson
Well if all other PHP scripts work then it must be a problem with your script or something changed in the latest PHP version that your script used, if you post the code someone may be able to say if something is wrong with it. James Jason Z wrote: I used to have a number of sites direct

RE: FW: [PHP] PHP server problem

2005-12-01 Thread Eric Lommatsch
I tried removing the ifdefine HAVE_PHP4 block and the result with the applications that we have installed is still the same. Just for testing purposes I created a simple Hello World php script and tried running this from this system and this appears to have run correctly. But any of the more

[PHP] Re: Automatic log out

2005-12-01 Thread James Benson
Store the last time someone accessed their session into the $_SESSION array then when requesting a protected page just check x amount of time has not passed, if x amount has time has passed redirect to a login page or re-enter their user password small example you would use on the top of

[PHP] Re: Automatic log out

2005-12-01 Thread James Benson
it would also be nice to stop the pages displaying after a time out when a user presses the back button! For that you would need to destroy the session data, use session_destroy(); http://php.net/session_destroy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Submit Form Values To Parent

2005-12-01 Thread Shaun
Hi, How can I get the form values submitted from an iframe where the target is the parent window? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MVC platform choice.

2005-12-01 Thread Ahmed Saad
Hi Greg, On 12/1/05, Greg Donald [EMAIL PROTECTED] wrote: Do you still have to reassign the data in the view for use in the template after having already created it once in the action? That is quite the pain. in View::execute() you can quickly import all request parameters or attributes

[PHP] Re: Submit Form Values To Parent

2005-12-01 Thread DvDmanDT
Like you do it if the target was the same window? PHP doesn't know which window is the target.. -- // DvDmanDT mail: dvdmandt¤telia.com msn: dvdmandt¤hotmail.com Shaun [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi, How can I get the form values submitted from an iframe

Re: [PHP] Re: Problems with PHP and Apache 2.x 404 ErrorDocument handlers

2005-12-01 Thread Jason Z
Unfortunately, and even more frustrating, I tried swapping out my script with the basic 'hello world'. It still doesn't run (when triggered via the 404 ErrorDocument parameter), but direct access run's just fine. I attempted to debug (per the PHP faq (

Re: [PHP] weird error, cookies??

2005-12-01 Thread Matt Monaco
Check your http access file to verify what david and jochem have said, you should see lines upon lines of access for the pages in question. Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Angelo Zanetti wrote: Hi guys. Been working on my site and then been trying to

Re: [PHP] script won't work on other server

2005-12-01 Thread Peppy
This info is for the server where the script does not work: Apache/1.3.33 (Unix) PHP/4.3.10 FreeBSD cliffb55.iserver.net 4.7-RELEASE-p28 FreeBSD 4.7-RELEASE-p28 #42: Tu i386 This info is for the server where the script works: Apache/2.0.40 (Red Hat Linux) PHP Version 4.3.2 Linux

Fwd: [PHP] script won't work on other server

2005-12-01 Thread Unknown Unknown
-- Forwarded message -- From: Unknown Unknown [EMAIL PROTECTED] Date: Dec 1, 2005 8:26 PM Subject: Re: [PHP] script won't work on other server To: Peppy [EMAIL PROTECTED] execute this code: print_r($_SERVER); on a page, what is the result? On 12/1/05, Peppy [EMAIL PROTECTED]