php-general Digest 27 Sep 2009 21:28:09 -0000 Issue 6361
Topics (messages 298374 through 298376):
Re: turning off a E_STRICT or fix for a bad coding habit
298374 by: Ralph Deffke
AS-EL Yeni Ürün Bilgilendirmesi
298375 by: AS-EL Yapý Market E-Bülten Sistemi
Issue of upgrading from to 5.x
298376 by: Chris Streatfield
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 Viraj,
well from the viewpoint of the PHP developers, it depends if u allow to
extend a class before it is been declared. If it is allowed that way, then
yes you are right none of the sniped should create an error. If u study the
bug report, u will see that the class is extended before it is declared. If
u have to declare a calss before u can extend it and it is set as a rule,
then yes the interpreter should fire an error.
I think in your code must be something similar to this, extention before
declaration. I'm not shure but if PHP goes towards variable declaration
feature ( PHP 6 ? ), the result would be that extention of a class before
declaration will be prohibited.
Right now it seems to me that the interpreter is allowing extention before
declaration, however takes the first overwriting method as its declaration
and of course that would fire the error you have.
I personally have no such problems, as since ever I try to program in the
way strict languages like JAVA require and found it as best practice. That
means e.g. declaration strict before extention/use of functions and classes.
I also avoid even NOTICE messages.
One last thing, an entry in the PHP buglist doesn't mean it is a bug.
It would be helpfull to see the complete code firing this error, but I
assume its a bit large to sniip here.
[email protected]
"viraj" <[email protected]> wrote in message
news:[email protected]...
> just upgraded to php 5.2.10-2.2 on debian
>
> now i get this error
>
> [2048] Declaration of form::bindData() should be compatible with that
> of db::bindData()
>
> i use __autoload to load these classes.. found this bug report
> http://bugs.php.net/bug.php?id=46851, i thought it's this new E_STRICT
> bit and tried to turn it off, but didn't help.
>
> this code was working perfect before.. even with this error.. it
> works. any idea about a workaround? or some reading suggestions!
>
> many thanks
>
> ~viraj
--- End Message ---
--- Begin Message ---
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
shape {behavior:url(#default#VML);}
Untitled Document
H.Arbay HACUNOĞLU
Normal
H.Arbay HACUNOĞLU
7
18
2009-09-16T08:53:00Z
2009-09-24T06:44:00Z
1
195
1112
AS-EL Yapı Market A.Ş.
9
2
1305
12.00
false
21
false
false
false
TR
X-NONE
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Normal Tablo";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
No
Need to Paint or Overhaul Anymore.
AS-EL PVC Fence Profiles
AS-EL Yapı Endüstri Market A.Ş.
5709 sk. No 39 Karabağlar İzmir Turkey
+90 (232) 264 66 66
Mail listesinden
çıkmak için lütfen [email protected]
adresine boş bir mail atınız.
To unsubscribe
from mailing list, please mail us a blank [email protected]
address.
Bu elektronik posta ve onunla iletilen bütün dosyalar sadece göndericisi
tarafindan almasi amaclanan yetkili gercek ya da tüzel kisinin kullanimi
icindir. Eger söz konusu yetkili alici degilseniz bu elektronik postanin
icerigini aciklamaniz, kopyalamaniz, yönlendirmeniz ve kullanmaniz kesinlikle
yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir.
This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient you are hereby notified that
any dissemination, forwarding, copying or use of any of the information is
strictly prohibited, and the e-mail should immediately be deleted.
--- End Message ---
--- Begin Message ---
Here's a little problem I'm just discovering.
The issue has been brought to my attention by a couple of my clients when
their mail() replies were suddenly turning up with zero variable content.
I have several html/php contact/subscribe forms which return a mail reply to
the web site owner. These have recently been turning up with none of the
variables being picked up from the html form. The mail() library is still
sending the reply correctly. All the material is hosted on commercial ISP web
servers. A couple of them have clearly upgraded to PHP 5.x recently.
When a user fills out the form and presses the submit button the process page
picks up the variables from the input and mails the output back to the site
owner. Recently some of these replies have started to show up with the
variables not being picked up. On looking through the official PHP
documentation it would seem to be an issue of the change in the use of
globals being turned off by default in 5.x onwards. I found an example of a
function in the documentation to include that simulates globals being turned
on but this does not seem to be working as expected.
While this is a very simple (and possibly only a bit irritating) problem the
nightmare scenario for me is that I have a great many files (read several Ks)
that rely on the same functionality, as the access to several MySql
databases. I have very quickly tested a couple of these database constructs
on one of the hosting sites where the mail() forms have failed and the
database constructs do not work either. I really would prefer not to have to
spend the whole of the next year re-writing all these files especially as
this work is all voluntary.
Now if these very simple html form / php processing structures are now going
to fail by not retrieving the variables what are we supposed to do to create
web site contact forms or data entry pages for database access. I have tried
constructing the forms as hybrid php/html and included the function noted
above and this did not work either. In fact on one of the servers running the
upgrade even logging on to the database construct froze at the first
processing page. I think that either this <quote>
header("Location: adminhome.php");
exit(); </quote> failed to trigger or the "session_register();" failed.raised
Any suggestions advice would be most welcome.
I have included an example snippet of code from one of the mailback forms that
has been working correctly for several years.
A snippet of example code--------
The Form:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="css/formpage.css" type="text/css" />
<title>On-line Membership form</title>
</head>
<body>
<form method="post" action="psubscription1.php">
<h3>Join the Campaign</h3>
<p><b>ON-LINE ANNUAL SUBSCRIPTION FORM</b></p>
<fieldset>
<legend>Contact Details</legend>
<ul>
<li><label for="firstname">Name</label>
<input name="firstname" id="firstname" class="text" type="text"
size="35" /></li>
<li><label for="address">Address</label>
<input name="address" id="address" class="text" type="text" size="35" /></li>
<li><label for="suburb">Suburb</label>
<input name="suburb" id="suburb" class="text" type="text" size="35" /></li>
<li><label for="city">City/Postcode</label>
<input name="city" id="city" class="text" type="text" size="35" /></li>
<li><label for="tel">Phone</label>
......
</form>
</body>
</html>
---------------------ENDS---------------
The processing done in <psubscription1.php>-----
<?php
$toaddress="[email protected]";
$subject = "On-line Membership subscription";
$mailcontent="This is the reply from the on-line membership subscription form
on the web-site.
Contact Details---------\n
Name:----- $firstname
Address:------
$address
$suburb
$city\n
Phone:------- $tel
...
--------------";
$additionalheaders="From: [email protected]\n";
mail($toaddress, $subject, $mailcontent, $additionalheaders);
?>
-------------------ENDS----------------
All the best
Chris
--- End Message ---