Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with preg_match_all() in PHP-Nuke

Status
Not open for further replies.

kfickert

Programmer
Jan 10, 2000
12
US
You can see the error at elitesquadrons.net on the start up page, but here is what I get:<br><br>Fatal error: Call to unsupported or undefined function preg_match_all() in / on line 74<br><br>Here is the Code:<br>// Following two lines are for add a hit to the database<br>$sid = $s_sid;<br><br>preg_match_all(&quot;/&lt;\s*a [^&gt;]*?href=([^&gt;\s]+).*?&gt;/i&quot;, $introtext, $match, PREG_PATTERN_ORDER);<br>$a = &quot;0&quot;;<br>$i = &quot;0&quot;;<br>while ($a &lt; &quot;10&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;$url = urlencode($match[1][$i]);<br>&nbsp;&nbsp;&nbsp;&nbsp;$introtext = ereg_replace(&quot;&lt;a href=&quot;.$match[1][$i].&quot;&gt;&quot;, &quot;&lt;a href=redirect.php3?op=redir&sid=$sid&url=$url&gt;&quot;, $introtext);<br>&nbsp;&nbsp;&nbsp;&nbsp;$a++;<br>&nbsp;&nbsp;&nbsp;&nbsp;$i++;<br>}<br><br>preg_match_all(&quot;/&lt;\s*a [^&gt;]*?href=([^&gt;\s]+).*?&gt;/i&quot;, $notes, $match, PREG_PATTERN_ORDER);<br>$a = &quot;0&quot;;<br>$i = &quot;0&quot;;<br>while ($a &lt; &quot;10&quot;) {<br>&nbsp;&nbsp;&nbsp;&nbsp;$url = urlencode($match[1][$i]);<br>&nbsp;&nbsp;&nbsp;&nbsp;$notes = ereg_replace(&quot;&lt;a href=&quot;.$match[1][$i].&quot;&gt;&quot;, &quot;&lt;a href=redirect.php3?op=redir&sid=$sid&url=$url&gt;&quot;, $notes);<br>&nbsp;&nbsp;&nbsp;&nbsp;$a++;<br>&nbsp;&nbsp;&nbsp;&nbsp;$i++;<br>}<br><br> themeindex($aid, $informant, $datetime, $title, $counter, $topic, $introtext, $notes, $morelink, $topicname, $topicimage, $topictext, $hits);<br>}<br><br>I know we have PhP3 on the server.&nbsp;&nbsp;Our prmairy PHP programmer seems to think its a version problem, and our attempt to comile PHP 4.0.1pl2 into our directory failed since we didn't have any access to the C compiler.&nbsp;&nbsp;So that's not an option.<br> <p>Kirk Fickert<br><a href=mailto:KFICKERT@WANS.NET>KFICKERT@WANS.NET</a><br><a href= > </a><br>My $.03
 
Fatal error: Call to undefined function: preg_match_all()

Not necessarily a PHP3 problem. I have this error with NUke in the forum and there is definitely PHP4 installed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top