php-general Digest 21 Mar 2011 17:58:30 -0000 Issue 7236
Topics (messages 311977 through 311979):
[Solved] Problem with PHP 5.3.3 under Debian/Squeeze
311977 by: Michelle Konzack
Re: Problem with PHP 5.3.3 under Debian/Squeeze
311978 by: Stuart Dallas
Question about directory permissions
311979 by: Al
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 ---
Fscking Debian installer has killed/replaced all of my configs and
restructured it. Now installing the backups from Lenny is working
properly...
Thanks, Greetings and nice Day/Evening
Michelle Konzack
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
itsystems@tdnet France EURL itsystems@tdnet UG (limited liability)
Owner Michelle Konzack Owner Michelle Konzack
Apt. 917 (homeoffice)
50, rue de Soultz Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix
<http://www.itsystems.tamay-dogan.net/> <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/> <http://www.can4linux.org/>
Jabber [email protected]
ICQ #328449886
Linux-User #280138 with the Linux Counter, http://counter.li.org/
signature.pgp
Description: Digital signature
--- End Message ---
--- Begin Message ---
On Sunday, 20 March 2011 at 18:38, Michelle Konzack wrote:
Hello *,
>
> since I have re-installed <mail.tamay-dogan.net> with Debian/Squeeze on
> a new machine, my /srv/log/apache/error.log ist arround 450 times bigger
> then the access.log du to following (and similar) entries
>
> ----[ '/srv/log/apache/error.log' ]-------------------------------------
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of
> undefined constant DIR_BASE - assumed 'DIR_BASE' in /srv/htdocs/index.php on
> line 3
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of
> undefined constant DIR_TOOL - assumed 'DIR_TOOL' in /srv/htdocs/index.php on
> line 5
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of
> undefined constant DEF_DIR_TOOL - assumed 'DEF_DIR_TOOL' in
> /srv/tdphp-vserver/includes/00_main.inc on line 42
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of
> undefined constant DEF_DIR_BASE - assumed 'DEF_DIR_BASE' in
> /srv/tdphp-vserver/includes/00_main.inc on line 65
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of
> undefined constant DIR_HOST - assumed 'DIR_HOST' in
> /srv/tdphp-vserver/includes/00_main.inc on line 88
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice: Use of
> undefined constant SCRIPT_FILENAME - assumed 'SCRIPT_FILENAME' in
> /srv/tdphp-vserver/includes/00_main.inc on line 88
> <snip>
> ------------------------------------------------------------------------
>
> ----[ '/srv/htdocs/index.php' ]-------------------------------------
> <?php
>
> define(DIR_BASE, "/srv");
>
> define(DIR_TOOL, "/srv/tdphp-vserver");
> include DIR_TOOL . "/includes/00_main.inc";
>
> ?>
> ------------------------------------------------------------------------
>
> Maybe I am sitting on the line? This index.php file and the website is
> working since ages.
The first parameter of the define function should be a string.
> Whats the name of the error loging setting which produce this and WHY are
> they now reported?
It would appear that your new server has defaulted to logging PHP notices. You
can turn this off in your php.ini, or better yet fix the issues that are
causing them. In my experience notices can often indicate more serious
potential bugs.
> I have switched off anything but it continue to create more then 46 GByte
> error files (18) per day.
>
> Also I get
>
> ----[ '/srv/log/apache/error.log' ]-------------------------------------
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice:
> Undefined offset: 1 in /srv/tdphp-vserver/includes/04_l10n.inc on line 56
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice:
> Undefined offset: 1 in /srv/tdphp-vserver/includes/04_l10n.inc on line 56
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice:
> Undefined offset: 1 in /srv/tdphp-vserver/includes/04_l10n.inc on line 56
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice:
> Undefined variable: locale in /srv/tdphp-vserver/includes/04_l10n.inc on line
> 74
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice:
> Undefined index: what in /srv/tdphp-vserver/includes/00_main.inc on line 249
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice:
> Undefined index: csslink in /srv/tdphp-vserver/includes/00_main.inc on line
> 284
> [Thu Mar 17 00:14:16 2011] [error] [client 89.204.153.240] PHP Notice:
> Undefined index: cookie in /srv/tdphp-vserver/includes/00_main.inc on line 298
> ------------------------------------------------------------------------
>
> ----[ '/srv/tdphp-vserver/includes/04_l10n.inc' ]-----------------------
> [0051] if ( $_SERVER['HTTP_ACCEPT_LANGUAGE'] != '') {
> [0052] foreach(explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $ACC1) {
> [0053] $ACC2=explode(';', $ACC1);
> [0054] $ACC3=explode('-', $ACC2[0]);
> [0055] $LL=$ACC3[0];
> [0056] $CC=strtoupper($ACC3[1]);
> [0057] if ( $CC != '') {
> [0058] $LOC=$LL . "_" . $CC;
> [0059] } else {
> [0060] $LOC=$LL;
> [0061] }
> [0062] if ( stristr(" " . LOCALES . " ", " $LOC ") ) {
> [0063] $TMP_FILE=LOCALE_DIR . "/" . $LOC . "/LC_MESSAGES/" .
> $_SERVER['SERVER_NAME'] . ".mo";
> [0064] if (is_file($TMP_FILE)) {
> [0065] $locale=$LOC;
> [0066] break;
> [0067] }
> [0068] }
> [0069] }
> [0070] } else {
> [0071] $locale=(isset($_GET['lang']))? $_GET['lang'] : DEFAULT_LOCALE;
> [0072] }
> [0073]
> [0074] T_setlocale(LC_MESSAGES, $locale);
> [0075] $domain=$_SERVER['SERVER_NAME'];
> [0076] T_bind_textdomain_codeset($domain, $encoding);
> [0077] T_bindtextdomain($domain, LOCALE_DIR);
> [0078] T_textdomain($domain);
> [0079] /* *************************** END gettext stuff
> *************************** */
> [0080] ?>
> -------------------------------------------------------------------------
Have a look at what $_SERVER['HTTP_ACCEPT_LANGUAGE'] is set to because it's
clearly not in the format this code is expecting.
> ----[ '/srv/tdphp-vserver/includes/00_main.inc' ]------------------------
> [0248] /* ************************ DISPLAY admin ************************* */
> [0249] if ( $_POST['what'] == 'admin' ) {
> [0250]
> [0251] function do_auth() {
> <snip>
> [0283] /* *************************** FIX CSS **************************** */
> [0284] if ($_GET['csslink'] != '') {
> [0285] if ($_GET['csslink'] == 'foo') {
> <snip>
> [0297] /* ******************** SET and UNSET COOKIES ********************* */
> [0298] if ( $_GET['cookie'] != '' ) {
> [0299] if ($_GET['cookie'] == 'set') {
> <snip>
> -------------------------------------------------------------------------
>
> I am something missing here...
Use isset or empty to check for the presence of a GET or POST variable before
attempting to use it.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/
--- End Message ---
--- Begin Message ---
I understand dir perms pretty well; but, have a question I can't readily find
the answer to.
Under a Linux system, scripts can't write, copy, etc. to other dirs unless the
perms are set for writable for the script e.g., nobody.
But, is there a way a script can write or copy within its own dir?
Thanks...
--- End Message ---