PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
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 Back to top

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
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
r1pp3r
New Member
New Member


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

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

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
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
r1pp3r
New Member
New Member


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

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

dude i'm confused now Laughing
register_globals?
cookies?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
r1pp3r
New Member
New Member


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

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

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
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
r1pp3r
New Member
New Member


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

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

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 ?
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum