Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
r1pp3r
New Member
New Member



Joined: Oct 07, 2003
Posts: 9
Location: belgium

PostPosted: Wed Oct 08, 2003 2:15 pm Reply with quote

hello ladies and gentleman Razz

I've been trying to make (rebuild) an irc-script (which can enter Quakenet) & which should be a module in phpnuke.

I took the 'basic' phpcode from another irc_chat addon and added the script of the irc_applet i have in it.

Now i get this error when I try to view this:

Parse error: parse error in /home/httpd/vhosts/loungefraggers.hosting-it.be/httpdocs/modules/IRC_Chat/index.php on line 15

And the page is further on totally blank.

Line 15 consists of this:
Code:
 if (!eregi("modules.php", $PHP_SELF)) {

followed by
Code:
   die ("You can't access this file directly...");

    }

This piece was pasted from the original addon so I dont understand what could have go wrong.

This is the part where you should come in Laughing any help is more as welcome Wink

regards

_________________
TheLounge sponsored by http://www.hosting-it.be ~ http://mirc.2link.be ~ http://photoshop.2link.be ~ 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 08, 2003 2:24 pm Reply with quote

Try changing this line
if (!eregi("modules.php", $PHP_SELF)) {
to
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
 
View user's profile Send private message
r1pp3r







PostPosted: Wed Oct 08, 2003 2:37 pm Reply with quote

ok that worked but i got the old screen from the old addon somehow, so i have put all my new files into a separate folder and get the same error again Confused so none of the two works at the moment
 
Raven







PostPosted: Wed Oct 08, 2003 2:40 pm Reply with quote

Well, you must use the way I told you if register_globals is not on in your php.ini. I would delete the cookies and cache before I do anymore testing if I were you.
 
r1pp3r







PostPosted: Wed Oct 08, 2003 2:46 pm Reply with quote

dude i'm confused now Laughing
register_globals?
cookies?
 
Raven







PostPosted: Wed Oct 08, 2003 2:52 pm Reply with quote

Browser cookies. Clear those and clear the cache.

If the second way of coding works to get past the error, then that seems to imply that the register_globals setting in the php.ini file (PHP configuration) is not set to on. You can run this script
Code:
<?

phpinfo();
?>
to verify the setting. Save that code to a file and ftp the file to your site and run it.
 
r1pp3r







PostPosted: Wed Oct 08, 2003 3:46 pm Reply with quote

Mmm, thanks for the replies already, but i'll watch it tomorrow, have had a busy day and next day will be too Sad

I'll just place a few questions before i go to sleep (remember i am a php dummie Confused )
- do spaces matter in this coding ? for exemple:
Code:
if (!eregi("modules.php", $PHP_SELF)) {
does it matter if I use spaces or not before the 'if' ?
- you speak of saving that code to a file: how to run it? (dont think the name of the file matters?)

all start is not easy, but this is d***ed difficult for me! Laughing


regards O.o mighty admins o.O
 
Raven







PostPosted: Wed Oct 08, 2003 4:11 pm Reply with quote

Your script will not know what $PHP_SELF is if register_globals is not on. That's why you need to run that script. Save it as whatever you want - test.php. Spaces do not matter.
 
r1pp3r







PostPosted: Thu Oct 09, 2003 1:20 pm Reply with quote

howdy!

I've run it and it sais it is enabled. Dunno what i'm doing wrong here.

Is there any way I can send these files to you ?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©