Re: [PHP] Regex to wrap tag around a tag

2005-12-01 Thread M
The second parameter to preg_replace is the replacement string (with 
optional backreferences), not another patern.


Use '/(.*)(?=<\/p>)/' for patern, 'href="edit_paragraph&text=$1">$1' for replacement string, however, 
this does not urlencode the text parameter. You can use 
preg_replace_callback instead of preg_replace to encode it in the 
callback function.


This won't work for long paragraphs because the lenght of GET request is 
limited. Change it to use forms instead.


Shaun wrote:

Hi,

I am trying to read the contents of a file into a string and wrap an href=""> tag around every  tag and output it to the browser. This is how 
far I have got:


// Get file contents
$file_contents = file_get_contents($file);
// Replace  tags
$file_contents = preg_replace('/^[a-z][0-9]<\/p>$/', '/^href="edit_paragraph&text="">\[a-z][0-9]<\/p><\/a>$/', $file_contents);

// Output to browser
echo $file_contents;

I have two problems.

1. - The regex doesn't work!
2. - I need to add the  tags and all contents to the link

Here is an example



Here is a paragraph
Here is another paragraph



would become



Here is a paragraph">Here is a 
paragraph
Here is another paragraph">Here is 
another paragraph




Any advice would be greatly appreciated 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 development package installed?...


Please provide more information about what you have done and what error 
messages you are receiving so that other readers are able to help you.


- Ben

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 form element.  I can only have alphanumerics here.


stick the object in $_SESSION, making sure that you ALWAYS include the
relevant class definition(s) BEFORE starting the session.






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 dropdown then it returns correct "key" but the 
value will be "Array".

I.e: $cVariable //Contains foobar=Array&

Is there anyway I can get the values chosen instead of just "Array"?

Thx in advance

/Erfan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 
> imagecopyresampled() to actually copy the image data into the final image 
> (instead of imagecopy()).

It seems that I have three problems:

1. It seems that true color images do not support transparency (even though
I'm outputting to a PNG). It does not matter which colour I set to be
transparent it always is displayed as black which hides my satellite image.

2a. Because I am now forced to use a paletted image instead of a true color
image it seems that the colours in the second image is not added to the
palette of the first image.

or

2b. The alpha blending on the image causes the actual colours in the top
image to be blended with the satellite image. Because of this the top image
are blended in with the satellite image. If I do not set imagealphablending
($im, true) then the transparency in the top image is ignored and I do not
see the satellite image.

This brings me back to the original problem:
I have a true colour satellite image in PNG format. On top of this I want to
add the data collected from data collected by my company. This is always
shapes drawn which should not be alpha blended with the satellite image.
These shapes are drawn on a transparent background. The transparent
background allows for the satellite image to show through.


Any suggestions are welcome.

Albert

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 2005/11/30
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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:

 $tempvalue) {
if (is_array($arrayWithValues[$key])) {
  $tmpVal .= getValues($arrayWithValues[$key], $key);
} else {
  $tmpVal .= $pre.$key."=".$tempvalue."&";
}
  }

  return $tmpVal;
}

$cVariable = getValues($_POST);

print $cVariable;
?>

Hope it helps

Albert

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 2005/11/30
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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


-ahmed


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
http://www.mysql.com/news-and-events/newsletter/2002-11/a86.html

-ahmed


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.

Albert

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 2005/11/30
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 working as it
should.


ai, its process intensive to generate good quality images, I'm gald that
Andy's masking stuff helped you out - it certainly helped me.

I figured that either you could figure it out from his examples/code or you
we're in over your head :-) either way it as a little too complex for me to
try an explain it properly! (I only just grok it myself)

anyway good to see you cracked it :-)



Albert



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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, however on my client's shared
> server, the creation of sockets is not allowed.  With a new socket, I am
> able to pass the variable information via the socket (POST).
> 
> Todd
> 
> David Robley wrote:
>> Todd Cary wrote:
>> 
>>> When I have more than one button on a page, I us what I call a reentrant
>>> approach.  That is the page calls itself.
>>>
>>> If the page is emailer.pgp, the the FORM tag would be
>>>
>>> 
>>>
>>> At the top is
>>>
>>> >>$send= $_GET[btnSend];  // Send button pressed
>>>$cancel  = $_GET[btnCancel];// Cancel is pressed
>>>$message = $_GET[message];
>>>if ($send) {
>>>  header("location: send.php?message=" . $message);
>>>}
>>>if ($cancel) {
>>>  header("location: index.php");
>>>}
>>> ?>
>>>
>>> Is there a better way to do this so I can use a POST form?
>>>
>>> Thank you...
>>>
>>> Todd
>> What about:
>> 
>> 
>> 
>> and
>> 
>> if (isset($_POST['send']) ) {
>>   # do some sanitising on $_POST['message'] here
>>   header("location: http://f.q.d.n/path/to/send.php?message="; .
>> $_POST['message']);
>> }
>> exit();
>> 
>> if (isset($_POST['cancel']) ) {
>>header("location: http://f.q.d.n/path/to/index.php";);
>> }
>> 
>> Add other sanity checks as required.
>> 
>> 
>> Cheers




Cheers
-- 
David Robley

"Someone removed all the twos from this deck," Tom deduced.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 logout page after X seconds. 
2) At the beginning of each page i set a variable with the current time 
and check to see if the difference between the previously set variable 
and the now current time is greater than X seconds, if so then log the 
user out. 

I know meta refresh is not to be relied on and that is why i use the 2nd 
method as well, but i have had varied reports that this system does not 
work, i.e. it logs people out to quickly. 

Does anyone know a better way of doing this or improvements?? it would 
also be nice to stop the pages displaying after a time out when a user 
presses the back button!


Thanks a lot in advance

Adrian

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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
>
> Click Here
>
> 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 directories the 'directory' string gets longer and longer. 
I'm not sure if it is an Apache variable or what that I need to clear to 
empty the ?directory= string. Below is what builds up in the browser 
address window as I go in and out of directories. How do I dump it?

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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 your _GET variables are working correctly too.  Try 
creating a simple page:

";
var_dump($_GET);
echo "END TEST";
?>

If you call the page like localhost/testGet.php?testVar=testString than 
there might be some security settings within your http server preventing 
this and you should check both your http access and error logs.

"Fil" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> Ladies and Gentlemen,
>
> Thankyou for this opportunity of picking someones brains before I tear the 
> place apart.  I am just starting with PHP but have encountered an 
> insurmountable hurdle..  I need to work through   HTML form  "posting" 
> examples to a PHP script.  ONE STEP after "Hello World"
>
> I have taken the following steps:
>
> 1:   My php.ini   (The only one on the system ) is located in /etc/php.ini
>
> Because I am using an above 4.1 version of PHP
> I have manually altered the values of
>
> register_globals = On
>
> 2: I have repeatedly stopped and restarted Apache webserver.
> (Version 2)
>
> 3.  I have a "Hello World" HTML - > hello.php  that loads and runs 
> succesfully hence I have a valid   Webserver PHP HTML connection with my 
> browser.
>
> 4. In "Hello World I have taken the liberty of including a  phpinfo()
>
> 5. The output of phpinfo()  among others reveals:
>
> post_max_size 8M 8M
> precision 14 14
> register_argc_argv On On
> register_globals On On
> safe_mode Off Off
>
> 5. I should   be able to use GLOBALS  ( even if this will become a
> health hazard later on)
>
>
> 6. I have used the two examples from PHP's Documentation.
>
> Literally cut and paste...
>
> "Action.html "
>
>> 
>> 
>>   >  http-equiv="content-type">
>>   filsform
>> 
>> 
>> >  style="text-decoration: underline;">Fils Form
>> 
>> 
>> 
>> 
>>  Name: >  type="text">
>>
>> Email: 
>>   
>> 
>> 
>> 
>> 
>> 
>
> and  action.php
>> 
>> 
>>   PHP Test
>> 
>> 
>> HI .
>> Your email 
>> 
>> 
>
>
> 7.  After submitting  "action.html"  action.php loads and prints
>
> Hi
> Your email
>
> The contents of $_POST['name']  and $_POST['email']  appear to be 
> unavailable to action.php. If I understand the documentation correctly 
> this should not be the case  and whatever strings are filled in the form 
> of action.html should now be available???
>
> What or where or how or why or whatever ? must I do next... 
>
> Many thanks for those interested in advance
>
> Fil 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 certain page...


If I click two links within 1 second from the home page, the result 
won't be what you were expecting, unless you also take into account the 
HTTP-REFERER, but... Is It a worthwhile task to be storing both 
timestamp and HTTP-REFERER for each loaded web page? I don't think so.


