php-general Digest 14 Feb 2004 19:40:49 -0000 Issue 2590
Topics (messages 177686 through 177714):
Syntax
177686 by: PETCOL
177690 by: John Nichel
Re: Constant PHP_OS and Mac Server
177687 by: - Edwin -
177688 by: - Edwin -
177704 by: Gerard Samuel
Re: General Function usage question (simple)
177689 by: Jason Wong
177693 by: Adam Bregenzer
177701 by: memoimyself.yahoo.com.br
Re: Japanese Language
177691 by: - Edwin -
Re: [PHP-INSTALL] Re: Apache+modssl+php problem??? possible IE bug?
177692 by: Chris Wilson
Re: preg guru question
177694 by: joel boonstra
Re: Problem concerning multiple inheritance / interfaces
177695 by: Adam Bregenzer
Re: Using exceptions to write more perfect software ...
177696 by: Adam Bregenzer
Re:[SOLVED] [PHP] Syntax
177697 by: PETCOL
Error with ftp_get()
177698 by: Thorben
177699 by: Adam Bregenzer
177700 by: Thorben
Re: Session, loging users in.
177702 by: memoimyself.yahoo.com.br
returning value to variable
177703 by: tg
177705 by: BAO RuiXian
177707 by: tg
Arranging My Functions
177706 by: Hamid Hossain
177710 by: Richard Davey
Re: [Q]PHP not taking input values from forms
177708 by: Dan Aloma
177709 by: Richard Davey
phps and iis
177711 by: Anders Gjermshus
177712 by: Jason Lewis
177713 by: Anders Gjermshus
177714 by: zerof
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi People,
PHP Newbie here again. trying to get HTML and PHP to work together really
stumps me at times, I'm trying to output a selection from a form as so:
<option value="Aruba">Aruba</option>
<?php
if (isset($_POST["Country"])) {
echo "<option
value="$_POST["Country"];"selected>\n"$_POST["Country"];"</option>\n";
} else {
echo "<option value="Australia" selected>Australia</option>\n";
}
?>
<option value="Austria">Austria</option>
This line is whats causing me all the greif:
echo "<option
value="$_POST["Country"];"selected>\n"$_POST["Country"];"</option>\n";
Parse error: parse error, expecting `','' or `';''
Suggestions or tutorials please ;-)
Col
--- End Message ---
--- Begin Message ---
PETCOL wrote:
<snip>
This line is whats causing me all the greif:
echo "<option
value="$_POST["Country"];"selected>\n"$_POST["Country"];"</option>\n";
Parse error: parse error, expecting `','' or `';''
Suggestions or tutorials please ;-)
Col
You're wrapping the whole string in double quotes ("), not escaping the
double quotes in your form element, and using double quotes around the
array keys. Don't know why you have the semi-colons in the middle of
the string, or the new line, but try this...
echo ( "<option value=\"" . $_POST['Country'] . "\" selected>" .
$_POST['Country'] . "</option>\n" );
Read here about escaping characters, and about concatenating.
http://us2.php.net/manual/en/function.echo.php
http://us2.php.net/manual/en/language.operators.string.php
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
I don't have a Mac Server here; only a G5 with the "ordinary" Panther ;)
The answer must be the same though...
Gerard Samuel wrote:
I dont have a Mac handy to get the value of the constant PHP_OS.
If anyone has access to a Mac, please reply to me with the output of
var_dump( PHP_OS );
<?php
var_dump(PHP_OS);
// result is -> string(6) "Darwin"
?>
HTH,
PS (to myself)
First post from Thunderbird 0.5
--
- E -
"I may have invented it [Ctrl-Alt-Del],
but Bill made it famous." - David Bradley
--- End Message ---
--- Begin Message ---
I don't have a Mac Server here; only a G5 with the "ordinary" Panther ;)
The answer must be the same though...
Gerard Samuel wrote:
I dont have a Mac handy to get the value of the constant PHP_OS.
If anyone has access to a Mac, please reply to me with the output of
var_dump( PHP_OS );
<?php
var_dump(PHP_OS);
// result is -> string(6) "Darwin"
?>
HTH,
PS (to myself)
First post from Thunderbird 0.5
--
- E -
"I may have invented it [Ctrl-Alt-Del],
but Bill made it famous." - David Bradley
__________________________________________________
Do You Yahoo!?
http://bb.yahoo.co.jp/
--- End Message ---
--- Begin Message ---
On Saturday 14 February 2004 02:34 am, - Edwin - wrote:
> I don't have a Mac Server here; only a G5 with the "ordinary" Panther ;)
>
> The answer must be the same though...
>
> <?php
>
> var_dump(PHP_OS);
> // result is -> string(6) "Darwin"
>
> ?>
>
Thanks
--- End Message ---
--- Begin Message ---
On Saturday 14 February 2004 15:31, Dave Carrera wrote:
> Here is an easy one for you :-)
Indeed.
> --- Example1 Function ---
>
> Function MyTestFunction(){
> // do something here
> }
>
> --- Example2 Function ---
>
> Function MyTestFunction($var1,$var2){
> // do something here
> }
>
> My question is what do or where do or why are the $var1 and or $var2
> included inside the brackets of a function.
>
> What do they do ?
>
> Why are they in there ?
>
> And how are they used within an application ?
>
> I am very sorry for the basic question but I am new to the world of
> functions.
I think you should study thoroughly the "Language Reference" section of the
manual and in particular the chapter "Functions".
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
He hath eaten me out of house and home.
-- William Shakespeare, "Henry IV"
*/
--- End Message ---
--- Begin Message ---
On Sat, 2004-02-14 at 02:31, Dave Carrera wrote:
> My question is what do or where do or why are the $var1 and or $var2
> included inside the brackets of a function.
>
> What do they do ?
>
> Why are they in there ?
>
> And how are they used within an application ?
A good place to start reading about functions is in the php manual[1].
In short, functions are blocks of code that achieve a particular
purpose, or function. Arguments[2] are used with functions to pass
information, or variables, to these blocks of code. Generally the
arguments are used or manipulated by the function. Functions may pass
back, or return[3], information as well. Here are some sample
functions, function calls, and output for context. Steps are separated
as much as possible for clarity:
// No arguments
function echoHelloWorld() {
echo "Hello World\n";
}
echoHelloWorld(); // Output: Hello World
// Has arguments, uses data.
function printPlusOne($number) {
$number = $number + 1;
echo $number . "\n";
}
printPlusOne(2); // Output: 3
// Has arguments, manipulates and returns data.
function doubleNumber($number) {
$number = $number * 2;
return $number;
}
$value = doubleNumber(10);
echo $value . "\n"; // Output: 20
Good Luck,
Adam
[1] http://www.php.net/functions
[2] http://www.php.net/functions.arguments
[3] http://us2.php.net/functions.returning-values
--
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/
--- End Message ---
--- Begin Message ---
Hello Dave,
You'll find all this information and much more in the PHP manual (
http://www.php.net/docs.php ). Look for the chapter on functions.
Have fun,
Erik
On 14 Feb 2004 at 7:31, Dave Carrera wrote:
> Hi List,
>
> Here is an easy one for you :-)
>
> --- Example1 Function ---
>
> Function MyTestFunction(){
> // do something here
> }
>
> --- Example2 Function ---
>
> Function MyTestFunction($var1,$var2){
> // do something here
> }
>
> My question is what do or where do or why are the $var1 and or $var2
> included inside the brackets of a function.
>
> What do they do ?
>
> Why are they in there ?
>
> And how are they used within an application ?
>
> I am very sorry for the basic question but I am new to the world of
> functions.
>
> Thank you in advance for any explanations, help or explanatory urls that you
> may impart.
>
> Dave C
--- End Message ---
--- Begin Message ---
Once upon a time, KidLat Ngayon wrote:
<snip>
whenever i've open the file in staroffice, it can
read the nihongo, however when i open it in microsoft
office, it turns out that the nihongo are
something like a garbage character.....
</snip>
*Maybe* the problem lies with the fact that the file was saved
(encoded) in EUC-JP and MS Office is trying to open it using SJIS
whereas StarOffice is using the correct encoding...
This should help: http://www.php.net/mbstring
--
- E -
"I may have invented it [Ctrl-Alt-Delete],
but Bill made it famous." - David Bradley
--- End Message ---
--- Begin Message ---
I found several sources of information regarding a IE bug that does'nt
pass all the post data, however this is roughly 1/4 times that it does it.
Its actually become a serious problem for people to navigate through my
webmail :/
Chris
> I mean, I sometime found a few POST data had incorrectly went over to the
> GET data. I don't know it's a PHP problem but more of a web browser
> problem.
>
> Scott F.
> "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Try the $_REQUEST variable, this is where both the $_GET and $_POST come
>> from and let us know how it goes...
>>
>> Scott F.
>>
>> "Chris Wilson" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > When in IE, submitting any form on our https page, the post variables
>> > intermittantly don't come through.
>> >
>> > The get variables come through fine. Just not the $_POST variables.
>> >
>> > I have tried everything to get this to work. Everything was working
>> fine
>> > but it seems after we updated IE with the last critical updates this
>> > started to become an issue.
>> >
>> >
>> > We have rebuilt servers, and installed apache+modssl+php from
> /usr/ports,
>> > as well as manually and have been unable to resolv this issue.
>> >
>> > We are using a generic installation of apache+modssl+php with the
> included
>> > php.ini, only modifications being Register_globals on and safe_mode
>> off
>> >
>> > We have also tried backing down to an earlier version of php and
>> apache
>> > (php 4.3.1, modssl 2.8.15 and apache 1.3.28, which we were running
> before
>> > the rebuild)
>> >
>> >
>> > Netscape seems to work fine. Once again, this only seems to be
>> happening
>> > on secure pages.
>> >
>> >
>> > We have tried on multiple workstations, and our customers seem to be
>> > effected by this too.
>> >
>> >
>> > Does anyone know what this might be? possibly an IE bug?
>> >
>> > Any help would be apreciated.
>> >
>> > Thanks! :)
>> >
>> >
>> > Chris Wilson
>
--- End Message ---
--- Begin Message ---
On Sat, Feb 14, 2004 at 12:50:55AM -0500, Adam Bregenzer wrote:
> As far as I could tell the regexp I posted was the only one to use a
> subpattern to match the first quote type used and then re-apply that
> after matching the file name:
> '/<img\s+src=([\'"])([^\1]+)\1\s*\/?\s*>/i'
>
> I am a bit of a regular expression fan and I would be interested in
> seeing another way to match without using subpatterns. What was Joel's
> regexp again?
You're right that my regexp[0] didn't require the quote marks to match each
other. Depending on how strict/lax you want to be, that might be a
feature or a bug ;)
As to doing it without subpatterns... this seems to get there:
'#<img\s+src=((\'[^\']*\')|("[^"]*"))\s*/?\s*>#i'
but isn't as elegant or extensible as yours, although it does allow for
<img src=""> (that is, an empty src attribute). Also, it's less clear
where your matches are in mine, since there are so many parens.
IOW, Adam's is better ;)
[0]: The one I posted was:
'/<img src=["\'](.*?)\.(.*?)["\']>/i'
which didn't require quotes to match each other, didn't allow for
arbitrary whitespace, and didn't allow for XHTML-style tag closing.
--
[ joel boonstra | gospelcom.net ]
--- End Message ---
--- Begin Message ---
Oops, I left this in my Drafts folder, sorry about that.
On Wed, 2004-02-04 at 20:28, Vivian Steller wrote:
> ok my problem in a nutshell: i need multiple inheritance! is there a
> solution to fake this functionallity in php5?
It sounds like you would want to check out association and
aggregation[1]. Though aggregation looks mighty attractive, I doubt it
will work in your situation since you do not get the constructor, and
therefore the underlying reference to the DOM library is missing. See
below for a possible solution.
> i have the following problem:
> the goal is to implement my own DomXML implementation based on the existing
> DomNode, DomDocument, Dom... Classes.
>
> thus, i implement my classes as follows:
>
> class MyNode extends DomNode {} // that isn't the problem
> class MyDocument extends DomDocument {} // would be fine, but...
>
> this would be an easy solution, but there is a logical problem:
> if i extend the DomNode (with the methods in MyNode) then -i think-
> MyDocument should have those extended methods, too.
> so i could write:
>
> class MyDocument extends MyNode {} // problem
>
> but now i'm missing all the nice methods of DomDocument!!
> multiple inheritance would solve this problem:
>
> class MyDocument extends MyNode,DomDocument {} // not possible
Neither prototype nor multiple inheritance is directly supported in
php. The best option to achieve what you want would be to define your
new class layer (MyNode, MyDocument, etc.) as inheriting from their
respective classes (ex. MyDocument extends MyNode). Then within each
class definition hold the respective DOM class in a property:
class MyNode {
var $dom_node;
function MyNode($param) {
$this->dom_node = new DomNode($param);
}
}
You then will need to write stub methods to implement each method in the
DOM class for your class. You can then manually override any DOM method
as well as extend the class in your own manner. An important note: You
*never* want to access the property for the DOM instance directly, if
you are using PHP 5 you *must* make this property private. This is a
fair amount of code bloat but afaik the only way you can conform php4 to
your design. See below for more solutions relating to PHP 5.
> I'm thinking about the new __call() method implemented as follows:
>
> class MyDocument extends MyNode {
> function __call($method, $params) { // fake solution
> ...
> eval("DomDocument::$method($paramsString);");
> }
> }
>
> but with a fake solution like this i wouldn't get all methods with
> get_class_methods() and that wouldn't be that nice:)
The Reflection API[2] in PHP 5 can help you here. I'm hoping to play
with it sometime and see if it can be used to fake prototypes by
allowing modification of the method and property spaces. That *would*
be nice. :) Even if it does not, you can still use it to look up and
call methods from other classes.
> Can Interfaces help me?
They may, but interfaces will not implement the code themselves.
Without prototypes you will need to either write accessor code to the
DOM methods in a function outside your classes and a wrapper for each
object, or copy and paste the code manually to implement the additional
Node sub-class functions across all other sub-classes. I would
recommend leaving interfaces out of this as they will provide
unnecessary structure and rigidity to your code. Implement only the
constraints you absolutely need.
Hopefully this gives you something to think on. As I am still working
out the possibilities in php myself I would appreciate any findings you
have back here.
Hope this helps,
Adam
[1] http://www.php.net/ref.objaggregation
[2]
http://sitten-polizei.de/php/reflection_api/docs/language.reflection.html
--
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/
--- End Message ---
--- Begin Message ---
On Tue, 2004-02-10 at 11:40, Markus Fischer wrote:
> Isn't this the same thing I started doing anyway? I however didn't
> integrated those functions in my application directly but put them in a
> file of its own so I can (hopefully ;) reuse them.
I started putting them together then I realized I was not nor wanted to
implement the framework necessary to have a proper hierarchy. Instead I
am playing with replacing each function call that should throw an
exception manually. This has also helped me increase the granularity of
my exceptions. Because I generate practically all the code I have that
uses system function calls in some way it's not much additional code for
me to write.
> This sounds very interesting. Can you elaborate how and what you
> actually did for generating the code (what was your input and how did
> you transform it)?
Right now I have a php script that reads in sql code (currently MySQL's
semantics) and outputs a series of classes. I can not get into too much
detail as I consider it very dear to my process. :) However, I am able
to generate a complete class based data abstraction layer from sql code,
which is nice. :)
> I think such a real hierarchy of classes will never exist. That's too
> much for PHP; none of the developers want to break BC and also follow
> the KISS credo (which is good, imho).
I wonder what will happen to the user base as PHP 5 comes out and later
when PHP 6 is in the works. Classes are becoming more popular in php
and I have already seen some discussion on implementing a base PHP
framework in classes. It seems some people are considering using Java's
structure, which I would agree is way to formal for PHP, however
hopefully some good middle ground will be found.
> But it sounds interesting in re-creating the globbered global function
> table of PHP in a well thought class framework and make it
> exception-proof. But that would be a step back either if this wrapping
> would only occur in PHP side -> for every PHP function there would need
> to be called a userland PHP code before. I even don't want to think
> about the performance implications. But well, since this is effectively
> what I started with with my "System" class, there my be needs where this
> trade off is accecptable (compensating longer execution time with caches
> and more hardware power/ram/whatever).
I don't think an in system solution would be a good idea. I appreciate
the PHP developer's respect for functional programming and think it
would be a mistake to being integrating an object oriented framework in
all of PHP itself. One if the benefits of PHP is its similarity to C.
> I think for the current issue I will just continue recreating the PHP
> functions inside an exception-proof class if I don't find a better way.
> Only creating them on-demand isn't a real problem (at the moment).
Let me know how it goes. If you want to merge code and start an
impromptu class repository for PHP 5 I would be interested. I have only
been playing around with PHP 5 since it is still in beta, I haven't
tried converting an entire application over to the new class syntax yet.
Regards,
Adam
--
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/
--- End Message ---
--- Begin Message ---
Thanks John,
"John Nichel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> PETCOL wrote:
> <snip>
> > This line is whats causing me all the greif:
> > echo "<option
> > value="$_POST["Country"];"selected>\n"$_POST["Country"];"</option>\n";
> > Parse error: parse error, expecting `','' or `';''
> >
> > Suggestions or tutorials please ;-)
> >
> > Col
> >
>
> You're wrapping the whole string in double quotes ("), not escaping the
> double quotes in your form element, and using double quotes around the
> array keys. Don't know why you have the semi-colons in the middle of
> the string, or the new line, but try this...
>
> echo ( "<option value=\"" . $_POST['Country'] . "\" selected>" .
> $_POST['Country'] . "</option>\n" );
>
> Read here about escaping characters, and about concatenating.
>
> http://us2.php.net/manual/en/function.echo.php
> http://us2.php.net/manual/en/language.operators.string.php
>
> --
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Hi guys.
It's possible that my english sometimes isn't so good. I'm a small
german boy.
At the moment i am working on a WebFTP client. All the stuff like
list,mkdir,rm(dir),put works. But when i use ftp_get() an error appears:
Warning: ftp_get(): 'RETR ' not understood.
I guess 'RETR' is a message from FTPServer to PHP and PHP don't
understand it. So, can you tell me, how to avoid this?
Yours, Thorm.
--
- RPG Genesis 2004 -
- Make your dreams believable -
http://www.rpg-genesis.de
--- End Message ---
--- Begin Message ---
On Fri, 2003-11-14 at 07:33, Thorben wrote:
> Warning: ftp_get(): 'RETR ' not understood.
>
> I guess 'RETR' is a message from FTPServer to PHP and PHP don't
> understand it. So, can you tell me, how to avoid this?
When you request (get) a file using the ftp command you send a RETR
command to the ftp server indicating which file you want to retrieve.
I'm not 100% sure what is going on since there is no code in your post,
but it looks like the RETR command is disabled on the ftp server. This
means you will not be able to download files. Try retrieving the file
manually using your favorite ftp client and see what happens. If you
can post the code you are using we may be able to help better.
--
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/
--- End Message ---
--- Begin Message ---
Oh. Yes. I forget the code.
With an normal FTP-client i can get the file easily.
Ah! I've found the error.
My code was
ftp_get($conn, "tmp", $file, FTP_BINARY);
The var $file is a GET-var, but on my server register_globals is off. So
i had to write $_GET['file']. It was so easy.
On Fri, 2003-11-14 at 07:33, Thorben wrote:
Warning: ftp_get(): 'RETR ' not understood.
I guess 'RETR' is a message from FTPServer to PHP and PHP don't
understand it. So, can you tell me, how to avoid this?
When you request (get) a file using the ftp command you send a RETR
command to the ftp server indicating which file you want to retrieve.
I'm not 100% sure what is going on since there is no code in your post,
but it looks like the RETR command is disabled on the ftp server. This
means you will not be able to download files. Try retrieving the file
manually using your favorite ftp client and see what happens. If you
can post the code you are using we may be able to help better.
--
RPG Genesis 2004
Mach' deine Träume wahr!
Mach' dein Spiel!
--- End Message ---
--- Begin Message ---
Hello Philip,
On 14 Feb 2004 at 18:48, Philip J. Newman wrote:
> Whats the best information to add to a session to say a user is logged in?
>
> I currently have $siteUserLogIn="true";
>
> anything else that I could add to beef up security?
You'll find an in-depth answer to your question in an article by Chris Shiflett
recently
published in the Jan. 2004 issue of PHP Magazine, which you can download for free
from http://www.phpmag.net .
Cheers,
Erik
--- End Message ---
--- Begin Message ---
hi
i need returning value of function as a variable
example :
function 1 () {
return "some error";
}
function 2 () {
$v = 1();
if ( $v != '' ) echo "error";
}
it doesn't work this way
this works : echo 1();
but i need the string value as a variable
thanks
--- End Message ---
--- Begin Message ---
tg wrote:
hi
i need returning value of function as a variable
example :
function 1 () {
return "some error";
}
function 2 () {
$v = 1();
if ( $v != '' ) echo "error";
}
it doesn't work this way
Are you using 1 and 2 as the function names in your real application?
Hope not, because function names same as variable names in all languges
can not begine with digit. Your 1 and 2 functions not work in my
computer either, but they start to work after I have changed 1 and 2 to
a and b respectively.
Best
Bao
this works : echo 1();
but i need the string value as a variable
thanks
--- End Message ---
--- Begin Message ---
Bao Ruixian wrote:
tg wrote:
hi
i need returning value of function as a variable
example :
function 1 () {
return "some error";
}
function 2 () {
$v = 1();
if ( $v != '' ) echo "error";
}
it doesn't work this way
Are you using 1 and 2 as the function names in your real application?
of course not, it was an example
btw. i has already solved the problem
it was a stupid fault, i returned the value of the function
but i didn't print it in the main code, so i thought
that something's wrong
TG
Hope not, because function names same as variable names in all languges
can not begine with digit. Your 1 and 2 functions not work in my
computer either, but they start to work after I have changed 1 and 2 to
a and b respectively.
Best
Bao
this works : echo 1();
but i need the string value as a variable
thanks
--- End Message ---
--- Begin Message ---
Hi,
I've created a big site contains about 500 functions to handle all the site
logic. I saved all these functions in one file.
- Should I separate them into grouped files ?
- Is there any reference on the web on how to arrange my PHP code?
Regards,
Hamid Hossain
-----------------------
Check Amazon.com Latest PHP books:
http://www.amazon.com/exec/obidos/redirect?tag=zawraqclassif-20&path=tg/browse/-/295223
Start Accepting CreditCard at your site in minutes:
http://www.2checkout.com/cgi-bin/aff.2c?affid=106720
Download Alexa Tool Bar to stop Pop-ups for FREE:
http://download.alexa.com/?amzn_id=zawraqclassif-20
Download Ready-Made Templates for your site:
http://www.aplustemplates.com/cgi/affiliates/c1.cgi/zawraq_ad
-----------------------
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
--- End Message ---
--- Begin Message ---
Hello Hamid,
Saturday, February 14, 2004, 5:09:46 PM, you wrote:
HH> I've created a big site contains about 500 functions to handle all the site
HH> logic. I saved all these functions in one file.
HH> - Should I separate them into grouped files ?
For your own sanity, more than anything else, yes.
HH> - Is there any reference on the web on how to arrange my PHP code?
Yes, but there is no "standard" way to do it. Each to their own shall
we say.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--- End Message ---
--- Begin Message ---
yeah. phpinfo() works, which is how I know for sure that PHP is working
fine. It's just not taking inputs. WTF is going? hehe....I'm going nuts over
here. Any other ideas?
From: "Vail, Warren" <[EMAIL PROTECTED]>
To: "'Dan Aloma'" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: RE: [PHP] [Q]PHP not taking input values from forms
Date: Fri, 13 Feb 2004 14:40:48 -0700
I'd try to insert a simple echo statement, and figure out why it's not
returning anything.
try a file named phpinfo.php
----------------snip--------------
<?php
phpinfo();
?>
----------------snip---------------
if your web server implementation is correct that should work.
good luck,
Warren Vail
-----Original Message-----
From: Dan Aloma [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 12:38 PM
To: Vail, Warren
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] [Q]PHP not taking input values from forms
when i run that, it doesn't show return anything. I really don't understand
what's going on with php. I know it's working fine, it's just not returning
anything. Even scripts that I KNOW for a fact should be working (i.e. they
work for everyone else), don't work for me. Any other ideas? I REALLY need
to get this running, and it's upsetting because I don't get what's going
on.
TIA.
>From: "Vail, Warren" <[EMAIL PROTECTED]>
>To: "'Philip Olson'" <[EMAIL PROTECTED]>, Dan Aloma
><[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: RE: [PHP] [Q]PHP not taking input values from forms
>Date: Thu, 12 Feb 2004 14:03:05 -0800
>
>Suggestion,
>
>Stick the following line of code in a spot in the php code that gets
>control
>from the form submit and see what is actually being passed from the form;
>
>foreach($_POST as $k => $v) echo "POST[".$k."] = [".$v."]<br>";
>
>see if this shows you what you are looking for.
>
>NOTE: if you are not using the form "POST" method, change all instances
of
>"POST" to "GET" in the statement.
>
>good luck,
>
>Warren Vail
>
>
>-----Original Message-----
>From: Philip Olson [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 12, 2004 1:55 PM
>To: Dan Aloma
>Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: Re: [PHP] [Q]PHP not taking input values from forms
>
>
>
> > > > that tag is working fine and shows me the info. For some reason
php
>will
> > > > take input values only from the URL, not from the html code. any
>ideas?
> > >
> > >A few questions:
> > >
> > > a) What's the exact version of PHP?
> > > b) Please post the smallest possible form that creates this
> > > problem.
> > > c) And how are you attempting to access these form values?
> > >
> > >If you're interested in some working examples and related
> > >information, have a look at the following manual page:
> > >
> > > http://www.php.net/variables.external
> >
> > Thanks for the suggestions, first of all. I tried that exact code from
>the
>
> > code you included and I cut and pasted the "Simple HTML Form", and
below
> > that I pasted the "Accessing Data..." php code. When I go to the page,
>all
>
> > it does after I hit the submit button with data in the fields, is say
>"no
> > input file specified". But when I run it through the url giving the
>input
> > names with values, it returns them. I tried getting it working with
like
>ten
> > people so far, and no one's been able to figure out... I am running
PHP
> > 4.3.4, btw.
> >
>
>Be sure you rename the "action" part of the "simple html form"
>to whatever page you are using, instead of foo.php, as otherwise
>it will literally attempt to access foo.php I'm guessing this
>is what's happening by seeing "no input file specified".
>
>Either fix that or on that same manual page is the example
>titled "More complex form variables", this prints to itself
>as it demonstrates a use of the popular $_SERVER['PHP_SELF']
>variable.
>
>Also, it's important you realize the difference between POST
>and GET, and how to access them, so you may want to read that
>manual page too. (hint: GET is through the URL's QUERY_STRING
>(the stuff after the ?) while POST is not).
>
>Regards,
>Philip
>
>--
>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
>
>
_________________________________________________________________
Keep up with high-tech trends here at "Hook'd on Technology."
http://special.msn.com/msnbc/hookedontech.armx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Click here for a FREE online computer virus scan from McAfee.
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--- End Message ---
--- Begin Message ---
Hello Dan,
Saturday, February 14, 2004, 5:19:26 PM, you wrote:
DA> yeah. phpinfo() works, which is how I know for sure that PHP is working
DA> fine. It's just not taking inputs. WTF is going? hehe....I'm going nuts over
DA> here. Any other ideas?
The fact that you cannot post any data to your installation of PHP
somewhat highlights the fact that either PHP or your web server
configuration are most certainly *not* working fine at all.
You already know it's nothing to do with your code, you've tried
various pieces of other code (including some from myself) and each and
every time it shows the same thing - you cannot post data to your
scripts.
Surely it's quite obvious you should now be talking to your web host,
or re-configuring your server/firewall if you did it yourself, because
the problem is now conclusively demonstrated as being there.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--- End Message ---
--- Begin Message ---
Hi.
Is it possible to get IIS 6 to show php sources. ( phps files )
And how do I do that, I have not found anything about it on php.net or
www.google.com <http://www.google.com/>
Regards
anders
--- End Message ---
--- Begin Message ---
Yes you just have to set the filetype in the filetype associations in IIS 6,
are you using SBS2003?
Jason Lewis
"Anders Gjermshus" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi.
>
>
>
> Is it possible to get IIS 6 to show php sources. ( phps files )
>
> And how do I do that, I have not found anything about it on php.net or
> www.google.com <http://www.google.com/>
>
>
>
> Regards
>
> anders
>
>
>
>
--- End Message ---
--- Begin Message ---
I'm using Windows 2003 server with IIS 6
I have installed php using isap not cgi.
I really need this to work :)
- anders
-----Opprinnelig melding-----
Fra: Jason Lewis [mailto:[EMAIL PROTECTED]
Sendt: 14. februar 2004 19:04
Til: [EMAIL PROTECTED]
Emne: [PHP] Re: phps and iis
Yes you just have to set the filetype in the filetype associations in IIS 6,
are you using SBS2003?
Jason Lewis
"Anders Gjermshus" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi.
>
>
>
> Is it possible to get IIS 6 to show php sources. ( phps files )
>
> And how do I do that, I have not found anything about it on php.net or
> www.google.com <http://www.google.com/>
>
>
>
> Regards
>
> anders
>
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
It is possible:
http://www.macromedia.com/devnet/mx/dreamweaver/articles/php_iis.html
-----
zerof
-----
"Anders Gjermshus" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Is it possible to get IIS 6 to show php sources. ( phps files )
-----------
--- End Message ---