php-general Digest 9 Jan 2006 10:32:39 -0000 Issue 3895

2006-01-09 Thread php-general-digest-help
php-general Digest 9 Jan 2006 10:32:39 - Issue 3895 Topics (messages 228303 through 228313): strip leading zeros 228303 by: Ross 228304 by: Chris 228309 by: M. Sokolewicz Power 228305 by: Khorosh Irani 228308 by: Dotan Cohen No POST-Data available

[PHP] Problem with fsockopen and SSL

2006-01-09 Thread Barry
Hi everyone! I want to connect to an SSL server but i can't get the content :( Here is the code i use: $xml = 'xmldataHello!/data/xml'; function PostToHost($host, $path, $referer, $data_to_send) { $fp = fsockopen($host, 443); printf(Open!\n); fputs($fp, POST $path HTTP/1.1\r\n\r\n);

[PHP] Re: help register domain name

2006-01-09 Thread Barry
n.g. wrote: hi, i want to register a domain name through NetworkSolutions.com, but it require a credit card which i dont have to pay the bill. if you have a credit card, i can transfer to your account, and then you please regiter the domain using my info. or if you have any other ways to do

[PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread Simon Detheridge
I'm trying to get PHP5 to talk to a web service that I am developing. I have created a wsdl for the service (http://www.symgate.com/symgate/symgate.wsdl) and am trying to get PHP to parse it. (The wsdl validates in a number of tools I've pointed at it, including mindreef soapscope and the

Re: [PHP] Problem with fsockopen and SSL

2006-01-09 Thread David Grant
Hi Barry, I'm not terrible au fait with the workings of SSL, but it strikes me as potentially problematic that you are communicating in plain text over an encrypted protocol. Might that be the problem? David Barry wrote: Hi everyone! I want to connect to an SSL server but i can't get the

Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread Jochem Maas
Simon Detheridge wrote: I'm trying to get PHP5 to talk to a web service that I am developing. I have created a wsdl for the service (http://www.symgate.com/symgate/symgate.wsdl) and am trying to get PHP to parse it. (The wsdl validates in a number of tools I've pointed at it, including

Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread Simon Detheridge
Thanks for your response. Quoting Jochem Maas [EMAIL PROTECTED]: Simon Detheridge wrote: I'm trying to get PHP5 to talk to a web service that I am developing. is php choking on the comment?: !--xsd:include schemaLocation=cml.xsd /-- I've removed the comments from the file. No luck. or

Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread Jochem Maas
another guess: does the php soap extension maybe think that 'complexType' (all of them) needs a name attrib? (try giving them bogus names?) Simon Detheridge wrote: Thanks for your response. Quoting Jochem Maas [EMAIL PROTECTED]: Simon Detheridge wrote: I'm trying to get PHP5 to talk to a

[PHP] Re: Php5 SOAP WSDL parsing

2006-01-09 Thread Rob
Simon Detheridge wrote: The output says: SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unexpected in complexType in /var/www/localhost/htdocs/soap1.php:5 Stack trace: #0 /var/www/localhost/htdocs/soap1.php(5): SoapClient-__construct('http://www.symg...') #1 {main} attribute

Re: [PHP] Php5 SOAP WSDL parsing

2006-01-09 Thread David Grant
Simon, It would appear you've not included the full message. Please look at the source of the message in your web browser. The space between unexpected and in complexType probably contains an XML tag. David Simon Detheridge wrote: I'm trying to get PHP5 to talk to a web service that I am

Re: [PHP] safe mode question

2006-01-09 Thread James Benson
Your php.ini should have root as its owner and be set to 600, if your using apache server then apache must start as root, the php.ini file is read only once by root when the server starts - so that setting should not cause problems, however if using the cli then you should also make

[PHP] Re: Php5 SOAP WSDL parsing

2006-01-09 Thread Simon Detheridge
Quoting David Grant [EMAIL PROTECTED]: It would appear you've not included the full message. Please look at the source of the message in your web browser. The space between unexpected and in complexType probably contains an XML tag. sheepish Uh, indeed I was. It was an unexpected sequence

[PHP] include() problem

2006-01-09 Thread Nuno Trancoso
This may sound dumb, but i have been up all night going through php/apache docs, and still have not found an answer.. Throughout a site i need to include files that are scattered in subdirs, sometimes up in the dir tree, sometimes down. Bad design i know but i have to live w/ it... Problem

Re: [PHP] include() problem

2006-01-09 Thread David Grant
Nuno, Have you considered $_SERVER['DOCUMENT_ROOT']? David Nuno Trancoso wrote: This may sound dumb, but i have been up all night going through php/apache docs, and still have not found an answer.. Throughout a site i need to include files that are scattered in subdirs, sometimes up in

RE: [PHP] include() problem

2006-01-09 Thread Dan Parry
Check this out http://uk2.php.net/reserved.variables DOCUMENT_ROOT will give you the root of your site -Original Message- From: Nuno Trancoso [mailto:[EMAIL PROTECTED] Sent: 09 January 2006 14:56 To: php-general@lists.php.net Subject: [PHP] include() problem This may sound dumb, but i

Re: [PHP] The meaning of and @

2006-01-09 Thread David Grant
Todd, The @ operator suppresses error messages. http://www.php.net/manual/en/language.operators.errorcontrol.php David Todd Cary wrote: I have not been able to find in the Online Manual the use of the @ symbol as in while ([EMAIL PROTECTED]($sqlID, MYSQL_BOTH)){ Is that a

[PHP] Executing a string

2006-01-09 Thread Todd Cary
If I have $myStr = $a * $b; and I pass it as an argument $result = myFunction($myStr); function myFunction($var) { $a = getData(1); $b = getData(2); return // Use $var } Is there a way to use $var to process $a and $b? Todd -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: help register domain name

2006-01-09 Thread n.g.
haha! never mind. im joking. thanks for you all, i'll find the way out. On 1/9/06, n.g. [EMAIL PROTECTED] wrote: Want to know why i call for help? for in this god damned country , anything and everything you want to do, you find you are facing the wall. On 1/9/06, Barry [EMAIL PROTECTED]

[PHP] Re: help register domain name

2006-01-09 Thread n.g.
Yeah! its realy realy realy great, nothing greater.:-D On 1/9/06, Jim Moseby [EMAIL PROTECTED] wrote: Want to know why i call for help? for in this god damned country , anything and everything you want to do, you find you are facing the wall. Would that be the great wall? JM --

Re: [PHP] The meaning of and @

2006-01-09 Thread M. Sokolewicz
and it's used wrongly in 99.99% of the cases. David Grant wrote: Todd, The @ operator suppresses error messages. http://www.php.net/manual/en/language.operators.errorcontrol.php David Todd Cary wrote: I have not been able to find in the Online Manual the use of the @ symbol as in while

Re: [PHP] The meaning of and @

2006-01-09 Thread Miles Thompson
Todd, It suppresses any error message if the function fails. Nothing as exotic as a pointer. Cheers - Miles At 11:41 AM 1/9/2006, Todd Cary wrote: I have not been able to find in the Online Manual the use of the @ symbol as in while ([EMAIL PROTECTED]($sqlID, MYSQL_BOTH)){ Is that a

Re: [PHP] The meaning of and @

2006-01-09 Thread Chris Boget
and it's used wrongly in 99.99% of the cases. Are you trying to tell me that I'm *not* supposed to use it in front of *every* php function Oh, come *on* Why not?!? It makes the function call look so pretty and important/official looking... or something... :p thnx, Chris -- PHP

RE: [PHP] Warning: Missing argument 7 calling a function

2006-01-09 Thread enediel gonzalez
thanks everybody who answered me, the segment bellow is the code that gave me problems, the $app_name was the 7th parameter neccesary for me to call the GetCommandDeclaration function, the solution I had for a while was to declare the variable global. :( As you can see , the rest of variables

[PHP] Aspect-oriented programming for PHP

2006-01-09 Thread William Candillon
We are pleased to announce the availability of phpAspect which implements aspect-oriented programming for PHP 5. phpAspect is based on static weaving and produces code that can be executed with any PHP 5 version. Informations about phpAspect can be found in the wiki project

Re: [PHP] Executing a string

2006-01-09 Thread Philip Hallstrom
If I have $myStr = $a * $b; and I pass it as an argument $result = myFunction($myStr); function myFunction($var) { $a = getData(1); $b = getData(2); return // Use $var } Is there a way to use $var to process $a and $b? http://us2.php.net/eval -- PHP General Mailing List

Re: [PHP] Executing a string

2006-01-09 Thread David Grant
Philip Hallstrom wrote: http://us2.php.net/eval Pay close attention to the oft-used quote from Rasmus Lerdorf: If eval() is the answer, you're almost certainly asking the wrong question David -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List (http://www.php.net/) To

[PHP] CSS Switching

2006-01-09 Thread Mike Tuller
I am drawing a blank on how to go about doing this for some reason. I have a page that pulls info from a database, and I want to have a version for viewing, and a version fro printing. Since the data is dynamic, I need to keep the data, but be able to switch the stylesheet. Can someone

RE: [PHP] CSS Switching

2006-01-09 Thread Jay Blanchard
[snip] I am drawing a blank on how to go about doing this for some reason. I have a page that pulls info from a database, and I want to have a version for viewing, and a version fro printing. Since the data is dynamic, I need to keep the data, but be able to switch the stylesheet. Can

Re: [PHP] CSS Switching

2006-01-09 Thread Lists
http://www.alistapart.com/articles/phpswitch/ or http://www.alistapart.com/articles/alternate/ maybees -dg On Jan 9, 2006, at 10:58 AM, Mike Tuller wrote: I am drawing a blank on how to go about doing this for some reason. I have a page that pulls info from a database, and I want to have a

Re: [PHP] CSS Switching

2006-01-09 Thread John Nichel
Mike Tuller wrote: I am drawing a blank on how to go about doing this for some reason. I have a page that pulls info from a database, and I want to have a version for viewing, and a version fro printing. Since the data is dynamic, I need to keep the data, but be able to switch the

RE: [PHP] CSS Switching

2006-01-09 Thread Jay Paulson \(CE CEN\)
Why don't you make a prit.php file that handles all the dynamic content and displays it with the CSS file you want. jay -Original Message- From: Mike Tuller [mailto:[EMAIL PROTECTED] Sent: Mon 1/9/2006 11:58 AM To: php list Subject: [PHP] CSS Switching I am drawing a blank on how to

RE: [PHP] CSS Switching

2006-01-09 Thread Jay Blanchard
[snip] Why don't you make a prit.php file that handles all the dynamic content and displays it with the CSS file you want. [/snip] Using a print stylesheet prevents a round trip to the server for the data. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] CSS Switching

2006-01-09 Thread Mike Tuller
Because I wasn't sure the best way to pass the information to a separate page. What John has is different than the direction I was thinking, but will work. On Jan 9, 2006, at 12:17 PM, Jay Blanchard wrote: [snip] Why don't you make a prit.php file that handles all the dynamic content

Re: [PHP] CSS Switching

2006-01-09 Thread Mike Tuller
Thanks. This is perfect. On Jan 9, 2006, at 12:07 PM, John Nichel wrote: Mike Tuller wrote: I am drawing a blank on how to go about doing this for some reason. I have a page that pulls info from a database, and I want to have a version for viewing, and a version fro printing. Since

RE: [PHP] CSS Switching

2006-01-09 Thread Jay Blanchard
[snip] Because I wasn't sure the best way to pass the information to a separate page. What John has is different than the direction I was thinking, but will work. [/snip] A print stylesheet requires no IF statement. When you print it, it prints according to the print stylesheet. -- PHP

Re: [PHP] include() problem

2006-01-09 Thread Gerry Danen
Here's a snippet of what's at the start of most of my php files: $pagetitle = Lily Articles; $pagefname = __FILE__; // for later logging $pagedocroot = $_SERVER['DOCUMENT_ROOT']; require_once ($pagedocroot/include_db/db_connect.php); require_once ($pagedocroot/include/funcs.php); Hope that

Re: [PHP] CSS Switching

2006-01-09 Thread John Nichel
Jay Blanchard wrote: [snip] Because I wasn't sure the best way to pass the information to a separate page. What John has is different than the direction I was thinking, but will work. [/snip] A print stylesheet requires no IF statement. When you print it, it prints according to the print

RE: [PHP] CSS Switching

2006-01-09 Thread Jay Blanchard
[snip] Ah, but then it would be a CSS question, and not a PHP one. ;) [/snip] Touche'! But then we wouldn't be kinder and gentler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] problem with currency signs

2006-01-09 Thread Angelo Zanetti
Hi guys, Im having problems with the Euro and Pound currency signs and storing them etc... here is my scenario. I have a menu/list of currencies available for selection, HTML below for the signs: $ pound; euro; When listed in the browser they show fine. When I want to save them,

[PHP] Re: Image editing?

2006-01-09 Thread Chuck Anderson
William Stokes wrote: Hello, I might have to start doing some automated image editing or rezising with PHP. I've never done anything like this before so I would need some guidelines to get started. Basically what sections of the manual to read and what tools need to be installed to the

Re: [PHP] Question generateing xml on v4.3

2006-01-09 Thread Ted Zeng
Does this (PHP 4 = 4.2.1, PECL) Mean it is installed for version higher than 4.2.1? Ted zeng On 1/9/06 7:41 AM, Jochem Maas [EMAIL PROTECTED] wrote: Ted Zeng wrote: Hi, I use OS X tiger which has a PHP v4.3.12 installed. any reason to be using an old version of php? I would like

[PHP] Help getting PHP and GPG to work

2006-01-09 Thread zedleon
Has anybody had success using PHP and GPG to send encripted email from a form? Seems like people avoid this issue like the plague. Very little is written about it. I am trying to get a script to work that was written in the book php essentials by Julie Meloni. Am I barking up the wrong tree? Any

Re: [PHP] CSS Switching

2006-01-09 Thread John Nichel
Jay Blanchard wrote: [snip] Ah, but then it would be a CSS question, and not a PHP one. ;) [/snip] Touche'! But then we wouldn't be kinder and gentler We'd have an excuse...it is Monday afterall. OP : A print css sheet would save you another trip to the server. -- John C. Nichel IV

Re: [PHP] problem with currency signs

2006-01-09 Thread Warren Vail
see http://us2.php.net/manual/en/function.htmlspecialchars.php note: I believe the dollar sign will also be translated, could be wrong. Warren At 03:14 AM 1/10/2006, Angelo Zanetti wrote: Hi guys, Im having problems with the Euro and Pound currency signs and storing them etc... here is my

Re: [PHP] Question generateing xml on v4.3

2006-01-09 Thread Ted Zeng
From the http://pecl.php.net/package/domxml page: NOTE: if you're running PHP 4.x, the domxml is already part of the distribution. It seems to me the Extension should be installed already. On 1/9/06 7:41 AM, Jochem Maas [EMAIL PROTECTED] wrote: Ted Zeng wrote: Hi, I use OS X tiger which

[PHP] Dynamic Array Index using Variable

2006-01-09 Thread Chris Lott
I want to do something like this to check if a variety of submitted form fields (crn, instructor, etc) have any value in them: $reqfields = array('crn', 'instructor'); $errorflag = 0; foreach ($reqfields as $field) { if ($_REQUEST[$field] == '') { $errorflag = 1;

Re: [PHP] installing php5 on os x and CLI version

2006-01-09 Thread Jeffrey Sambells
php runs out of /usr/bin/php but entropy.ch installs into /usr/local/ php5 so you want to run /usr/local/php5/bin/php (on my system i symlinked the two so they are the same). -jeff ~~ Jeffrey Sambells Director of Research and Development Zend Certified

RE: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Jim Moseby
I want to do something like this to check if a variety of submitted form fields (crn, instructor, etc) have any value in them: $reqfields = array('crn', 'instructor'); $errorflag = 0; foreach ($reqfields as $field) { if ($_REQUEST[$field] == '') { $errorflag = 1;

RE: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Jay Paulson \(CE CEN\)
You could use the isset() or the empty() functions. http://us3.php.net/manual/en/function.empty.php http://us3.php.net/manual/en/function.isset.php But do you want to check all the fields that are being submitted or just specific ones that you set in the $reqfields array? If you want to check

Re: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Al
Jim Moseby wrote: I want to do something like this to check if a variety of submitted form fields (crn, instructor, etc) have any value in them: $reqfields = array('crn', 'instructor'); $errorflag = 0; foreach ($reqfields as $field) { if ($_REQUEST[$field] == '') {

[PHP] PHP5, Soap, WSDL, and unbounded xsd:choice types.

2006-01-09 Thread Simon Detheridge
I have a problem with PHP talking to my non-php webservice. The problem arises because I have a list of elements in an umbounded xsd:choice type, which are supposed to be parsed in the correct order. Unfortunately, PHP groups them together per-type instead of in the order they appear in the

Re: [PHP] CSS Switching

2006-01-09 Thread tedd
I am drawing a blank on how to go about doing this for some reason. I have a page that pulls info from a database, and I want to have a version for viewing, and a version fro printing. Since the data is dynamic, I need to keep the data, but be able to switch the stylesheet. Can someone give me

Re: [PHP] CSS Switching

2006-01-09 Thread Mike Tuller
Yes, I think we all deserve at least one Mulligan on Mondays. On Jan 9, 2006, at 1:43 PM, John Nichel wrote: Jay Blanchard wrote: [snip] Ah, but then it would be a CSS question, and not a PHP one. ;) [/snip] Touche'! But then we wouldn't be kinder and gentler We'd have an excuse...it

[PHP] Floating numbers truncating to two digits without rounding

2006-01-09 Thread Mark Steudel
I am calculating things like tax and want to format them so they only have 2 digits past the decimal point. I've been using sprintf but just noticed that it tends to round up. I want the same functionlity without rounding. Thanks

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-09 Thread Ray Hauge
On Monday 09 January 2006 03:20 pm, Mark Steudel wrote: I am calculating things like tax and want to format them so they only have 2 digits past the decimal point. I've been using sprintf but just noticed that it tends to round up. I want the same functionlity without rounding. Thanks You

[PHP] PHP and SOAP newbie questions

2006-01-09 Thread Jay Paulson \(CE CEN\)
I recently got handed a project that requires me to use PHP to talk to a WSDL SOAP service. I'm not new to PHP but I am new to SOAP. I have the basic idea of how SOAP works but still have a few questions I am hoping you all can answer for me. Which library would be better to use? NuSOAP or

Re: [PHP] problem with currency signs

2006-01-09 Thread tedd
Angelo: Now might be the time to start looking at Unicode characters. Here's a start: http://www1.tip.nl/~t876506/utf8tbl.html There's all sorts of ways to show special characters. For example, the BULLET (Unicode 2022) can be shown by: bull; #149; #8226; -- Note Please note that 8226 is

[PHP] What do I need to add to my php5 calls

2006-01-09 Thread The Doctor
I get a customer that has the following code that needs to run: ? Header(Content-Type: image/gif); if(isset($_GET['BTT'])){ $BTT = $_GET['BTT']; } else{ $BTT = ; } $insert = imagecreatefromgif(MenuButton3.gif); $text=$BTT;

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-09 Thread tedd
I am calculating things like tax and want to format them so they only have 2 digits past the decimal point. I've been using sprintf but just noticed that it tends to round up. I want the same functionlity without rounding. Mark: Rounding? You can try round(), such as: ?php echo round(3.4);

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-09 Thread Gerry Danen
Mark, Why not use sprintf() with an arbitrary large number of decimals and then discard all but the 2 you want. I.e., format with 10 decimals and then drop the last 8. On 1/9/06, Mark Steudel [EMAIL PROTECTED] wrote: I am calculating things like tax and want to format them so they only have 2

Re: [PHP] Help getting PHP and GPG to work

2006-01-09 Thread Jason Petersen
On 1/9/06, zedleon [EMAIL PROTECTED] wrote: Has anybody had success using PHP and GPG to send encripted email from a form? Yes. You're on the right track. The method I used was to create a temp file with my data, encrypt it with GPG, read it back into a string, then mail() it. (Of course

[PHP] Trouble with session serializer

2006-01-09 Thread Mark
I am finishing a PHP session serializer module and am seeing wierd things. I seems to work OK, but doesn't work with squirrelmail. It works mostly but there seems to be one type that isn't working and I can't seems to find it. If you want to help: download and install xmldbx in your PHP, copy

Re: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Chris Lott
What I have is a form with 45 data fields... if any of a selected 35 of those fields is empty, I want to have the user go back. So I can't loop over the entire _POST array. So I thought I would put the names of the fields I *do* want to check into an array and check. So this won't work:

[PHP] Re: problem with currency signs

2006-01-09 Thread Serdar Soydemir
Hi Angelo, You may create a separate table called currencies and put two fields like currency_id and currency_desc in it. Insert all the currencies you're using to this table. At the end, you'll have a currency_id for each of your currencies. Now, you can use those ID numbers in your forms

[PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Chris
I'm trying to understand function definitions and can't seem to find any reference to the meaning of (PHP 4 = 4.0.1, PHP 5) or variations there of, shown at the beginning of each definition. I get the idea it is telling me that the particular function is supported in PHP 4 5. But what does the

RE: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Erin Fortenberry
= is greater or equal to -Erin -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 9:13 PM To: php-general@lists.php.net Subject: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5) I'm trying to understand function definitions and can't seem

Re: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Chris
So it means the function was introduced in version 4.01? Erin Fortenberry [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] = is greater or equal to -Erin -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 9:13 PM To:

Re: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Ligaya Turmelle
Pretty much Chris wrote: So it means the function was introduced in version 4.01? Erin Fortenberry [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] = is greater or equal to -Erin -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006

Re: [PHP] Help getting PHP and GPG to work

2006-01-09 Thread Jason Petersen
On 1/9/06, Support [EMAIL PROTECTED] wrote: quote for the book- PHP scripts will invoke the encryption process, and the public key has to be on the key ring of the user invoking the encryption. On the Web server, PHP usually runs as user nobody or www or as the user for your Web server.

Re: [PHP] Floating numbers truncating to two digits without rounding

2006-01-09 Thread Anas Mughal
Try something like: floor($value * 100)/100; -- Anas Mughal On 1/9/06, Mark Steudel [EMAIL PROTECTED] wrote: I am calculating things like tax and want to format them so they only have 2 digits past the decimal point. I've been using sprintf but just noticed that it tends to round up.

[PHP] Re: What do I need to add to my php5 calls

2006-01-09 Thread David Robley
The Doctor wrote: I get a customer that has the following code that needs to run: ? Header(Content-Type: image/gif); if(isset($_GET['BTT'])){ $BTT = $_GET['BTT']; } else{ $BTT = ; } $insert = imagecreatefromgif(MenuButton3.gif); $text=$BTT;