So, If I must track the duration of time each individual visitor spent 
on a specific web page, I'd use the javascript method that Mike mentioned.


Cheers.

--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.

--
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 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 Core Certification
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 with way more code. I decided to switch to 
PHP and make it dynamic.



  Cad File Finder
  
  
   // this is very much in the rough at this point.  I am not 
concerned with looks yet.

 $the_dir = $_GET['directory'];
 if($the_dir == '') $the_dir = 'c:/suncosys'; // edit to some 
existing directory

 echo $the_dir.'';
 $dh = @opendir($the_dir);
 while (($filename = readdir($dh))) {
if (is_dir($the_dir."/".$filename)) {
   echo "href=\"cad.php?directory=".$the_dir."/".$filename."\"/>".$filename."";

   echo "";
}
if (is_file($the_dir."/".$filename)) {
   $the_file = $the_dir."/".$filename;
   $f_contents = file_get_contents($the_file);
   echo "".$filename."";
   echo " : file size : ".filesize($the_file);
   echo " : ";
   print strpos($f_content, "_Title_");
   fclose($f_handle); // close the file
  
   echo "";

}
 }
 @closedir($dh);
 $the_dir = NULL;
 $_PUT['directory'] = NULL; // 
 // printed for debugging only
 echo 'the_dir: '.$the_dir.'';
 echo 'get_dir: '.$_GET['directory'].'';
 // phpinfo(); // uncommment to display php info
  ?>
  



--
Regards,
 Marlin Unruh
 Sunco Systems Inc.
 (308) 326-4400

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




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?
  


$_CLEAN['x'] = intval(@$_POST['x']);

the '@' suppresses a notice if 'x' is not set and intval() will
force whatever is in $_POST['x'] to become an integer - knowing exactly
what it does depends on knowing how type-casting works in php.
OK so that doesn't exactly constitute a 'check' but it sure as hell
stops any idiot from giving the rest of your script anything but an
accepted value (the unsigned integer)

[I'd be very happy to get critisism from a security-man like mr. Chris
Shiftlett regard the relative 'badness' of the 'approach' I suggested
above - i.e. how much does it suck as a strategy?]

here is a quick test regarding casting (run it yourself ;-):

var_dump(
intval( "123" ),
intval( 123.50 ),
intval( "123.50" ),
intval( "123abc" ),
intval( "abc" ),
intval( "0" ),
intval( false ),
intval( null )
);




This might be good enough:

