Author |
Message |
ANTH
Regular


Joined: May 27, 2005
Posts: 62
|
Posted:
Mon Apr 16, 2007 7:45 am |
|
Code:[Mon Apr 16 03:43:10 2007] [error] PHP Warning: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: No ending delimiter ''' found in /index/mainfile.php on line 1368
|
Here is that piece of code with line numbers
Code:
1336//GT-NExtGEn Files Path --- nextGenPath Variable
1337$nextGenPath = $nextGenMainPath . "/GT-" . $nextGenName . ".php";
1338 if (file_exists($nextGenPath) && ($nextGenHead == 1 || $nextGenFoot == 1)) {
1339 if ($nextGenAdmin && $nextGenDebug == 1 && $nextGenHead == 1) {
1340echo "[nextGenPath] = Path Does Exist<br>";
1341}
1342} elseif ($nextGenHead == 1 || $nextGenFoot == 1) {
1343if ($nextGenAdmin && $nextGenDebug == 1 && $nextGenHead == 1) {
1344echo "[nextGenPath] = Path Does Not Exist!<br>";
1345}
1346return;
1347}
|
Anyone know why it is saying that?
heres the code without the numbers
Code: //GT-NExtGEn Files Path --- nextGenPath Variable
$nextGenPath = $nextGenMainPath . "/GT-" . $nextGenName . ".php";
if (file_exists($nextGenPath) && ($nextGenHead == 1 || $nextGenFoot == 1)) {
if ($nextGenAdmin && $nextGenDebug == 1 && $nextGenHead == 1) {
echo "[nextGenPath] = Path Does Exist<br>";
}
} elseif ($nextGenHead == 1 || $nextGenFoot == 1) {
if ($nextGenAdmin && $nextGenDebug == 1 && $nextGenHead == 1) {
echo "[nextGenPath] = Path Does Not Exist!<br>";
}
return;
}
|
|
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Apr 16, 2007 10:16 am |
|
This usually indicates a syntax error farther up above. You probably have a line of code that is missing a " mark. Recheck your code if you have made any other changes. |
|
|
|
 |
ANTH

|
Posted:
Mon Apr 16, 2007 10:48 am |
|
Thanks Raven, I have no clue where this is but it does not seem to be affecting my site from what I can see.
I will leave it as it is because I cant seem to find it by searching for the " only thing ive added in there is gt and it looks fine. |
|
|
|
 |
Gremmie
Former Moderator in Good Standing

Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Mon Apr 16, 2007 10:59 am |
|
It says the error is on line 1368, but you have not posted any code near that line number. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
 |
Raven

|
Posted:
Mon Apr 16, 2007 12:22 pm |
|
If the error is what I think it is, there is no line 1368. The interpreter gets confused as it tries to read 200 bytes and then find the ". |
|
|
|
 |
ANTH

|
Posted:
Mon Apr 16, 2007 1:08 pm |
|
Gremmie wrote: | It says the error is on line 1368, but you have not posted any code near that line number. |
d*** your right ive been messing with it all day and well my heads just hurting now.
the correct piece of code is
Code: //GT-NExtGEn Footer Code --- nextGenFoot Variable
if ($nextGenFoot == 1) {
if ($nextGenAdmin && $nextGenDebug == 1) {
echo "[nextGenPath] = Present In Footer<br>";
}
$getNextGen = ob_get_contents();
$getNextGen = preg_replace("(&(?!([a-zA-Z]{2,6}|[0-9\#]{1,6})[\;]))", "&", $getNextGen);
$getNextGen = str_replace(array("&&", "&middot;", "&nbsp;"), array("&&", "·", " "), $getNextGen);
ob_end_clean();
include($nextGenPath);
$nextGenContent = preg_replace($urlin, $urlout, $getNextGen);
echo $nextGenContent;
return;
}
|
this being line 1386
Code: $nextGenContent = preg_replace($urlin, $urlout, $getNextGen);
|
|
|
|
|
 |
Gremmie

|
Posted:
Mon Apr 16, 2007 2:02 pm |
|
That chunk of code looks okay, but perhaps the error is in the file that is getting included (the file named by $nextGenPath).
And as Raven said it might be caused by something farther up. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Mon Apr 16, 2007 5:51 pm |
|
Since it is the preg_replace function where it is, I am in agreement that the issue is in the respective GT file.
Which module is causing this to fail and then post back the respective module's GT-<<module name>>.php script for us to take a look. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
ANTH

|
Posted:
Tue Apr 17, 2007 4:08 am |
|
Thanks for that its seems to happen every time I go to the tutoriaux module you were right the gt for this is:-
Code:<?php
$urlin = array(
"'(?<!/)modules.php\?name=Tutoriaux&rop=(enprepa|informations)'",
"'(?<!/)modules.php\?name=Tutoriaux&rop=tutoriaux_sousrub&tid=([0-9]+)'",
"'(?<!/)modules.php\?name=Tutoriaux&rop=tutoriaux&did=([0-9]+)'",
"'(?<!/)modules.php\?name=Tutoriaux&file=print&did=([0-9]+)'",
"'(\"|\')modules.php\?name=Tutoriaux\\1'",
"'(?<!/)modules.php\?name=Your_Account&op=userinfo&username=([a-zA-Z0-9_-]*)"
);
$urlout = array(
"tutoriaux-\\1.html",
"tutoriaux-t\\1.html",
"tutoriaux-d\\1.html",
"tutoriaux-print-\\1.html",
"\\1tutoriaux.html\\1",
"userinfo-\\1.html"
);
?>
|
From this
Code:"'(?<!/)modules.php\?name=Your_Account&op=userinfo&username=([a-zA-Z0-9_-]*)"
|
To this it was missing the '
Code:"'(?<!/)modules.php\?name=Your_Account&op=userinfo&username=([a-zA-Z0-9_-]*)'"
|
Thanks for the help! again  |
|
|
|
 |
montego

|
Posted:
Tue Apr 17, 2007 6:38 am |
|
Excellent!
 |
|
|
|
 |
montego

|
Posted:
Tue Apr 17, 2007 6:39 am |
|
|
|
 |
ANTH

|
Posted:
Tue Apr 17, 2007 7:24 am |
|
hmm Short links? is that the same as gt? if so I can post the tap there np. |
|
|
|
 |
montego

|
Posted:
Tue Apr 17, 2007 7:29 am |
|
Yes, it looks like you are using GT-NExtGEn given that you have a GT- file, so it should be compatible, as GTNG is what I started with...
Thank you! |
|
|
|
 |
|