PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  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
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

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

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: 15210
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Mon Apr 16, 2007 10:48 am Reply with quote Back to top

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.
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2401
Location: Iowa, USA

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

It says the error is on line 1368, but you have not posted any code near that line number.
View user's profile Send private message
Raven
Site Admin/Owner


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

PostPosted: Mon Apr 16, 2007 12:22 pm Reply with quote Back to top

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


Joined: May 27, 2005
Posts: 62

PostPosted: Mon Apr 16, 2007 1:08 pm Reply with quote Back to top

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);
View user's profile Send private message
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2401
Location: Iowa, USA

PostPosted: Mon Apr 16, 2007 2:02 pm Reply with quote Back to top

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.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7456
Location: Arizona

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

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.
View user's profile Send private message Visit poster's website
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Tue Apr 17, 2007 4:08 am Reply with quote Back to top

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
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7456
Location: Arizona

PostPosted: Tue Apr 17, 2007 6:38 am Reply with quote Back to top

Excellent!

Wave
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7456
Location: Arizona

PostPosted: Tue Apr 17, 2007 6:39 am Reply with quote Back to top

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 to the forums!


Thanks!
View user's profile Send private message Visit poster's website
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Tue Apr 17, 2007 7:24 am Reply with quote Back to top

hmm Short links? is that the same as gt? if so I can post the tap there np.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7456
Location: Arizona

PostPosted: Tue Apr 17, 2007 7:29 am Reply with quote Back to top

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!
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-2008 by Raven
Proud to be listed at Lobo Links Web Directory

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 Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

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

zerosum