Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-27-2007, 08:48 PM   #1
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
I need plugin to run php inside a wordpress post

I just tried phpexec & runphp, neither of which work.

Anyone got or know wordpress plugin that will allow me to run php inside a wordpress post?
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-27-2007, 09:18 PM   #2
teksonline
So Fucking Banned
 
Join Date: Jan 2005
Location: At My Desk
Posts: 2,904
Exec-PHP is what to use no?
teksonline is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-27-2007, 10:09 PM   #3
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Quote:
Originally Posted by teksonline View Post
Exec-PHP is what to use no?
I tried that, didn't work.

I embedded code in between the tags and wordpress post shows the code instead of what the php is telling it to show
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 02:55 PM   #4
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,428
Read the comments on Exec-php page and you will find a link to the new version that does work.
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 02:57 PM   #5
media
Confirmed Moneymaker
 
media's Avatar
 
Industry Role:
Join Date: Apr 2002
Location: Eugene, OR It's Like Jail, Only with Trees!
Posts: 9,853
Quote:
Originally Posted by spacedog View Post
I tried that, didn't work.

I embedded code in between the tags and wordpress post shows the code instead of what the php is telling it to show
Make sure you are editing in the "CODE" tab only and saving in the "CODE" tab.. once edited in the WYSIWYG editor it will fubar it... exec-php is great
__________________
I'm here for the violence!
media is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 03:38 PM   #6
~Ray
visit hardlinks.org
 
~Ray's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Las Vegas , Nv >>> [email protected] or icq 94994627 anytime
Posts: 18,362
adman for wordpress in the www.wordpress.org plugins

wp.uberdose.com/2006/11/05/adman/

Last edited by ~Ray; 12-28-2007 at 03:39 PM..
~Ray is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 03:39 PM   #7
D Ghost
null
 
D Ghost's Avatar
 
Industry Role:
Join Date: May 2006
Posts: 9,820
Yeah make sure you aren't using Visual editor. If you need help I am expert at Wordpress... hit me up
D Ghost is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 03:42 PM   #8
Twig
Confirmed User
 
Twig's Avatar
 
Join Date: Nov 2005
Location: ICQ - 703894
Posts: 1,949
+1 for exec-php.
Twig is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 06:29 PM   #9
pip
So Fucking Banned
 
Join Date: Nov 2005
Location: Netherlands
Posts: 468
Turn the stupid visual editor off, its pointless
pip is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 06:48 PM   #10
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
I have visual editor off and also have role manager plug in.

I have tgp on root & blog in dir.

Script is in root & I'm trying to include tgp script in post or page thats on blog in dir as;

Code:
<?
 include("../script.php");
 $query   = "SELECT COUNT(url) AS numrows FROM links";
 $result  = mysql_query($query) or die('Error, query failed');
 $row     = mysql_fetch_array($result, MYSQL_ASSOC);
 $numrows = $row['numrows'];
 
 $maxPage = ceil($numrows/65);

 $sql = "SELECT url, title, date FROM `links` ORDER BY date DESC LIMIT ".$offset.", 65;";
 $rs = mysql_query($sql);
 echo mysql_error();
 
 
 $self = $_SERVER['PHP_SELF'];
 $nav = '';
 for($page = 1; $page <= $maxPage; $page++)
 {
    if ($page == $pageNum)
    {
        $nav .= " $page ";
    }
    else
    {
        $nav .= " <a href=\"$self?page=$page\">$page</a> ";
    }
 }

while($row = mysql_fetch_row($rs)){
     echo "<a href=\"".$row[0]."\">".$row[1]."</a>".$row[2]."\n<br>\n";}

 echo "<p>Page: ";
 $self = $_SERVER['PHP_SELF'];
 $nav = '';
 for($page = 1; $page <= $maxPage; $page++)
 {
    if ($page == $pageNum)
    {
        $nav .= " $page ";
    }
    else
    {
        $nav .= " <a href=\"$self?page=$page\">$page</a> ";
    }
 }

echo $first . $prev . $nav . $next . $last;
 mysql_close();
?>
and I end up with on the post
Code:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ? 65′ at line 1
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /dirname/0/blahblah/htdocs/file/name/wp-content/plugins/exec-php/runtime.php(41) : eval()?d code on line 29
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-28-2007, 11:58 PM   #11
V_RocKs
Damn Right I Kiss Ass!
 
Industry Role:
Join Date: Dec 2003
Location: Cowtown, USA
Posts: 32,428
This is because $offset isn't holding a value.

How is offset being passed to your script?

If it is by the address (GET) then you need something like:
Code:
$offset = $_GET['offset'];
This is because your server might have register globals turned off for security reasons.

Last edited by V_RocKs; 12-29-2007 at 12:00 AM..
V_RocKs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-29-2007, 03:00 AM   #12
remii
Confirmed User
 
Join Date: Jan 2006
Location: Austria
Posts: 226
run_php works great for me !
http://dev.wp-plugins.org/wiki/RunPHP
remii is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-29-2007, 08:11 AM   #13
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Quote:
Originally Posted by V_RocKs View Post
This is because $offset isn't holding a value.

How is offset being passed to your script?

If it is by the address (GET) then you need something like:
Code:
$offset = $_GET['offset'];
This is because your server might have register globals turned off for security reasons.
It's not the server. Scripts running fine on the main page.

So I have this text tgp for a bit on domain.com then decided to add a blog on domain.com/blog and now I'm trying to include the script in a blog post or a blog page so I can move blog to domain.com & still have the text tgp present on the site.
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-29-2007, 08:22 AM   #14
The Duck
Adult Content Provider
 
The Duck's Avatar
 
Industry Role:
Join Date: May 2005
Location: Europe
Posts: 18,243
exec-php should do the trick
__________________
Skype Horusmaia
ICQ 41555245
Email [email protected]
The Duck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-29-2007, 08:26 AM   #15
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Quote:
Originally Posted by kandah View Post
exec-php should do the trick
But it's not. This is what I'm trying to get to work & am getting the errors shown in post above
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.