php-general Digest 7 Jul 2009 21:46:12 -0000 Issue 6217
Topics (messages 294991 through 295003):
Re: How to stop E_DEPRECATED messages in the PHP log?
294991 by: Tom Worster
294992 by: Richard Quadling
294995 by: Jeff Weinberger
294997 by: Daniel Brown
294998 by: Jeff Weinberger
295000 by: Tom Worster
295002 by: Tom Worster
Re: PHP Manual in PDF format
294993 by: Richard Quadling
295003 by: James Colannino
Re: Advise on starting a web store site
294994 by: tedd
Re: Simple login form with cookies
294996 by: PJ
Re: Browser Alert
294999 by: Jan G.B.
Re: How to authnticate and use contents from ${HOME}
295001 by: Jan G.B.
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 ---
On 7/7/09 1:23 AM, "Jeff Weinberger" <[email protected]> wrote:
> On Jul 6, 2009, at 7:47 PM, Paul M Foster wrote:
>
>> On Mon, Jul 06, 2009 at 02:16:09PM -0700, Jeff Weinberger wrote:
>>
>>> Hi:
>>>
>>> I am hoping someone can help me figure this out....
>>>
>>> I've just upgraded my PHP installation to 5.3.0. Now I am receiving
>>> thousands of log messages of the form "PHP Deprecated: ...".
>>>
>>> I know I have a number of scripts that use now-deprecated functions,
>>> etc. and I now know what those are, thanks to all the messages.
>>>
>>> However, this is now growing to (literally) gigabytes of log entries,
>>> so I'd like to stop the messages until I have the time to re-write
>>> all
>>> the offending scripts.
>>>
>>> I have tried the following error.reporting lines in php.ini:
>>>
>>> error_reporting = E_ALL & ~E_DEPRECATED & E_ERROR & E_WARNING &
>>> E_PARSE & E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING &
>>> E_USER_NOTICE & E_COMPILE_ERROR & E_COMPILE_WARNING
>>>
>>> error_reporting = ~E_DEPRECATED & E_ALL & E_ERROR & E_WARNING &
>>> E_PARSE & E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING &
>>> E_USER_NOTICE & E_COMPILE_ERROR & E_COMPILE_WARNING
>>>
>>> error_reporting = E_ALL & E_ERROR & E_WARNING & E_PARSE & E_NOTICE &
>>> E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE &
>>> E_COMPILE_ERROR & E_COMPILE_WARNING & ~E_DEPRECATED
>>>
>>> error_reporting = E_ERROR & E_CORE_ERROR & E_USER_ERROR &
>>> E_COMPILE_ERROR & E_COMPILE_WARNING & ~E_DEPRECATED
>>>
>>> error_reporting = ~E_DEPRECATED & E_ERROR & E_CORE_ERROR &
>>> E_USER_ERROR & E_COMPILE_ERROR & E_COMPILE_WARNING
>>>
>>> (as you can tell, I prefer verbose logs, but not that verbose...).
>>>
>>> None of these combinations have stopped the "PHP Deprecated: ..."
>>> messages.
>>>
>>> System info: Mac OS/X 10.5.7 Client version, PHP 5.3.0 running as a
>>> CGI under Apache 2.2.11 and as a CLI. Please let me know if there's
>>> any other info that might help.
>>>
>>> php_info() reports error.reporting as "0"
>>>
>>> Any help or guidance is appreciated!!
>>
>> Try
>>
>> error_reporting(E_ALL ^ E_DEPRECATED);
>>
>> See http://us2.php.net/manual/en/function.error-reporting.php for more
>> info and examples.
>>
>> Paul
>>
>> --
>> Paul M. Foster
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> Paul:
>
> Thanks for your suggestion - it would work nicely, except that that is
> a runtime function that is called within a script.
>
> I am trying to get the php.ini setting correct to avoid the Deprecated
> messages.
>
> I tried error_reporting=E_ALL & ~E_DEPRECATED (which I think is the
> php.ini analogy to your suggestion) to no avail - it failed also.
>
> leaving me still confused....
how about running this to find the int value to put into php.ini:
<?php
error_reporting(E_ALL ^ E_DEPRECATED);
echo error_reporting();
?>
i don't have 5.3 so i haven't tried.
--- End Message ---
--- Begin Message ---
2009/7/6 Jeff Weinberger <[email protected]>:
> Hi:
>
> I am hoping someone can help me figure this out....
>
> I've just upgraded my PHP installation to 5.3.0. Now I am receiving
> thousands of log messages of the form "PHP Deprecated: ...".
>
> I know I have a number of scripts that use now-deprecated functions, etc.
> and I now know what those are, thanks to all the messages.
>
> However, this is now growing to (literally) gigabytes of log entries, so I'd
> like to stop the messages until I have the time to re-write all the
> offending scripts.
>
> I have tried the following error.reporting lines in php.ini:
>
> error_reporting = E_ALL & ~E_DEPRECATED & E_ERROR & E_WARNING & E_PARSE &
> E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE &
> E_COMPILE_ERROR & E_COMPILE_WARNING
>
> error_reporting = ~E_DEPRECATED & E_ALL & E_ERROR & E_WARNING & E_PARSE &
> E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE &
> E_COMPILE_ERROR & E_COMPILE_WARNING
>
> error_reporting = E_ALL & E_ERROR & E_WARNING & E_PARSE & E_NOTICE &
> E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE &
> E_COMPILE_ERROR & E_COMPILE_WARNING & ~E_DEPRECATED
>
> error_reporting = E_ERROR & E_CORE_ERROR & E_USER_ERROR & E_COMPILE_ERROR &
> E_COMPILE_WARNING & ~E_DEPRECATED
>
> error_reporting = ~E_DEPRECATED & E_ERROR & E_CORE_ERROR & E_USER_ERROR &
> E_COMPILE_ERROR & E_COMPILE_WARNING
>
> (as you can tell, I prefer verbose logs, but not that verbose...).
>
> None of these combinations have stopped the "PHP Deprecated: ..." messages.
>
> System info: Mac OS/X 10.5.7 Client version, PHP 5.3.0 running as a CGI
> under Apache 2.2.11 and as a CLI. Please let me know if there's any other
> info that might help.
>
> php_info() reports error.reporting as "0"
>
> Any help or guidance is appreciated!!
>
> Thanks,
>
> --Jeff
>
>
>
> No one ever achieved greatness by playing it safe. -Harry Gray
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Try ...
error_reporting = 22527
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
I need a car : http://snipurl.com/l4pih
ZOPA : http://uk.zopa.com/member/RQuadling
--- End Message ---
--- Begin Message ---
On Jul 7, 2009, at 5:50 AM, Richard Quadling wrote:
2009/7/6 Jeff Weinberger <[email protected]>:
Hi:
I am hoping someone can help me figure this out....
I've just upgraded my PHP installation to 5.3.0. Now I am receiving
thousands of log messages of the form "PHP Deprecated: ...".
I know I have a number of scripts that use now-deprecated
functions, etc.
and I now know what those are, thanks to all the messages.
However, this is now growing to (literally) gigabytes of log
entries, so I'd
like to stop the messages until I have the time to re-write all the
offending scripts.
I have tried the following error.reporting lines in php.ini:
error_reporting = E_ALL & ~E_DEPRECATED & E_ERROR & E_WARNING &
E_PARSE &
E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING &
E_USER_NOTICE &
E_COMPILE_ERROR & E_COMPILE_WARNING
error_reporting = ~E_DEPRECATED & E_ALL & E_ERROR & E_WARNING &
E_PARSE &
E_NOTICE & E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING &
E_USER_NOTICE &
E_COMPILE_ERROR & E_COMPILE_WARNING
error_reporting = E_ALL & E_ERROR & E_WARNING & E_PARSE & E_NOTICE &
E_CORE_ERROR & E_USER_ERROR & E_USER_WARNING & E_USER_NOTICE &
E_COMPILE_ERROR & E_COMPILE_WARNING & ~E_DEPRECATED
error_reporting = E_ERROR & E_CORE_ERROR & E_USER_ERROR &
E_COMPILE_ERROR &
E_COMPILE_WARNING & ~E_DEPRECATED
error_reporting = ~E_DEPRECATED & E_ERROR & E_CORE_ERROR &
E_USER_ERROR &
E_COMPILE_ERROR & E_COMPILE_WARNING
(as you can tell, I prefer verbose logs, but not that verbose...).
None of these combinations have stopped the "PHP Deprecated: ..."
messages.
System info: Mac OS/X 10.5.7 Client version, PHP 5.3.0 running as a
CGI
under Apache 2.2.11 and as a CLI. Please let me know if there's any
other
info that might help.
php_info() reports error.reporting as "0"
Any help or guidance is appreciated!!
Thanks,
--Jeff
No one ever achieved greatness by playing it safe. -Harry Gray
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try ...
error_reporting = 22527
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
I need a car : http://snipurl.com/l4pih
ZOPA : http://uk.zopa.com/member/RQuadling
Richard (and Tom):
This seemed like it would be the perfect solution...but alas it did
not work. 22527 seems right, but after changing php.ini to that and
restarting php and apache, I am still getting "Deprecated..." messages.
:(
I'll keep trying...and any other suggestions are much appreciated!
Thanks!
A wise man will make more opportunities than he finds. -Francis Bacon
--- End Message ---
--- Begin Message ---
On Tue, Jul 7, 2009 at 11:03, Jeff Weinberger<[email protected]> wrote:
>
> This seemed like it would be the perfect solution...but alas it did not
> work. 22527 seems right, but after changing php.ini to that and restarting
> php and apache, I am still getting "Deprecated..." messages.
Dumb question, Jeff: are you sure you're editing the correct php.ini file?
--
</Daniel P. Brown>
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig
--- End Message ---
--- Begin Message ---
On Jul 7, 2009, at 8:38 AM, Daniel Brown wrote:
On Tue, Jul 7, 2009 at 11:03, Jeff
Weinberger<[email protected]> wrote:
This seemed like it would be the perfect solution...but alas it did
not
work. 22527 seems right, but after changing php.ini to that and
restarting
php and apache, I am still getting "Deprecated..." messages.
Dumb question, Jeff: are you sure you're editing the correct
php.ini file?
--
</Daniel P. Brown>
[email protected] || [email protected]
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel:
Not a dumb question at all! I check every time (php_info()) to make
sure the "loaded configuration file" is the one I'm editing. So, as
far as I can tell, yes.
Should I be looking at something else to be sure?
Thanks!
--Jeff
UNIX is the Klingon of cyberspace. -from The Cluetrain Manifesto
--- End Message ---
--- Begin Message ---
On 7/7/09 11:38 AM, "Daniel Brown" <[email protected]> wrote:
> On Tue, Jul 7, 2009 at 11:03, Jeff Weinberger<[email protected]> wrote:
>>
>> This seemed like it would be the perfect solution...but alas it did not
>> work. 22527 seems right, but after changing php.ini to that and restarting
>> php and apache, I am still getting "Deprecated..." messages.
>
> Dumb question, Jeff: are you sure you're editing the correct php.ini file?
i was about to ask the same.
phpinfo() will tell you the path to the in-effect config file.
--- End Message ---
--- Begin Message ---
On 7/7/09 12:17 PM, "Jeff Weinberger" <[email protected]> wrote:
> On Jul 7, 2009, at 8:38 AM, Daniel Brown wrote:
>
>> On Tue, Jul 7, 2009 at 11:03, Jeff
>> Weinberger<[email protected]> wrote:
>>>
>>> This seemed like it would be the perfect solution...but alas it did
>>> not
>>> work. 22527 seems right, but after changing php.ini to that and
>>> restarting
>>> php and apache, I am still getting "Deprecated..." messages.
>>
>> Dumb question, Jeff: are you sure you're editing the correct
>> php.ini file?
>>
>> --
>> </Daniel P. Brown>
>> [email protected] || [email protected]
>> http://www.parasane.net/ || http://www.pilotpig.net/
>> Check out our great hosting and dedicated server deals at
>> http://twitter.com/pilotpig
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Daniel:
>
> Not a dumb question at all! I check every time (php_info()) to make
> sure the "loaded configuration file" is the one I'm editing. So, as
> far as I can tell, yes.
>
> Should I be looking at something else to be sure?
i've now had a look at http://www.php.net/manual/en/errorfunc.constants.php
in your shoes i'd try out 2047 (with is everything up to and including
E_USER_NOTICE) and possibly 6143 (=2047+4096) if you have your own error
handler.
if still no luck i can't think of anything else to suggest but work
backwards:
check the value returned by error_reporting() is the value you set in
php.ini.
binary decode it to double check.
if it sill makes no sense, check the php bugs db. and if nothing, maybe
report it.
--- End Message ---
--- Begin Message ---
2009/7/7 Angus Mann <[email protected]>:
> Hi all. I realize this question has been asked before and I've found
> responses in the archive, but none of the links work now, or the files they
> point to are old or unsuitable.
>
> I'd like to print the most recent PHP manual to paper, so I need it in a
> format that's suitable. I've downloaded it from php.net in chm and HTML
> format but neither of them can easily be printed with proper attention to
> page numbering and order.
>
> Any idea where to find a PDF or similar version of the manual?
>
> Thanks,
> Angus
>
>
$ pecl install haru
$ pear channel-discover doc.php.net
$ pear install doc.php.net/phd-beta
$ cvs -d:pserver:[email protected]/repository login
(the password is "phpfi")
$ cvs -d:pserver:[email protected]/repository co phpdoc
$ cd phpdoc
$ php configure.php
$ phd -f pdf -t phppdf -d .manual.xml
Now open the newly created "pdf" folder :)
If you'd like a big fat one PDF file then use "phpbigpdf" rather then "phppdf"
The PDF version will be available soon. Ish. Maybe. Hopefully.
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
I need a car : http://snipurl.com/l4pih
ZOPA : http://uk.zopa.com/member/RQuadling
--- End Message ---
--- Begin Message ---
Richard Quadling wrote:
> $ pecl install haru
> [...]
> $ phd -f pdf -t phppdf -d .manual.xml
I installed haru, yet when I try the phd command, I get a "class
'HaruDoc' not found" error :( Has this happened to anyone else?
James
--- End Message ---
--- Begin Message ---
At 1:15 PM +0100 7/6/09, Matthew Croud wrote:
Hi,
I'm going to start my first e commerce website for a small web shoe store.
I think I know enough PHP to keep my head above water, I'm using an
add on shopping cart package to deal with the transactions.
My question is, what's the best way to design a site where each
product appears to have its own page.
Is there a way to create the site *without* having each product have
a physical separate page ?
Is there a method of web design which makes creating new pages
simple if they all follow the same pattern. i.e thumbnail,
description etc.
Thanks guys,
Matt.
Mat:
Certainly, here's an example:
http://ancientstones.com/
Each item is pulled from a database and the catalog is assembled as
the user instructs. When the user clicks on an item, then an
individual page is assemble to show that item. There are no static
pages, but rather templates where the contents are pulled from a
database to fill the templates (catalog page and item page) as the
user shows interest.
I also have a back-end script that allow the owner to upload pictures
of his product and add content (i.e., title, description, price).
Additionally, the "shopping cart" I use here is provided by PayPal
and NOT something I installed. Believe me, dealing with credit card
transactions is not without concern and liability. I recommend with a
small web store, it is worth considering passing all that
responsibility off to a company that deals with it routinely. It's a
simple process to use PayPal.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
PJ wrote:
> Jason Carson wrote:
>
>>> On Mon, Jul 6, 2009 at 02:19, Jason Carson<[email protected]> wrote:
>>>
>>>
>>>> ok, I have two sets of scripts here. One uses setcookie() for logging
>>>> into
>>>> the admin panel and the other uses session_start(). Both are working
>>>> fine,
>>>> is one more secure than the other?
>>>>
>>>>
>>> $_COOKIE data is written to a file that is readable/writeable and
>>> stored on the user's side of things. $_SESSION data is written to the
>>> server, with a cookie stored on the user's side containing just the
>>> PHPSESSID (session ID) string to identify the session file on the
>>> server.
>>>
>>> So determining which is better and/or more secure is really a
>>> matter of the data held there and how it's handled. If storing things
>>> like usernames or you absolutely want to store personal data in an
>>> active session, do so in $_SESSION. If you're storing a password or
>>> credit card number in the active session, you may as well do it in
>>> $_COOKIE, because you're already using an insecure model. ;-P
>>>
>>> --
>>> </Daniel P. Brown>
>>> [email protected] || [email protected]
>>> http://www.parasane.net/ || http://www.pilotpig.net/
>>> Check out our great hosting and dedicated server deals at
>>> http://twitter.com/pilotpig
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>>
>>>
>> Well I'm a newbie when it comes to PHP and programming. I guess I need to
>> read up on login security. Do you know of, or recommend, any websites that
>> will show me how to secure my login model (Using cookies or sessions).
>>
>>
>>
> Hi Jason,
> I'm probably not any wiser than you, but I have just (today) discovered
> an interesting site that seems to have some really clear explanations
> and tutorials re php, MySsql et al.
> It's worth looking at (I'm trying to implement something like what you
> are, as well):
> http://www.brainbell.com/tutors/php/php_mysql/Authorizing_User_Access.html
> HTH,
> PJ
>
>
I just found another site which is easier to deal with (chapter
references) and seems to be the original source of the brainbell site:
http://home.bolink.org/ebooks/webP/webdb/index.htm
--
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- [email protected]
http://www.ptahhotep.com
http://www.chiccantine.com/andypantry.php
--- End Message ---
--- Begin Message ---
2009/7/4 tedd <[email protected]>
>
> So, if you're having problems with Safari 4.0 on Mac OSX uploading files,
> you're not alone.
>
s/uploading files// ;)
To make this posting useful: The thing might be related to this Bug
http://www.webmasterworld.com/macintosh_webmaster/3300569.htm
But, since you did post only a few details, no one can know for sure.
--- End Message ---
--- Begin Message ---
2009/7/6 Isaac Dover <[email protected]>
> Hi Chantale, as Bastien mentioned, a preconfigured package might be the
> best
> way to go. Wikipedia has more information:
>
> http://en.wikipedia.org/wiki/List_of_LAMP_Packages
>
> What are you wanting to build in your interface?
>
> - Isaac
>
> On Mon, Jul 6, 2009 at 9:14 AM, Bastien Koert <[email protected]> wrote:
>
> > Try xamp or one of the preconfigured packages
> >
> > bastien
> >
> > On Sunday, July 5, 2009, <[email protected]> wrote:
> > > Hello,
> > >
> > > My name ich Chantale, I am 15years old and in a german Lycee. I like to
> > study Informatic in two years and now try to code my first applications.
> I
> > am new to php and like to code my own Intranet Web-Interface which should
> > run on my FileServer at home.
> > >
> > > I have installed suPHP, but it seems to be not the thing I need,
> because
> > it works only on a VHost.
> > >
> > > What I need is, that a ${USER} can login and work on her/his ${HOME}.
> > >
> > > How can I archive this?
> > >
> > > Thank you
> > > Chantale
> > >
> > >
>
Installing LAMP is not a good idea for productive servers. Always stick with
the Packages of your distribution to get all upgrades.
Activating a module isn't hard at all, so... there's not really a need for
packages like "LAMP" on a unix-like OS.
The point in not using such Packages like LAMP on a system which isn't
productive is learning to set up a productive server. You decide.
mod_auth_pam might be a way fo accomplish what you want.
Just my two cent.
--- End Message ---