Jump to content

How to execute this script?


EliReid

Recommended Posts

Hi,

 

I have a cron job that executes this script every 2 minutes:

<?php

// LOAD WP-LOAD.PHP

require('/opt/bitnami/apps/wordpress/htdocs/wp-load.php');

// INCLUDE AND EXECUTE SCHEDULER.PHP

include('/opt/bitnami/apps/wordpress/htdocs/wp-content/themes/yeelloe/scheduler.php');

?>

When I try to include; /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/yeelloe/scheduler.php:

<?php

// EXPLODE AND PARSE WP-CONTENT; FUNCTIONS.PHP

 $parse_uri = explode( '/opt/bitnami/apps/wordpress/htdocs/wp-content', $_SERVER['SCRIPT_FILENAME'] );

// LOAD WP-LOAD.PHP

require_once( $parse_uri[0] . '/opt/bitnami/apps/wordpress/htdocs/wp-load.php' );

// LOAD TEMPLATE FUNCTION

CheckFunction();

?>

I get the output:

): failed to open stream: No such file or directory in /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/yeelloe/cron.php on line 5
PHP Warning:  include(): Failed opening '<?php

//PLEASE do NOT move me around. I get cranky when I get moved around

//get the wp-load in for the wordpress functions

$parse_uri = explode( '/opt/bitnami/apps/wordpress/htdocs/wp-content', $_SERVER['SCRIPT_FILENAME'] );

require_once( $parse_uri[0] . '/opt/bitnami/apps/wordpress/htdocs/wp-load.php' );

//now try calling template function

CheckFunction();

?>' for inclusion (include_path='.:/opt/bitnami/php/lib/php:/opt/bitnami/frameworks/smarty/libs') in /opt/bitnami/apps/wordpress/htdocs/wp-content/themes/yeelloe/cron.php

Any ideas on how to execute this file. Any help would be appreciated.

Edited by EliReid
Link to comment
Share on other sites

Obviously your include is not able to include what you want.  That said - what are you doing with that explode???  You are trying to split your scriptname on the occurrence of that huge argument?  Really? 

 

Try echoing out some of the arguments in your script to be sure they are what you think they are.  I think you will find they are not so that should help you debug it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.