if (isset($_POST['x'])){
 if (!preg_match('/([0-9]*)(\\.0*)?/', $_POST['x']){
   //invalid
 }
 else{
   $_CLEAN['x'] = (int) $_POST['x'];
 }
}

 


You could also replace:

if (!preg_match('/([0-9]*)(\\.0*)?/', $_POST['x'])

with:


if(!is_numeric($_POST['x']) || $_POST['x'] < 0)

This would ensure that your value only contains numbers, and that it is 
greater than zero.  Then when you put it into the $_CLEAN array, you can 
type-cast it as an int (as in the other script) and that would convert 
any doubles to an integer value.  If you wanted you could also round, 
ceil, or floor the value.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 {
  $x = intval($_POST['x']);
  if ($x > 0 && $x == 1*$_POST['x']) {
 $_CLEAN['x'] = $x;
  }
   }
}

Reducing to a two-liner, if you *really* want:

$x = intval(@$_POST['x']);
$_CLEAN['x'] = (isset($_POST['x']) ? ((0 == 1*$_POST['x']) ? 0 : 
(($x > 0 && $x == 1*$_POST['x']) ? $x : false)) : false);


(all untested)

That *should* return false unless all your conditions are set, in 
which case it will return your cardinal number (non-negative integer).


Disclaimer: Currently operating on caffeine deficit; it's possible 
I'm answering a question no one asked.


steve


At 3:41 PM +0100 12/1/05, Jochem Maas wrote:

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?



$_CLEAN['x'] = intval(@$_POST['x']);

the '@' suppresses a notice if 'x' is not set and intval() will
force whatever is in $_POST['x'] to become an integer - knowing exactly
what it does depends on knowing how type-casting works in php.
OK so that doesn't exactly constitute a 'check' but it sure as hell
stops any idiot from giving the rest of your script anything but an
accepted value (the unsigned integer)

[I'd be very happy to get critisism from a security-man like mr. Chris
Shiftlett regard the relative 'badness' of the 'approach' I suggested
above - i.e. how much does it suck as a strategy?]

here is a quick test regarding casting (run it yourself ;-):

var_dump(
intval( "123" ),
intval( 123.50 ),
intval( "123.50" ),
intval( "123abc" ),
intval( "abc" ),
intval( "0" ),
intval( false ),
intval( null )
);




This might be good enough:

if (isset($_POST['x'])){
 if (!preg_match('/([0-9]*)(\\.0*)?/', $_POST['x']){
   //invalid
 }
 else{
   $_CLEAN['x'] = (int) $_POST['x'];
 }
}



You could also replace:

if (!preg_match('/([0-9]*)(\\.0*)?/', $_POST['x'])

with:


if(!is_numeric($_POST['x']) || $_POST['x'] < 0)

This would ensure that your value only contains numbers, and that 
it is greater than zero.  Then when you put it into the $_CLEAN 
array, you can type-cast it as an int (as in the other script) and 
that would convert any doubles to an integer value.  If you wanted 
you could also round, ceil, or floor the value.





--
+--- my people are the people of the dessert, ---+
| Steve Edberghttp://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center[EMAIL PROTECTED] |
| Bioinformatics programming/database/sysadmin (530)754-9127 |
+ said t e lawrence, picking up his fork +

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 coding practice.

On Thursday 01 December 2005 14:27, Matt Monaco wrote:
> 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 your _GET variables are working correctly too. 
> Try creating a simple page:
>
>  echo "TEST GET: ";
> var_dump($_GET);
> echo "END TEST";
> ?>
>
> If you call the page like localhost/testGet.php?testVar=testString than
> there might be some security settings within your http server preventing
> this and you should check both your http access and error logs.
>
> "Fil" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Ladies and Gentlemen,
> >
> > Thankyou for this opportunity of picking someones brains before I tear
> > the place apart.  I am just starting with PHP but have encountered an
> > insurmountable hurdle..  I need to work through   HTML form  "posting"
> > examples to a PHP script.  ONE STEP after "Hello World"
> >
> > I have taken the following steps:
> >
> > 1:   My php.ini   (The only one on the system ) is located in
> > /etc/php.ini
> >
> > Because I am using an above 4.1 version of PHP
> > I have manually altered the values of
> >
> > register_globals = On
> >
> > 2: I have repeatedly stopped and restarted Apache webserver.
> > (Version 2)
> >
> > 3.  I have a "Hello World" HTML - > hello.php  that loads and runs
> > succesfully hence I have a valid   Webserver PHP HTML connection with my
> > browser.
> >
> > 4. In "Hello World I have taken the liberty of including a  phpinfo()
> >
> > 5. The output of phpinfo()  among others reveals:
> >
> > post_max_size 8M 8M
> > precision 14 14
> > register_argc_argv On On
> > register_globals On On
> > safe_mode Off Off
> >
> > 5. I should   be able to use GLOBALS  ( even if this will become a
> > health hazard later on)
> >
> >
> > 6. I have used the two examples from PHP's Documentation.
> >
> > Literally cut and paste...
> >
> > "Action.html "
> >
> >> 
> >> 
> >>>>  http-equiv="content-type">
> >>   filsform
> >> 
> >> 
> >>  >>  style="text-decoration: underline;">Fils Form
> >> 
> >> 
> >> 
> >> 
> >>  Name:  >>  type="text">
> >>
> >> Email: 
> >>   
> >> 
> >> 
> >> 
> >> 
> >> 
> >
> > and  action.php
> >
> >> 
> >> 
> >>   PHP Test
> >> 
> >> 
> >> HI .
> >> Your email 
> >> 
> >> 
> >
> > 7.  After submitting  "action.html"  action.php loads and prints
> >
> > Hi
> > Your email
> >
> > The contents of $_POST['name']  and $_POST['email']  appear to be
> > unavailable to action.php. If I understand the documentation correctly
> > this should not be the case  and whatever strings are filled in the form
> > of action.html should now be available???
> >
> > What or where or how or why or whatever ? must I do next... 
> >
> > Many thanks for those interested in advance
> >
> > Fil

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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:


  $total = ($mygrade/$quiz->grade) ;
  if ($total > .80)  {


That means that if you score 80% precisely, you don't get the follow-up
script.

I believe I should re-write it like this:

 
  $total = ($mygrade/$quiz->grade) ;
  if ($total > .80 | .80)  {


Is that right? Thanks in advance for your help.

Jud.




--
Judson Vaughn
[EMAIL PROTECTED] | [EMAIL PROTECTED]
Seiter Vaughn  Communications
12455 Plowman Court
Herndon, VA 20170
703.450.9740
svc

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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:
> 
> 
>$total = ($mygrade/$quiz->grade) ;
>if ($total > .80)  {
> 
> 
> That means that if you score 80% precisely, you don't get the 
> follow-up
> script.
> 
> I believe I should re-write it like this:
> 
>  
>$total = ($mygrade/$quiz->grade) ;
>if ($total > .80 | .80)  {
> 
> 
> Is that right? Thanks in advance for your help.
> 

How about this:

   
   $total = ($mygrade/$quiz->grade) ;
   if ($total >= .80)  {



or this:

   
   $total = ($mygrade/$quiz->grade) ;
   if ($total > .79)  {


JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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:

>
>$total = ($mygrade/$quiz->grade) ;
>if ($total > .80 | .80)  {
> 

> Is that right? Thanks in advance for your help.

'OR' is ||, but you need to add the equation as well, i.e.:

if ($total > 0.80 || $total == 0.80)

However, you can write the above much more easily with:

if ($total >= 0.80)

Cheers,

Rich
-- 
Zend Certified Engineer
PHP Development Services
http://www.corephp.co.uk

-- 
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 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 frameworks I've found:

http://www.phpontrax.com/

http://www.cakephp.org/

http://www.symfony-project.com/

http://www.phocoa.com/

http://www.bennolan.com/biscuit/

If anyone has used any of these, I'd be interested in a report.

Richard

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 (isset($_POST['x'])) {
   if (0 == 1*$_POST['x']) {


I find the 1*_POST['x'] line a bit odd. why do you bother with the '1*' ?


  $_CLEAN['x'] = 0;
   } else {
  $x = intval($_POST['x']);
  if ($x > 0 && $x == 1*$_POST['x']) {


this is wrong ... if $_POST['x'] is '5.5' this won't fly
but is valid according to the OP.


 $_CLEAN['x'] = $x;
  }
   }
}

Reducing to a two-liner, if you *really* want:

$x = intval(@$_POST['x']);
$_CLEAN['x'] = (isset($_POST['x']) ? ((0 == 1*$_POST['x']) ? 0 : (($x > 
0 && $x == 1*$_POST['x']) ? $x : false)) : false);


(all untested)

That *should* return false unless all your conditions are set, in which 
case it will return your cardinal number (non-negative integer).


Disclaimer: Currently operating on caffeine deficit; it's possible I'm 
answering a question no one asked.


now that is funny :-)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 from http to https.

anyone come across this or know what the problem is?

Thanks in advance.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 DOMNode. Append the CDATASection to 
the element.


Rob

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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


bar.php


Check the logic in your application that decides if the user gets
redirected and make sure you're not making any incorrect assumptions.

Cheers,

David Grant

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.
> 
> The page redirects from http to https.
> 
> anyone come across this or know what the problem is?
> 
> Thanks in advance.
> 


-- 
David Grant
http://www.grant.org.uk/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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.

The page redirects from http to https.


yeah and I bet by the time the request comes back to your webserver it sees
it as a HTTP request - ergo an infinite loop.

are you using Squid per chance? or maybe doing something fancy with
url rewriting in Apache? one of those is likely to be causing the infinite loop.



anyone come across this or know what the problem is?


I have been fighting the such a problem all today - a site that requires
HTTPS for logged in customers (only), the site lives behind Squid (reverse 
proxy)
and Squid hits Apache with HTTP requests... and if you try to hit the login page
as http://mydomain/login.php it redirects to https://mydomain/login.php which
is recieved by Squid which passes it to http://127.0.0.1/login.php - and the 
redirect
occurs again - lots of fun really, and Squid configuration isn't mind numbingly
painful either!

hth to give you some possible insight :-/



Thanks in advance.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

do we? given that FALSE casts to 0.


would make this more than just a one-liner,  eg;

$_CLEAN['x'] = false;
if (isset($_POST['x'])) {
   if (0 == 1*$_POST['x']) {


I find the 1*_POST['x'] line a bit odd. why do you bother with the '1*' ?



I tend to use that to explicitly cast things to numeric; usually not 
necessary, but I have occasionally hit situations where something got 
misinterpreted, so I habitually do the 1*.




  $_CLEAN['x'] = 0;
   } else {
  $x = intval($_POST['x']);
  if ($x > 0 && $x == 1*$_POST['x']) {


this is wrong ... if $_POST['x'] is '5.5' this won't fly
but is valid according to the OP.



I guess I was interpreting the OP differently; your version is the 
shortest method I can see to force the input to an integer (but to 
ensure the non-negative requirement, one should say


$_CLEAN['x'] = abs(intval(@$_POST['x']));

). I was adding extra code to indicate an invalid entry as false. And 
I think that 5.5 would not be considered valid - to quote: "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?"


Although, with more caffeine in my system, doing something like

$x = abs(intval(@$_POST['x']));
	$_CLEAN['x'] = isset($_POST['x']) ? ($x == $_POST['x'] ? $x : 
false) : false;


or, to be more obfuscated,

	$_CLEAN['x'] = isset($_POST['x']) ? (($x = 
abs(intval(@$_POST['x']))) == $_POST['x'] ? $x : false) : false;


should do what I was trying to do, more succinctly.

- slightly more awake steve



 $_CLEAN['x'] = $x;
  }
   }
}

Reducing to a two-liner, if you *really* want:

$x = intval(@$_POST['x']);
$_CLEAN['x'] = (isset($_POST['x']) ? ((0 == 1*$_POST['x']) ? 0 : 
(($x > 0 && $x == 1*$_POST['x']) ? $x : false)) : false);


(all untested)

That *should* return false unless all your conditions are set, in 
which case it will return your cardinal number (non-negative 
integer).


Disclaimer: Currently operating on caffeine deficit; it's possible 
I'm answering a question no one asked.


now that is funny :-)



--
+--- my people are the people of the dessert, ---+
| Steve Edberghttp://pgfsun.ucdavis.edu/ |
| UC Davis Genome Center[EMAIL PROTECTED] |
| Bioinformatics programming/database/sysadmin (530)754-9127 |
+ said t e lawrence, picking up his fork +

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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', 
>> $dom->createCDATASection($this_item['description'])));
>
> createElement takes a string not a DOMNode. Append the CDATASection to the 
> element.
>
> Rob 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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.  After
quite a bit of troubleshooting I have determined it is not Apache as it's
ErrorHandler functions are working correctly and I can drop a Perl (or other
language) script in place of the PHP script and they function as desired.

Has anybody else run into this problem lately, and if so, does anybody know
how to resolve it?

The configure parameters used are as follows:
 --with-apxs2=/usr/local/apache2/bin/apxs
 --enable-force-cgi-redirect
 --enable-discard-path
 --enable-fastcgi
 --enable-magic-quotes
 --with-openssl
 --with-kerberos
 --with-zlib
 --enable-calendar
 --with-curl
 --enable-exif
 --with-dom
 --enable-ftp
 --with-gd
 --with-jpeg-dir
 --with-png-dir
 --with-xpm-dir
 --with-xlib-dir
 --with-imap-ssl
 --with-pspell
 --with-recode
 --with-readline
 --with-snmp
 --with-imap
 --enable-sockets
 --with-pdflib=/Archives/Linux/PDFLib/5.0.4/PDFlib-5.0.4-Linux/bind/c
 --with-pspell
 --with-swf=/Archives/Linux/LibSWF/dist
 --with-xmlrpc
 --with-pear
 --with-mysql
 --with-gmp
 --with-expat-dir=/usr

Thank you for any assistance anyone is able to offer regarding this issue.

Jason Ziemba


[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 users that the admin allow. The 
thing is that the accounts created are not present on the system (in 
this case, windows 2003 web edition), but only on the site database, i 
wouldn't like to create a system account per user so as to apply windows 
directories polycies. Is there a way to achieve this inside php? i know 
that with apache htaccess, this can be done, but i am not able to change 
the web server right now.

Any ideas?

Thanks!


Mariano G.


--
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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 the users that the admin allow. The 
thing is that the accounts created are not present on the system (in 
this case, windows 2003 web edition), but only on the site database, i 
wouldn't like to create a system account per user so as to apply windows 
directories polycies. Is there a way to achieve this inside php? i know 
that with apache htaccess, this can be done, but i am not able to change 
the web server right now.
Any ideas?
[/snip]

You'll want to read http://support.microsoft.com/?kbid=324064 and
http://www.google.com/search?hl=en&q=htaccess+on+IIS

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 "checkbox1[ ]"), php will pass that
variable as an array that contains all the values selected in the form.
Very handy.  BUT,

 

How do you then reference that variable via javascript to do any client-side
validation?  The code I use makes reference to the field's id, and it still
doesn't seem to check things properly.

 

Is there any way around this, or what am I missing?

 

TIA,

 

Kelly


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



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 grant access to
> specific directories in the site to the users that the admin allow.
> The
> thing is that the accounts created are not present on the system (in
> this case, windows 2003 web edition), but only on the site database, i
> wouldn't like to create a system account per user so as to apply
> windows
> directories polycies. Is there a way to achieve this inside php? i
> know
> that with apache htaccess, this can be done, but i am not able to
> change
> the web server right now.
> Any ideas?

Create a table that has 'user_id' and 'directory' in it and who can
access which as a flag.

Then you check which directory you are in and the user and include()
your login page if they aren't allowed to access that directory
according to your database rules.

There's nothing tricky here, really...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 PM, Kelly Meeks wrote:


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 "checkbox1[ ]"), php will  
pass that
variable as an array that contains all the values selected in the  
form.

Very handy.  BUT,



How do you then reference that variable via javascript to do any  
client-side
validation?  The code I use makes reference to the field's id, and  
it still

doesn't seem to check things properly.



Is there any way around this, or what am I missing?



TIA,



Kelly


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 got:


$ sudo up2date -i php-mysql
Password:

Fetching Obsoletes list for channel: rhel-i386-ws-3...

Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...

Fetching Obsoletes list for channel: dag-ws...

Fetching Obsoletes list for channel: isl-channel-ws...

Fetching Obsoletes list for channel: dag...

Fetching rpm headers...


NameVersionRel
--
php-mysql   4.3.2  26.ent 
 i386



Testing package set / solving RPM inter-dependencies...

Downloading headers to solve dependencies...

php-mysql-4.3.2-26.ent.i386 ## Done.
mysql-3.23.58-15.RHEL3.1.i3 ## Done.
Preparing  ### [100%]
An error has occurred:
Failed running transaction of  packages:
('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/mysql_config', 0L))

See /var/log/up2date for more information
///

More information I found in /var/log/up2date is:

//
[Thu Dec  1 12:50:02 2005] up2date updating login info
[Thu Dec  1 12:50:02 2005] up2date logging into up2date server
[Thu Dec  1 12:50:03 2005] up2date successfully retrieved authentication
token from up2date server
[Thu Dec  1 12:50:03 2005] up2date availablePackageList from network
[Thu Dec  1 12:50:03 2005] up2date Unable to import repomd support so
repomd support w
ill not be available
[Thu Dec  1 12:50:15 2005] up2date solving dep for: ['libmysqlclient.so.10']
[Thu Dec  1 12:50:19 2005] up2date solving dep for: ['libmysqlclient.so.10']
[Thu Dec  1 12:50:22 2005] up2date installing packages:
['php-mysql-4.3.2-26.ent', 'mysql-3.23.58-15.RHEL3.1']
[Thu Dec  1 12:50:25 2005] up2date Failed running transaction of  packages:
('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/mysql_config', 0L))

[Thu Dec  1 12:50:25 2005] up2date   File "/usr/sbin/up2date", line 1265,
in ?
sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 800, in main
fullUpdate, dryRun=options.dry_run))
   File "/usr/sbin/up2date", line 1137, in batchRun
batch.run()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 90, in run
self.__installPackages()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 174, in
__installPackages
self.kernelsToInstall =
up2date.installPackages(self.packagesToInstall, self.rpmCallback)
   File "/usr/share/rhn/up2date_client/up2date.py", line 749, in
installPackages
runTransaction(ts, added, removed,rpmCallback, rollbacktrans =
rollbacktrans)
   File "/usr/share/rhn/up2date_client/up2date.py", line 634, in
runTransaction
rpmUtils.runTransaction(ts,rpmCallback, transdir)
   File "/usr/share/rhn/up2date_client/rpmUtils.py", line 520, in
runTransaction
"Failed running transaction of  packages: %s") % errors, deps=rc)
//

So any way to walk around this conflict?  Thanks in advance for any
suggestions.

Bing
Bing

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 i need for my
application, i am adding all Tags and if i do a echo $Response i cant
see any attributes.

If you cant help please tell me where can i find some support!! please!! :)
Thanks for all and sorry for my badly english :D

Danilo

--
my request code:
...

$Response = '';
$Req = &new HTTP_Request("
http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp";)
;
$Req->setMethod(HTTP_REQUEST_METHOD_POST);
$Req->clearPostData();
$Req->addHeader("Ticket",$HTTP_SESSION_VARS["ticket"]);
$Req->addPostData('CX', $LongC);
$Req->addPostData('CY', $LatC);
$Req->addPostData('Z',  $LargM);
$Req->addPostData('N',  1);
$Req->addPostData('P1', "MAX");
$Req->addPostData('X1', $Long);
$Req->addPostData('Y1', $Lat);
$Req->addPostData('RT1',$Texto);
$Req->addPostData('E1', "SXCAR1-32;D30");
$Req->addPostData('H',  $Alt);
$Req->addPostData('W',  $Larg);
$Req->addPostData('RINFO', 100);
$Req->addPostData('INFO', "S");

if (empty($Zoom)){
   if (!empty($LongI) || !empty($LatI)){
   $Req->addPostData('XP',$LongI);
   $Req->addPostData('YP',$LatI);
   switch ($TCentr){
   case 1:
   $Req->addPostData('CMD',"C");  break;
   case 2:
   $Req->addPostData('CMD',"C+"); break;
   case 3:
   $Req->addPostData('CMD',"C-"); break;
   default:
   $Req->addPostData('CMD',"C");  break;
   }
   }
}else{
   $Req->addPostData('XP',round($Larg / 2));
   $Req->addPostData('YP',round($Alt / 2));
   if ($Zoom == 1)
   $Req->addPostData('CMD',"C+");
   elseif ($Zoom == -1)
   $Req->addPostData('CMD',"C-");
}
$Req->sendRequest();
$Response = $Req->getResponseBody();
...

--

echo $Response dont show the attributes (NroIni, NroFim, Bairro) :(
here is how the server send a correct XML request, look at the RUA tag:



 // dados sobre a localização do CENTRO DO MAPA
   nome da cidade
   sigla do estado
   
   
   url do GIF gerado
   longitude do centro do mapa
   latitude do centro do mapa
   zoom
   quantidade de pontos
 // Haverão N itens do tipo PONTO
   identificação do ponto
   longitude
   latitude
   posição do ponto sobre o GIF. Coordenada em
pixels
   posição do ponto sobre o GIF. Coordenada em
pixels
 // dados sobre a localização do PONTO
   nome da
cidade
   nome da cidade
   sigla do estado
   
   
   



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 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 i need for my
application, i am adding all Tags and if i do a echo $Response i cant
see any attributes.

If you cant help please tell me where can i find some support!!  
please!! :)

Thanks for all and sorry for my badly english :D

Danilo

--
my request code:
...

$Response = '';
$Req = &new HTTP_Request("
http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp";)www.geoportal.com.br/mapapp/avl/xservmapa1.asp%22%29>

;
$Req->setMethod(HTTP_REQUEST_METHOD_POST);
$Req->clearPostData();
$Req->addHeader("Ticket",$HTTP_SESSION_VARS["ticket"]);
$Req->addPostData('CX', $LongC);
$Req->addPostData('CY', $LatC);
$Req->addPostData('Z',  $LargM);
$Req->addPostData('N',  1);
$Req->addPostData('P1', "MAX");
$Req->addPostData('X1', $Long);
$Req->addPostData('Y1', $Lat);
$Req->addPostData('RT1',$Texto);
$Req->addPostData('E1', "SXCAR1-32;D30");
$Req->addPostData('H',  $Alt);
$Req->addPostData('W',  $Larg);
$Req->addPostData('RINFO', 100);
$Req->addPostData('INFO', "S");

if (empty($Zoom)){
   if (!empty($LongI) || !empty($LatI)){
   $Req->addPostData('XP',$LongI);
   $Req->addPostData('YP',$LatI);
   switch ($TCentr){
   case 1:
   $Req->addPostData 
('CMD',"C");  break;

   case 2:
   $Req->addPostData('CMD',"C 
+"); break;

   case 3:
   $Req->addPostData 
('CMD',"C-"); break;

   default:
   $Req->addPostData 
('CMD',"C");  break;

   }
   }
}else{
   $Req->addPostData('XP',round($Larg / 2));
   $Req->addPostData('YP',round($Alt / 2));
   if ($Zoom == 1)
   $Req->addPostData('CMD',"C+");
   elseif ($Zoom == -1)
   $Req->addPostData('CMD',"C-");
}
$Req->sendRequest();
$Response = $Req->getResponseBody();
...

--

echo $Response dont show the attributes (NroIni, NroFim, Bairro) :(
here is how the server send a correct XML request, look at the RUA  
tag:




 // dados sobre a localização do CENTRO DO MAPA
   nome da cidade
   sigla do estado
   
   
   url do GIF gerado
   longitude do centro do mapa
   latitude do centro do mapa
   zoom
   quantidade de pontos
 // Haverão N itens do tipo PONTO
   identificação do ponto
   longitude
   latitude
   posição do ponto sobre o GIF. Coordenada em
pixels
   posição do ponto sobre o GIF. Coordenada em
pixels
 // dados sobre a localização  
do PONTO
   Bairro="">nome da

cidade
   nome da cidade
   sigla do estado
   
   
   



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 install php-mysql
which requires mysql-3.23.58-15.RHEL3.1.i3.

Here is what I did and the errors I got:


$ sudo up2date -i php-mysql
Password:

Fetching Obsoletes list for channel: rhel-i386-ws-3...

Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...

Fetching Obsoletes list for channel: dag-ws...

Fetching Obsoletes list for channel: isl-channel-ws...

Fetching Obsoletes list for channel: dag...

Fetching rpm headers...


NameVersionRel
--
php-mysql   4.3.2  26.ent  i386


Testing package set / solving RPM inter-dependencies...

Downloading headers to solve dependencies...

php-mysql-4.3.2-26.ent.i386 ## Done.
mysql-3.23.58-15.RHEL3.1.i3 ## Done.
Preparing  ### [100%]
An error has occurred:
Failed running transaction of  packages:
('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/mysql_config', 0L))

See /var/log/up2date for more information
///

More information I found in /var/log/up2date is:

//
[Thu Dec  1 12:50:02 2005] up2date updating login info
[Thu Dec  1 12:50:02 2005] up2date logging into up2date server
[Thu Dec  1 12:50:03 2005] up2date successfully retrieved authentication
token from up2date server
[Thu Dec  1 12:50:03 2005] up2date availablePackageList from network
[Thu Dec  1 12:50:03 2005] up2date Unable to import repomd support so
repomd support w
ill not be available
[Thu Dec  1 12:50:15 2005] up2date solving dep for: 
['libmysqlclient.so.10']
[Thu Dec  1 12:50:19 2005] up2date solving dep for: 
['libmysqlclient.so.10']

[Thu Dec  1 12:50:22 2005] up2date installing packages:
['php-mysql-4.3.2-26.ent', 'mysql-3.23.58-15.RHEL3.1']
[Thu Dec  1 12:50:25 2005] up2date Failed running transaction of  packages:
('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', (7,
'/usr/bin/mysql_config', 0L))

[Thu Dec  1 12:50:25 2005] up2date   File "/usr/sbin/up2date", line 1265,
in ?
sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 800, in main
fullUpdate, dryRun=options.dry_run))
   File "/usr/sbin/up2date", line 1137, in batchRun
batch.run()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 90, in run
self.__installPackages()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 174, in
__installPackages
self.kernelsToInstall =
up2date.installPackages(self.packagesToInstall, self.rpmCallback)
   File "/usr/share/rhn/up2date_client/up2date.py", line 749, in
installPackages
runTransaction(ts, added, removed,rpmCallback, rollbacktrans =
rollbacktrans)
   File "/usr/share/rhn/up2date_client/up2date.py", line 634, in
runTransaction
rpmUtils.runTransaction(ts,rpmCallback, transdir)
   File "/usr/share/rhn/up2date_client/rpmUtils.py", line 520, in
runTransaction
"Failed running transaction of  packages: %s") % errors, deps=rc)
//

So any way to walk around this conflict?  Thanks in advance for any
suggestions.

Bing
Bing


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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',
'http' => '1.1',
'allowRedirects' => true,
'saveBody' => true,
);

$Req = &new 
HTTP_Request("http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp";,

$options);




James


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 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 i need for my
application, i am adding all Tags and if i do a echo $Response i cant
see any attributes.

If you cant help please tell me where can i find some support!! please!! :)
Thanks for all and sorry for my badly english :D

Danilo

--
my request code:
...

$Response = '';
$Req = &new HTTP_Request("
http://www.geoportal.com.br/mapapp/avl/xservmapa1.asp";)
;
$Req->setMethod(HTTP_REQUEST_METHOD_POST);
$Req->clearPostData();
$Req->addHeader("Ticket",$HTTP_SESSION_VARS["ticket"]);
$Req->addPostData('CX', $LongC);
$Req->addPostData('CY', $LatC);
$Req->addPostData('Z',  $LargM);
$Req->addPostData('N',  1);
$Req->addPostData('P1', "MAX");
$Req->addPostData('X1', $Long);
$Req->addPostData('Y1', $Lat);
$Req->addPostData('RT1',$Texto);
$Req->addPostData('E1', "SXCAR1-32;D30");
$Req->addPostData('H',  $Alt);
$Req->addPostData('W',  $Larg);
$Req->addPostData('RINFO', 100);
$Req->addPostData('INFO', "S");

if (empty($Zoom)){
   if (!empty($LongI) || !empty($LatI)){
   $Req->addPostData('XP',$LongI);
   $Req->addPostData('YP',$LatI);
   switch ($TCentr){
   case 1:
   $Req->addPostData('CMD',"C");  break;
   case 2:
   $Req->addPostData('CMD',"C+"); break;
   case 3:
   $Req->addPostData('CMD',"C-"); break;
   default:
   $Req->addPostData('CMD',"C");  break;
   }
   }
}else{
   $Req->addPostData('XP',round($Larg / 2));
   $Req->addPostData('YP',round($Alt / 2));
   if ($Zoom == 1)
   $Req->addPostData('CMD',"C+");
   elseif ($Zoom == -1)
   $Req->addPostData('CMD',"C-");
}
$Req->sendRequest();
$Response = $Req->getResponseBody();
...

--

echo $Response dont show the attributes (NroIni, NroFim, Bairro) :(
here is how the server send a correct XML request, look at the RUA tag:



 // dados sobre a localização do CENTRO DO MAPA
   nome da cidade
   sigla do estado
   
   
   url do GIF gerado
   longitude do centro do mapa
   latitude do centro do mapa
   zoom
   quantidade de pontos
 // Haverão N itens do tipo PONTO
   identificação do ponto
   longitude
   latitude
   posição do ponto sobre o GIF. Coordenada em
pixels
   posição do ponto sobre o GIF. Coordenada em
pixels
 // dados sobre a localização do PONTO
   nome da
cidade
   nome da cidade
   sigla do estado
   
   
   




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 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 coding practice.
>
> On Thursday 01 December 2005 14:27, Matt Monaco wrote:
> > 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 your _GET variables are working correctly too.
> > Try creating a simple page:
> >
> >  > echo "TEST GET: ";
> > var_dump($_GET);
> > echo "END TEST";
> > ?>
> >
> > If you call the page like localhost/testGet.php?testVar=testString than
> > there might be some security settings within your http server preventing
> > this and you should check both your http access and error logs.
> >
> > "Fil" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > > Ladies and Gentlemen,
> > >
> > > Thankyou for this opportunity of picking someones brains before I tear
> > > the place apart.  I am just starting with PHP but have encountered an
> > > insurmountable hurdle..  I need to work through   HTML form  "posting"
> > > examples to a PHP script.  ONE STEP after "Hello World"
> > >
> > > I have taken the following steps:
> > >
> > > 1:   My php.ini   (The only one on the system ) is located in
> > > /etc/php.ini
> > >
> > > Because I am using an above 4.1 version of PHP
> > > I have manually altered the values of
> > >
> > > register_globals = On
> > >
> > > 2: I have repeatedly stopped and restarted Apache webserver.
> > > (Version 2)
> > >
> > > 3.  I have a "Hello World" HTML - > hello.php  that loads and runs
> > > succesfully hence I have a valid   Webserver PHP HTML connection with
> my
> > > browser.
> > >
> > > 4. In "Hello World I have taken the liberty of including a  phpinfo()
> > >
> > > 5. The output of phpinfo()  among others reveals:
> > >
> > > post_max_size 8M 8M
> > > precision 14 14
> > > register_argc_argv On On
> > > register_globals On On
> > > safe_mode Off Off
> > >
> > > 5. I should   be able to use GLOBALS  ( even if this will become a
> > > health hazard later on)
> > >
> > >
> > > 6. I have used the two examples from PHP's Documentation.
> > >
> > > Literally cut and paste...
> > >
> > > "Action.html "
> > >
> > >> 
> > >> 
> > >>> >>  http-equiv="content-type">
> > >>   filsform
> > >> 
> > >> 
> > >>  > >>  style="text-decoration: underline;">Fils Form
> > >> 
> > >> 
> > >> 
> > >> 
> > >>  Name:  > >>  type="text">
> > >>
> > >> Email: 
> > >>   
> > >> 
> > >> 
> > >> 
> > >> 
> > >> 
> > >
> > > and  action.php
> > >
> > >> 
> > >> 
> > >>   PHP Test
> > >> 
> > >> 
> > >> HI .
> > >> Your email 
> > >> 
> > >> 
> > >
> > > 7.  After submitting  "action.html"  action.php loads and prints
> > >
> > > Hi
> > > Your email
> > >
> > > The contents of $_POST['name']  and $_POST['email']  appear to be
> > > unavailable to action.php. If I understand the documentation correctly
> > > this should not be the case  and whatever strings are filled in the
> form
> > > of action.html should now be available???
> > >
> > > What or where or how or why or whatever ? must I do next... 
> > >
> > > Many thanks for those interested in advance
> > >
> > > Fil
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[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 several PHP based programs on. Up
until today it has been working well. Today we tried to install a new PHP
based accounting program called "NolaPro" which also includes the Zend
optimizer as part of the installation. when I got finished installing this
program and said that the Zend optimizer was not installed. I tried
Installing this program again and the results were the same. But, trying to
get this program is now my secondary concern.
 
Since I have run this installation program none of the other PHP scripts that
we have installed on this server run anymore but instead are now asking if we
try to open them if I want to save the file to disk or open them in our PHP
editing tools. It appears that Apache is no longer recognizing and serving
PHP scripts.
 
I have tried reinstalling PHP but the results are still the same. Can
somebody please help me get back to the point where PHP is back running on
this server?
 
Thank you
 
Eric H. Lommatsch
Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
 
[EMAIL PROTECTED]
 


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 server that we use to run several PHP based programs on. Up

until today it has been working well. Today we tried to install a new PHP
based accounting program called "NolaPro" which also includes the Zend
optimizer as part of the installation. when I got finished installing this
program and said that the Zend optimizer was not installed. I tried
Installing this program again and the results were the same. But, trying to
get this program is now my secondary concern.
 
Since I have run this installation program none of the other PHP scripts that

we have installed on this server run anymore but instead are now asking if we
try to open them if I want to save the file to disk or open them in our PHP
editing tools. It appears that Apache is no longer recognizing and serving
PHP scripts.
 
I have tried reinstalling PHP but the results are still the same. Can

somebody please help me get back to the point where PHP is back running on
this server?


Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure 
those lines are in your httpd.conf


http://www.php.net/manual/en/install.unix.php


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 -
> From: <[EMAIL PROTECTED]>
> To: "Peppy" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 30, 2005 2:23 PM
> Subject: Re: [PHP] script won't work on other server
>
>
> > you're using the short-tag form:
> >
> >>
> > rather than:
> >
> >>
> > this may not be supported on both machines.
> >
> > haven't looked at other aspects of the script.
> >
> >
> >  Original Message 
> > > Date: Wednesday, November 30, 2005 02:15:47 PM -0600
> > > From: Peppy <[EMAIL PROTECTED]>
> > > To: php-general@lists.php.net
> > > Subject: [PHP] script won't work on other server
> > >
> > > I have a small script that I am testing out on two different
> > > servers.  It uses the $_SERVER['HTTP_USER_AGENT'] to detect the
> > > browser and serve up a style sheet dependent on the results.
> > > (Please don't comment on its usefulness, it's just an example.)
> > >
> > > On one server, I can get this script to run correctly in all
> > > browsers that I test.  On another server, it will not run correctly
> > > in Netscape (testing for the word Gecko, but have used Netscape
> > > also).   Any help would be appreciated.
> > >
> > > Link to script:
> > >
> > > http://www.asrm.org/class/php/angelia.php
> > >
> > > In case it's needed, link to file with phpinfo():
> > >
> > > http://www.asrm.org/test/test.php
> > >
> > >
> >
> > -- End Original Message --
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!


[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 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 got:


$ sudo up2date -i php-mysql
Password:

Fetching Obsoletes list for channel: rhel-i386-ws-3...

Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...

Fetching Obsoletes list for channel: dag-ws...

Fetching Obsoletes list for channel: isl-channel-ws...

Fetching Obsoletes list for channel: dag...

Fetching rpm headers...


NameVersionRel
--
php-mysql   4.3.2  26.ent  i386


Testing package set / solving RPM inter-dependencies...

Downloading headers to solve dependencies...

php-mysql-4.3.2-26.ent.i386 ## Done.
mysql-3.23.58-15.RHEL3.1.i3 ## Done.
Preparing  ### [100%]
An error has occurred:
Failed running transaction of  packages:
('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', 
(7,

'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', 
(7,

'/usr/bin/mysql_config', 0L))

See /var/log/up2date for more information
///

More information I found in /var/log/up2date is:

//
[Thu Dec  1 12:50:02 2005] up2date updating login info
[Thu Dec  1 12:50:02 2005] up2date logging into up2date server
[Thu Dec  1 12:50:03 2005] up2date successfully retrieved authentication
token from up2date server
[Thu Dec  1 12:50:03 2005] up2date availablePackageList from network
[Thu Dec  1 12:50:03 2005] up2date Unable to import repomd support so
repomd support w
ill not be available
[Thu Dec  1 12:50:15 2005] up2date solving dep for: 
['libmysqlclient.so.10']
[Thu Dec  1 12:50:19 2005] up2date solving dep for: 
['libmysqlclient.so.10']

[Thu Dec  1 12:50:22 2005] up2date installing packages:
['php-mysql-4.3.2-26.ent', 'mysql-3.23.58-15.RHEL3.1']
[Thu Dec  1 12:50:25 2005] up2date Failed running transaction of  
packages:

('file /usr/bin/comp_err from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', 
(7,

'/usr/bin/comp_err', 0L))
('file /usr/bin/mysql_config from install of mysql-3.23.58-15.RHEL3.1
conflicts with file from package MySQL-devel-standard-5.0.11-0.rhel3', 
(7,

'/usr/bin/mysql_config', 0L))

[Thu Dec  1 12:50:25 2005] up2date   File "/usr/sbin/up2date", line 1265,
in ?
sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 800, in main
fullUpdate, dryRun=options.dry_run))
   File "/usr/sbin/up2date", line 1137, in batchRun
batch.run()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 90, in run
self.__installPackages()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 174, in
__installPackages
self.kernelsToInstall =
up2date.installPackages(self.packagesToInstall, self.rpmCallback)
   File "/usr/share/rhn/up2date_client/up2date.py", line 749, in
installPackages
runTransaction(ts, added, removed,rpmCallback, rollbacktrans =
rollbacktrans)
   File "/usr/share/rhn/up2date_client/up2date.py", line 634, in
runTransaction
rpmUtils.runTransaction(ts,rpmCallback, transdir)
   File "/usr/share/rhn/up2date_client/rpmUtils.py", line 520, in
runTransaction
"Failed running transaction of  packages: %s") % errors, deps=rc)
//

So any way to walk around this conflict?  Thanks in advance for any
suggestions.

Bing


I remember it's possible to install several versions of MySQL and pick 
one depending on your need, but I cannot find where I saw it anymore. 
Anybody know where that information is?


Thanks,

Bing

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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

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 several PHP based programs on. Up

until today it has been working well. Today we tried to install a new PHP
based accounting program called "NolaPro" which also includes the Zend
optimizer as part of the installation. when I got finished installing this
program and said that the Zend optimizer was not installed. I tried
Installing this program again and the results were the same. But, trying to
get this program is now my secondary concern.
 
Since I have run this installation program none of the other PHP scripts that

we have installed on this server run anymore but instead are now asking if we
try to open them if I want to save the file to disk or open them in our PHP
editing tools. It appears that Apache is no longer recognizing and serving
PHP scripts.
 
I have tried reinstalling PHP but the results are still the same. Can

somebody please help me get back to the point where PHP is back running on
this server?
 
Thank you
 
Eric H. Lommatsch

Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
 
[EMAIL PROTECTED]
 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 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
> http://www.mysql.com/news-and-events/newsletter/2002-11/a86.html
>
> -ahmed
>



--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!


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 looking at
the httpd.conf is that these statement have an  statement
around them. But that is the version of PHP that is installed on this system.

Thank you
 
Eric H. Lommatsch
Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
 
[EMAIL PROTECTED]

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 01, 2005 3:07 PM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP server problem

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 server that we use to run several PHP based programs 
> on. Up until today it has been working well. Today we tried to install 
> a new PHP based accounting program called "NolaPro" which also 
> includes the Zend optimizer as part of the installation. when I got 
> finished installing this program and said that the Zend optimizer was 
> not installed. I tried Installing this program again and the results 
> were the same. But, trying to get this program is now my secondary concern.
>  
> Since I have run this installation program none of the other PHP 
> scripts that we have installed on this server run anymore but instead 
> are now asking if we try to open them if I want to save the file to 
> disk or open them in our PHP editing tools. It appears that Apache is 
> no longer recognizing and serving PHP scripts.
>  
> I have tried reinstalling PHP but the results are still the same. Can 
> somebody please help me get back to the point where PHP is back 
> running on this server?

Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure those
lines are in your httpd.conf

http://www.php.net/manual/en/install.unix.php


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: FW: [PHP] PHP server problem

2005-12-01 Thread James Benson

Have you tried removing the 


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 to this file I
am still getting the same result. One thing that I did notice in looking at
the httpd.conf is that these statement have an  statement
around them. But that is the version of PHP that is installed on this system.

Thank you
 
Eric H. Lommatsch

Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
 
[EMAIL PROTECTED]


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 01, 2005 3:07 PM

To: php-general@lists.php.net
Subject: Re: [PHP] PHP server problem

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 server that we use to run several PHP based programs 
on. Up until today it has been working well. Today we tried to install 
a new PHP based accounting program called "NolaPro" which also 
includes the Zend optimizer as part of the installation. when I got 
finished installing this program and said that the Zend optimizer was 
not installed. I tried Installing this program again and the results 
were the same. But, trying to get this program is now my secondary concern.


Since I have run this installation program none of the other PHP 
scripts that we have installed on this server run anymore but instead 
are now asking if we try to open them if I want to save the file to 
disk or open them in our PHP editing tools. It appears that Apache is 
no longer recognizing and serving PHP scripts.


I have tried reinstalling PHP but the results are still the same. Can 
somebody please help me get back to the point where PHP is back 
running on this server?



Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure those
lines are in your httpd.conf

http://www.php.net/manual/en/install.unix.php


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: 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  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 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 looking at
the httpd.conf is that these statement have an  statement
around them. But that is the version of PHP that is installed on this system.

Thank you
 
Eric H. Lommatsch

Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
 
[EMAIL PROTECTED]


-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 01, 2005 3:07 PM

To: php-general@lists.php.net
Subject: Re: [PHP] PHP server problem

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 server that we use to run several PHP based programs 
on. Up until today it has been working well. Today we tried to install 
a new PHP based accounting program called "NolaPro" which also 
includes the Zend optimizer as part of the installation. when I got 
finished installing this program and said that the Zend optimizer was 
not installed. I tried Installing this program again and the results 
were the same. But, trying to get this program is now my secondary concern.


Since I have run this installation program none of the other PHP 
scripts that we have installed on this server run anymore but instead 
are now asking if we try to open them if I want to save the file to 
disk or open them in our PHP editing tools. It appears that Apache is 
no longer recognizing and serving PHP scripts.


I have tried reinstalling PHP but the results are still the same. Can 
somebody please help me get back to the point where PHP is back 
running on this server?



Look at steps 14 and 15 under "Example 4-1..." on this page, and ensure those
lines are in your httpd.conf

http://www.php.net/manual/en/install.unix.php


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 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.  After
quite a bit of troubleshooting I have determined it is not Apache as it's
ErrorHandler functions are working correctly and I can drop a Perl (or other
language) script in place of the PHP script and they function as desired.

Has anybody else run into this problem lately, and if so, does anybody know
how to resolve it?

The configure parameters used are as follows:
 --with-apxs2=/usr/local/apache2/bin/apxs
 --enable-force-cgi-redirect
 --enable-discard-path
 --enable-fastcgi
 --enable-magic-quotes
 --with-openssl
 --with-kerberos
 --with-zlib
 --enable-calendar
 --with-curl
 --enable-exif
 --with-dom
 --enable-ftp
 --with-gd
 --with-jpeg-dir
 --with-png-dir
 --with-xpm-dir
 --with-xlib-dir
 --with-imap-ssl
 --with-pspell
 --with-recode
 --with-readline
 --with-snmp
 --with-imap
 --enable-sockets
 --with-pdflib=/Archives/Linux/PDFLib/5.0.4/PDFlib-5.0.4-Linux/bind/c
 --with-pspell
 --with-swf=/Archives/Linux/LibSWF/dist
 --with-xmlrpc
 --with-pear
 --with-mysql
 --with-gmp
 --with-expat-dir=/usr

Thank you for any assistance anyone is able to offer regarding this issue.

Jason Ziemba



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: FW: [PHP] PHP server problem

2005-12-01 Thread Eric Lommatsch
I tried removing the  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
complex scripts appear not to work.  


Thank you
 
Eric H. Lommatsch
Programmer
MICRONix, Inc.
2087 South Grant Street
Denver, CO 80210
Tel 303-777-8939
Fax 303-778-0378
 
[EMAIL PROTECTED]

-Original Message-
From: James Benson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 01, 2005 3:45 PM
To: php-general@lists.php.net
Subject: Re: FW: [PHP] PHP server problem

I cant see why you have two httpd.conf files, unless that app installed
another, in which case I would remove the  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 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 looking at the httpd.conf is that these statement 
> have an  statement around them. But that is the version
of PHP that is installed on this system.
> 
> Thank you
>  
> Eric H. Lommatsch
> Programmer
> MICRONix, Inc.
> 2087 South Grant Street
> Denver, CO 80210
> Tel 303-777-8939
> Fax 303-778-0378
>  
> [EMAIL PROTECTED]
> 
> -Original Message-
> From: John Nichel [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 01, 2005 3:07 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] PHP server problem
> 
> 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 server that we use to run several PHP based programs 
>>on. Up until today it has been working well. Today we tried to install 
>>a new PHP based accounting program called "NolaPro" which also 
>>includes the Zend optimizer as part of the installation. when I got 
>>finished installing this program and said that the Zend optimizer was 
>>not installed. I tried Installing this program again and the results 
>>were the same. But, trying to get this program is now my secondary concern.
>> 
>>Since I have run this installation program none of the other PHP 
>>scripts that we have installed on this server run anymore but instead 
>>are now asking if we try to open them if I want to save the file to 
>>disk or open them in our PHP editing tools. It appears that Apache is 
>>no longer recognizing and serving PHP scripts.
>> 
>>I have tried reinstalling PHP but the results are still the same. Can 
>>somebody please help me get back to the point where PHP is back 
>>running on this server?
> 
> 
> Look at steps 14 and 15 under "Example 4-1..." on this page, and 
> ensure those lines are in your httpd.conf
> 
> http://www.php.net/manual/en/install.unix.php
> 
> 
> --
> John C. Nichel IV
> Programmer/System Admin (ÜberGeek)
> Dot Com Holdings of Buffalo
> 716.856.9675
> [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 every page,


session_start();

if(isset($_SESSION['timeout'])) {

if(time() > $_SESSION['timeout']) {
// session has expired, redirect to login...

} else {
// reset the timeout time...
$_SESSION['timeout'] = time() + 3600;
}

} else {
$_SESSION['timeout'] = time() + 3600;
}




James


Adrian Bruce wrote:

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 logout page after X seconds. 2) At the 
beginning of each page i set a variable with the current time and check 
to see if the difference between the previously set variable and the now 
current time is greater than X seconds, if so then log the user out.
I know meta refresh is not to be relied on and that is why i use the 2nd 
method as well, but i have had varied reports that this system does not 
work, i.e. it logs people out to quickly.
Does anyone know a better way of doing this or improvements?? it would 
also be nice to stop the pages displaying after a time out when a user 
presses the back button!


Thanks a lot in advance

Adrian


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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: http://www.php.net/unsub.php



[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 into your template...
for parameters, use View::importAttributes() (yes the name is correct)
for attributes use $this->setAttributes($request->getAttributes());

be sure to check out the latest SVN version for many bugfixes and enhancments

-ahmed


[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 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] 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 (
http://us2.php.net/manual/en/faq.installation.php#faq.installation.nodata))
and received the following output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2336)]
0x405cd794 in php_handler (r=0x86624b8)
at /tmp/PHP/php-4.4.1/sapi/apache2handler/sapi_apache2.c:535
535 if (!parent_req) {

then (per the FAQ) I issued the bt command received:
#0  0x405cd794 in php_handler (r=0x86624b8)
at /tmp/PHP/php-4.4.1/sapi/apache2handler/sapi_apache2.c:535
#1  0x080a9b25 in ap_run_handler (r=0x86624b8) at config.c:152
#2  0x080aa130 in ap_invoke_handler (r=0x86624b8) at config.c:364
#3  0x0808e428 in ap_internal_redirect (new_uri=0x8620948
"\020\tb\bh¨a\bÀ\t7\b¸$f\b", r=0x8620948)
at http_request.c:465
#4  0x0808de0c in ap_process_request (r=0x8620948) at http_request.c:262
#5  0x080892bd in ap_process_http_connection (c=0x861a868) at
http_core.c:251
#6  0x080b4f55 in ap_run_process_connection (c=0x861a868) at connection.c:43
#7  0x080a8124 in child_main (child_num_arg=140642632) at prefork.c:610
#8  0x080a833b in make_child (s=0x407c597c, slot=0) at prefork.c:650
#9  0x080a8398 in startup_children (number_to_start=10) at prefork.c:722
#10 0x080a8c0a in ap_mpm_run (_pconf=0x80f7598, plog=0x8133688, s=0x80fdbe8)
at prefork.c:941
#11 0x080af18d in main (argc=4, argv=0xbd44) at main.c:618


Don't know if that helps any, but that's all I've been able to come up with
(so far).




On 12/1/05, James Benson <[EMAIL PROTECTED]> wrote:
>
> 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 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.  After
> > quite a bit of troubleshooting I have determined it is not Apache as
> it's
> > ErrorHandler functions are working correctly and I can drop a Perl (or
> other
> > language) script in place of the PHP script and they function as
> desired.
> >
> > Has anybody else run into this problem lately, and if so, does anybody
> know
> > how to resolve it?
> >
> > The configure parameters used are as follows:
> >  --with-apxs2=/usr/local/apache2/bin/apxs
> >  --enable-force-cgi-redirect
> >  --enable-discard-path
> >  --enable-fastcgi
> >  --enable-magic-quotes
> >  --with-openssl
> >  --with-kerberos
> >  --with-zlib
> >  --enable-calendar
> >  --with-curl
> >  --enable-exif
> >  --with-dom
> >  --enable-ftp
> >  --with-gd
> >  --with-jpeg-dir
> >  --with-png-dir
> >  --with-xpm-dir
> >  --with-xlib-dir
> >  --with-imap-ssl
> >  --with-pspell
> >  --with-recode
> >  --with-readline
> >  --with-snmp
> >  --with-imap
> >  --enable-sockets
> >  --with-pdflib=/Archives/Linux/PDFLib/5.0.4/PDFlib-5.0.4-Linux/bind/c
> >  --with-pspell
> >  --with-swf=/Archives/Linux/LibSWF/dist
> >  --with-xmlrpc
> >  --with-pear
> >  --with-mysql
> >  --with-gmp
> >  --with-expat-dir=/usr
> >
> > Thank you for any assistance anyone is able to offer regarding this
> issue.
> >
> > Jason Ziemba
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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 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 from http to https.
>
> yeah and I bet by the time the request comes back to your webserver it 
> sees
> it as a HTTP request - ergo an infinite loop.
>
> are you using Squid per chance? or maybe doing something fancy with
> url rewriting in Apache? one of those is likely to be causing the infinite 
> loop.
>
>>
>> anyone come across this or know what the problem is?
>
> I have been fighting the such a problem all today - a site that requires
> HTTPS for logged in customers (only), the site lives behind Squid (reverse 
> proxy)
> and Squid hits Apache with HTTP requests... and if you try to hit the 
> login page
> as http://mydomain/login.php it redirects to https://mydomain/login.php 
> which
> is recieved by Squid which passes it to http://127.0.0.1/login.php - and 
> the redirect
> occurs again - lots of fun really, and Squid configuration isn't mind 
> numbingly
> painful either!
>
> hth to give you some possible insight :-/
>
>>
>> Thanks in advance.
>> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 pl1.qcinet.net 2.4.20-8smp #1 SMP Thu Mar 13 17:45:54 EST 2003 i686 

Thanks for your help.


- Original Message - 
From: "Unknown Unknown" <[EMAIL PROTECTED]>
To: "Peppy" <[EMAIL PROTECTED]>
Cc: 
Sent: Thursday, December 01, 2005 4:08 PM
Subject: Re: [PHP] script won't work on other server


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 -
> From: <[EMAIL PROTECTED]>
> To: "Peppy" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 30, 2005 2:23 PM
> Subject: Re: [PHP] script won't work on other server
>
>
> > you're using the short-tag form:
> >
> >>
> > rather than:
> >
> >>
> > this may not be supported on both machines.
> >
> > haven't looked at other aspects of the script.
> >
> >
> >  Original Message 
> > > Date: Wednesday, November 30, 2005 02:15:47 PM -0600
> > > From: Peppy <[EMAIL PROTECTED]>
> > > To: php-general@lists.php.net
> > > Subject: [PHP] script won't work on other server
> > >
> > > I have a small script that I am testing out on two different
> > > servers.  It uses the $_SERVER['HTTP_USER_AGENT'] to detect the
> > > browser and serve up a style sheet dependent on the results.
> > > (Please don't comment on its usefulness, it's just an example.)
> > >
> > > On one server, I can get this script to run correctly in all
> > > browsers that I test.  On another server, it will not run correctly
> > > in Netscape (testing for the word Gecko, but have used Netscape
> > > also).   Any help would be appreciated.
> > >
> > > Link to script:
> > >
> > > http://www.asrm.org/class/php/angelia.php
> > >
> > > In case it's needed, link to file with phpinfo():
> > >
> > > http://www.asrm.org/test/test.php
> > >
> > >
> >
> > -- End Original Message --
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!



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]> wrote:
>
> 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 pl1.qcinet.net 2.4.20-8smp #1 SMP Thu Mar 13 17:45:54 EST 2003 i686
>
> Thanks for your help.
>
>
> - Original Message - From: "Unknown Unknown" <[EMAIL PROTECTED]
> >
> To: "Peppy" <[EMAIL PROTECTED] >
>  Cc: 
> Sent: Thursday, December 01, 2005 4:08 PM
> Subject: Re: [PHP] script won't work on other server
>
> 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 -
> > From: < [EMAIL PROTECTED]>
> > To: "Peppy" < [EMAIL PROTECTED]>
> > Sent: Wednesday, November 30, 2005 2:23 PM
> > Subject: Re: [PHP] script won't work on other server
> >
> >
> > > you're using the short-tag form:
> > >
> > >> >
> > > rather than:
> > >
> > >> >
> > > this may not be supported on both machines.
> > >
> > > haven't looked at other aspects of the script.
> > >
> > >
> > >  Original Message 
> > > > Date: Wednesday, November 30, 2005 02:15:47 PM -0600
> > > > From: Peppy < [EMAIL PROTECTED]>
> > > > To: php-general@lists.php.net
> > > > Subject: [PHP] script won't work on other server
> > > >
> > > > I have a small script that I am testing out on two different
> > > > servers.  It uses the $_SERVER['HTTP_USER_AGENT'] to detect the
> > > > browser and serve up a style sheet dependent on the results.
> > > > (Please don't comment on its usefulness, it's just an example.)
> > > >
> > > > On one server, I can get this script to run correctly in all
> > > > browsers that I test.  On another server, it will not run correctly
> > > > in Netscape (testing for the word Gecko, but have used Netscape
> > > > also).   Any help would be appreciated.
> > > >
> > > > Link to script:
> > > >
> > > > http://www.asrm.org/class/php/angelia.php
> > > >
> > > > In case it's needed, link to file with phpinfo():
> > > >
> > > > http://www.asrm.org/test/test.php
> > > >
> > > >
> > >
> > > -- End Original Message --
> > >
> > >
> >
> > --
> > PHP General Mailing List ( http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
>



--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!


--
Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!