PHP embedding (I've checked the board)

Having trouble installing serendipity?
Post Reply
DesperateMan

PHP embedding (I've checked the board)

Post by DesperateMan »

I've spent over an hour on this and I haven't made any progress. I've added the PHP
Tried chdir to it's directory, including the full directory, moving the script directory to the serendipity directory, to the plugin directory, to the templates directory....
Tried the tags "require" "include"....
Included this (http://josephguhlin.com/s9y/serendipity ... nugget.txt ) in my plugins, and the page shown now is how it looks that way:
http://www.gayfresno.com/serendipity/

I really wanted my site live this weekend... Any suggestions???
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PHP embedding (I've checked the board)

Post by garvinhicking »

If you could post your exact code experments here, we could try to help you :-)

About the PHP nugget: you need to add <?php and ?> tags to the code you want to use! Or was it the other way round, and you don't need this tags... I don't remember. There may even be an error in your php code for the plugin.

Post your exact code here, without it, we can't help you :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
DesperateMan

Post by DesperateMan »

I've tried it these ways (to name a few):

(these are with the calendar directory in /serendipity/)
include("calendar/minical.php");


<?php
require 'calendar/minical.php';
?>


require 'calendar/minical.php';

(then these are the full path way I wrote them, when the calendar was in the root directory)

include("/usr/homes/gayfresno/htdocs/calendar/minical.php");


<?php
require '/usr/homes/gayfresno/htdocs/calendar/minical.php';
?>


require '/usr/homes/gayfresno/htdocs/calendar/minical.php';

If anyone has an opportunity to ICQ me we can go back and forth on this to maybe get a quick resolution... 14984532

Thank You!
DesperateMan

Post by DesperateMan »

Sorry, I also tried:
<?php
chdir('/usr/homes/gayfresno/htdocs/calendar/');
require 'minical.php';
?>

<?php
chdir('calendar/');
require 'minical.php';
?>

And if you try going to the minical.php directly in a browser you can see it does work correctly.

This is the error so everyone can see without going to the site:
Parse error: parse error in /serendipity/plugins/serendipity_plugin_php_nugget/serendipity_plugin_php_nugget.php(78) : eval()'d code on line 1
Guest

Post by Guest »

When I include this code in layout.php it works, but it never works in a php-nugget:

<?php
chdir('./calendar/');
require 'minical.php';
?>

Is there anyway for me to get this code working in the right/left hand panes like a plugin?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Where did you get your PHP nugget plugin? Did you use this one: http://josephguhlin.com/s9y/serendipity ... nugget.txt ?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply