Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> GT - Next Gen and Standard
Author Message
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Mon Apr 16, 2007 7:45 am Reply with quote

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


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Mon Apr 16, 2007 10:16 am Reply with quote

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.
 
View user's profile Send private message
ANTH
PostPosted: Mon Apr 16, 2007 10:48 am Reply with quote

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

PostPosted: Mon Apr 16, 2007 10:59 am Reply with quote

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 
View user's profile Send private message
Raven
PostPosted: Mon Apr 16, 2007 12:22 pm Reply with quote

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
PostPosted: Mon Apr 16, 2007 1:08 pm Reply with quote

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})[\;]))", "&amp;", $getNextGen);
          $getNextGen = str_replace(array("&amp;&amp;", "&amp;middot;", "&amp;nbsp;"), array("&&", "&middot;", "&nbsp;"), $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
PostPosted: Mon Apr 16, 2007 2:02 pm Reply with quote

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: 9456
Location: Arizona

PostPosted: Mon Apr 16, 2007 5:51 pm Reply with quote

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! 
View user's profile Send private message Visit poster's website
ANTH
PostPosted: Tue Apr 17, 2007 4:08 am Reply with quote

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&amp;rop=(enprepa|informations)'",
"'(?<!/)modules.php\?name=Tutoriaux&amp;rop=tutoriaux_sousrub&amp;tid=([0-9]+)'",
"'(?<!/)modules.php\?name=Tutoriaux&amp;rop=tutoriaux&amp;did=([0-9]+)'",
"'(?<!/)modules.php\?name=Tutoriaux&amp;file=print&amp;did=([0-9]+)'",
"'(\"|\')modules.php\?name=Tutoriaux\\1'",
"'(?<!/)modules.php\?name=Your_Account&amp;op=userinfo&amp;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&amp;op=userinfo&amp;username=([a-zA-Z0-9_-]*)"



To this it was missing the '

Code:
"'(?<!/)modules.php\?name=Your_Account&amp;op=userinfo&amp;username=([a-zA-Z0-9_-]*)'"



Thanks for the help! again Laughing
 
montego
PostPosted: Tue Apr 17, 2007 6:38 am Reply with quote

Excellent!

Wave
 
montego
PostPosted: Tue Apr 17, 2007 6:39 am Reply with quote

Hey, by the way, just thought of something. Do you mind sharing your tap of this module here?
Only registered users can see links on this board! Get registered or login!

Thanks!
 
ANTH
PostPosted: Tue Apr 17, 2007 7:24 am Reply with quote

hmm Short links? is that the same as gt? if so I can post the tap there np.
 
montego
PostPosted: Tue Apr 17, 2007 7:29 am Reply with quote

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... Wink

Thank you!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> GT - Next Gen and Standard

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 ©