tons of php errors

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
speel
-


Joined: 09 Jan 2003
Posts: 32
Location: Queens, Nyc

PostPosted: Mon Jul 07, 2003 11:45 pm    Post subject: tons of php errors Reply with quote

hey im trying to run a script called cutenews and after hours of trying to figure it out in the php.ini file but nothing worked hee are some errors



Notice: Undefined variable: PHP_SELF in C:\Program Files\Abyss Web Server\htdocs\cutenews\inc\functions.inc.php on line 3

Notice: Undefined variable: PHP_SELF in C:\Program Files\Abyss Web Server\htdocs\cutenews\inc\functions.inc.php on line 9

Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in C:\Program Files\Abyss Web Server\htdocs\cutenews\inc\functions.inc.php on line 9

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Abyss Web Server\htdocs\cutenews\inc\functions.inc.php:3) in C:\Program Files\Abyss Web Server\htdocs\cutenews\index.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Abyss Web Server\htdocs\cutenews\inc\functions.inc.php:3) in C:\Program Files\Abyss Web Server\htdocs\cutenews\index.php on line 125

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Abyss Web Server\htdocs\cutenews\inc\functions.inc.php:3) in C:\Program Files\Abyss Web Server\htdocs\cutenews\index.php on line 126




please if any body knows please help lol
thanks alot n aprelium keep up the good werk
Back to top View user's profile Send private message Visit poster's website AIM Address
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Tue Jul 08, 2003 1:10 am    Post subject: Reply with quote

I ran cute news b4 and it worked for me , do me a favor and go to c:\windows and look for the file php.ini , open it , look for the line

display_errors = Off , put On to Off

You had your php to show all errors , putting this varible to Off will not kill your script and your script will still work !

TRUST ME , I ONCE PLAYED WITH "CUTE NEWS" 8)
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Lockley
-


Joined: 04 Jul 2003
Posts: 9
Location: Not sure...

PostPosted: Tue Jul 08, 2003 1:57 am    Post subject: Reply with quote

the headers problem's probably due to the script tring to set stuff like cookies maybe after the start of a document. You can edit the php.ini file and change output_buffering to on I think to cure that problem.
Back to top View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
speel
-


Joined: 09 Jan 2003
Posts: 32
Location: Queens, Nyc

PostPosted: Tue Jul 08, 2003 3:07 am    Post subject: lol Reply with quote

ok i did display_errors = Off and i still see the errors then i did the buffering thing n put it On n still ge the same things ah lol i have no cle maybe some one can send me there php.ini files to me :(
Back to top View user's profile Send private message Visit poster's website AIM Address
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jul 08, 2003 3:11 pm    Post subject: Re: tons of php errors Reply with quote

Do not forget also to set in php.ini
Code:
register_globals=on

_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
webzn
-


Joined: 01 Apr 2003
Posts: 27
Location: Canada

PostPosted: Fri Jul 18, 2003 12:29 am    Post subject: Reply with quote

I have always had problems with my php scripts like him. I did what everyone here has suggested and I still get the errors from all scripts. EVen the popular ones like phpbb, topsiter, and scripts I have done. A script like this...

Code:

<form action="add.php" method="post">
<input type="text" name="name"><input type=submit>
</form>


Returns an error like this...

Quote:

Notice: Undefined variable: name in C:\Program Files\Abyss Web Server\htdocs\add.php on line 2


and add.php looks like this..

Code:

<?
echo $name;
?>


I have also tried this script too, same errors.

Code:

<?
echo $_POST['name'];
?>


Please help
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Jul 18, 2003 3:05 pm    Post subject: Re: tons of php errors Reply with quote

Are you changing the right php.ini file (you should change the one in your windows directory)?
Check also that there is a single line beginning with register_gloabls= . If you have duplicate lines, the result may be not predictable.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
webzn
-


Joined: 01 Apr 2003
Posts: 27
Location: Canada

PostPosted: Fri Jul 18, 2003 5:33 pm    Post subject: Reply with quote

I am changing c:\windows\php.ini

There is only one occurance of register_globals
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jul 19, 2003 2:37 pm    Post subject: Reply with quote

webzn wrote:
I am changing c:\windows\php.ini

There is only one occurance of register_globals

When you use the script

Code:
<?php
  echo $_REQUEST['name'];
?>


What error do you have?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
webzn
-


Joined: 01 Apr 2003
Posts: 27
Location: Canada

PostPosted: Sun Jul 20, 2003 10:06 pm    Post subject: Reply with quote

No errors. Yeah. I'll test that new code in the script iI was using

EDIT> I still get this error in one script...

Notice: Undefined variable: cid in C:\Program Files\Abyss Web Server\htdocs\topsite\index.php on line 23
Back to top View user's profile Send private message Visit poster's website
SonnyB
-


Joined: 19 Jun 2003
Posts: 42
Location: New York USA

PostPosted: Tue Jul 22, 2003 7:12 am    Post subject: Go o php.ini Reply with quote

Your prob is really this Web server is still buggy and requires that:

register-globals = on

also your error reporting = none

how to do that.?:
First navigate your way to: C:/windows/php.ini

Second: Edit these lines:
Under Error handling and logging
Edit your php.ini file so it looks exactly like this:

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_COMPILE_ERROR|E_ERROR|E_CORE_ERROR; Show only errors

Third: Edit your php.ini file under:
Data Handling
Edit this line to look exactly like this:

You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = on

your all set
_________________
Regards,
Anarchy03
http://anarchy03.us
AnarchyOnline Ent
aappel03@yahoo.com
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address
webzn
-


Joined: 01 Apr 2003
Posts: 27
Location: Canada

PostPosted: Tue Jul 22, 2003 5:33 pm    Post subject: Reply with quote

Thats so much. I think you solved it all. Thanks again
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group