| Author |
Message |
r1pp3r
New Member


Joined: Oct 07, 2003
Posts: 9
Location: belgium
|
Posted:
Wed Oct 08, 2003 2:15 pm |
|
hello ladies and gentleman
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 any help is more as welcome
regards |
_________________ TheLounge sponsored by http://www.hosting-it.be ~ http://mirc.2link.be ~ http://photoshop.2link.be ~ |
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed Oct 08, 2003 2:24 pm |
|
Try changing this line
if (!eregi("modules.php", $PHP_SELF)) {
to
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) { |
| |
|
|
 |
r1pp3r

|
Posted:
Wed Oct 08, 2003 2:37 pm |
|
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 so none of the two works at the moment |
| |
|
|
|
 |
Raven

|
Posted:
Wed Oct 08, 2003 2:40 pm |
|
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

|
Posted:
Wed Oct 08, 2003 2:46 pm |
|
dude i'm confused now
register_globals?
cookies? |
| |
|
|
|
 |
Raven

|
Posted:
Wed Oct 08, 2003 2:52 pm |
|
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 to verify the setting. Save that code to a file and ftp the file to your site and run it. |
| |
|
|
|
 |
r1pp3r

|
Posted:
Wed Oct 08, 2003 3:46 pm |
|
Mmm, thanks for the replies already, but i'll watch it tomorrow, have had a busy day and next day will be too
I'll just place a few questions before i go to sleep (remember i am a php dummie )
- 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!
regards O.o mighty admins o.O |
| |
|
|
|
 |
Raven

|
Posted:
Wed Oct 08, 2003 4:11 pm |
|
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

|
Posted:
Thu Oct 09, 2003 1:20 pm |
|
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 ? |
| |
|
|
|
 |
|
|