I'm stuck on a this special problem:
I have a php application which manage a request process; when the request is sent an email is also sent to the several validators. What i want is when one of the validators does not validate the request, a reminder email should be sent to him 3 times every 30 minutes.
For that i create the function bellow which is related to other classes but it does not work. This function will be executed as a planned task but before i tried to execute it as a line command : 'php -f C:\wamp\www\test_2006\job.php' .
This job.php contains that:
My function is
public static function autoThread()
{
parent::connection()->open();
foreach( Greeter::getAllRequests() As $request )
{
if( in_array( $stage=$request->stage(),array( "threader","requester","CLOSED" ) ) ) continue;
$currentIdUser = $request->requester()->chef( $stage );
$r = parent::connection()->executeQuery( " SELECT id FROM notification WHERE matriculeUser = '$currentIdUser' AND requestId = {$request->id()} " );
if( $r->rowCount()>2 )
{
( new User( $currentIdUser ) )->judgeRequest( array( $request->id()=>"BYPASS" ) );
}
else
{
parent::connection()->executeQuery( " INSERT INTO notification ( matriculeUser,requestId ) VALUES ( '$currentIdUser',$request->id() )" );
Greeter::validationMail( $request );
}
}
}
The error that i get is :
Warning: include(php/Classes/FrameworkDb.php): failed to open stream: No such file or directory in C:\wamp\www\test_2006\php\include\head.php on line 3
Call Stack:
0.0000 229496 1. {main}() C:\wamp\www\test_2006\job.php:0
0.0000 236808 2. include('C:\wamp\www\test_2006\php\include\head.php')
C:\wamp\www\test_2006\job.php:3
Warning: include(): Failed opening 'php/Classes/FrameworkDb.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\test_2006\php\include\head.php on li
ne 3
Call Stack:
0.0000 229496 1. {main}() C:\wamp\www\test_2006\job.php:0
0.0000 236808 2. include('C:\wamp\www\test_2006\php\include\head.php')
C:\wamp\www\test_2006\job.php:3
Fatal error: Class 'User' not found in C:\wamp\www\test_2006\php\include\head.php
on line 12
Call Stack:
0.0000 229496 1. {main}() C:\wamp\www\test_2006\job.php:0
0.0000 236808 2. include('C:\wamp\www\test_2006\php\include\head.php')
C:\wamp\www\test_2006\job.php:3