#1 2003-11-02 03:31:18

Jeff_Mash
Member
2003-11-02
2

Install Errors On Login

Hey guys.....

I run a pretty popular site (over 300,000 daily hits), and I was trying to install phpWebGallery for my users.  I configured everything successfully, but when I try to login, I get these errors and nothing else:

Warning: Cannot modify header information - headers already sent by (output started at C:\Websites\MyJokeMail\gallery\include\init.inc.php:19) in C:\Websites\MyJokeMail\gallery\identification.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at C:\Websites\MyJokeMail\gallery\include\init.inc.php:19) in C:\Websites\MyJokeMail\gallery\identification.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at C:\Websites\MyJokeMail\gallery\include\init.inc.php:19) in C:\Websites\MyJokeMail\gallery\identification.php on line 37

Any ideas?  The only file I edited was the MySql.inc file.  I don't have any characters or spaces after the "?>"

By the way, I'm installing it under IIS on a Windows 2003 Server.

Keep smiling,

Jeff Mash, Founder and Editor
MyJokeMail.com - Demented Jokes and Humor
**Broken link**

Offline

 

#2 2003-11-02 07:50:36

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14068

Re: Install Errors On Login

First  :( I've never tested on a Windows 2003 IIS configuration.

Secondly, the error message is strange, because, line 19, file include/init.inc.php (1.3), I find this :

Code:

define( PREFIX_INCLUDE, '' );

Do you find the same ?

You said you only modified file include/mysql.inc.php, are you sure there is really no character before "<?php" and after "?>" ? blank space and line return are counting (You seem to have tested, but I ask you do it once again, it always comes from this file... in next release, I'll find another way to make redirection, not generating any problem in case of added characters...)

Offline

 

#3 2003-11-02 19:59:02

Jeff_Mash
Member
2003-11-02
2

Re: Install Errors On Login

Well, here are some more details.

When I navigate to the index.php, I get these errors:

Notice: Use of undefined constant PREFIX_INCLUDE - assumed 'PREFIX_INCLUDE' in C:\Websites\MyJokeMail\gallery\index.php on line 20

Notice: Use of undefined constant ATT_REG - assumed 'ATT_REG' in C:\Websites\MyJokeMail\gallery\include\functions_xml.inc.php on line 21

Notice: Use of undefined constant VAL_REG - assumed 'VAL_REG' in C:\Websites\MyJokeMail\gallery\include\functions_xml.inc.php on line 22

Notice: Use of undefined constant PREFIX_TABLE - assumed 'PREFIX_TABLE' in C:\Websites\MyJokeMail\gallery\include\functions.inc.php on line 321

Warning: Cannot modify header information - headers already sent by (output started at C:\Websites\MyJokeMail\gallery\index.php:20) in C:\Websites\MyJokeMail\gallery\index.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at C:\Websites\MyJokeMail\gallery\index.php:20) in C:\Websites\MyJokeMail\gallery\index.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at C:\Websites\MyJokeMail\gallery\index.php:20) in C:\Websites\MyJokeMail\gallery\index.php on line 37

I only wish I knew more about PHP to troubleshoot this.  I am a programmer (C, C#), but I don't know a lot of the PHP Syntax.  It appears that for whatever reason, whenever the Header() function is called, the system has a problem.

I run other PHP applications on my site (like the phpBB2 Message Board), and I'm really needing a PHP Solution to my huge image gallery.  Hopefully we can figure this out, because I really like your program, and my site will give your program a lot of exposure.

To further answer your question, Yes, I do see "define( PREFIX_INCLUDE, '' );" on line 19 of the init.inc.php file.  Any ideas?

Offline

 

#4 2003-11-02 20:27:05

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14068

Re: Install Errors On Login

There seems to be a problem with constants definitions ! Because your server says that contsants are not defined, while I define constants with the function

Code:

define( CONSTANT, 'value' );

I try to find a solution about that...

Offline

 

#5 2003-11-02 20:36:08

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14068

Re: Install Errors On Login

The first solution I can give you is to change the level of error displayed by PHP, you can change that in the php.ini file :

Code:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; error_reporting is a bit-field.  Or each number up to get desired error
; reporting level
; E_ALL             - All errors and warnings
; E_ERROR           - fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
;
; Examples:
;
;   - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
;   - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors except for notices
;
error_reporting  =  E_ALL & ~E_NOTICE

(that's what I have in my /etc/php4/apache/php.ini)

Offline

 

#6 2003-12-06 02:31:55

Gweltas
Former Piwigo Team
Lyon en théorie
2003-12-04
547

Re: Install Errors On Login

Well, i've got the same warnings on my easyphp1.7 installation and this is the answer to this problem :
phpwebgallery code should use quote for its define statements.

Code:

define( PREFIX_INCLUDE, '' );

should be written as

Code:

define( 'PREFIX_INCLUDE', '' );

And the correction should be done every single time that the define statement is used (for instance admin/include/isadmin.inc.php, include/functions.inc.php...) Otherwise your apache server can also be customized not to show those warnings.

By the way, there are several indexes that are not tested by the isset() statement and this brings tons of warnings :)

Offline

 

Board footer

Powered by FluxBB