On the server I had php scripts responsible for sending notifications to mobile phones. It runs well if the scripts are called from the same directory.
The problem is to call the scripts from cakePHP app.
I include the notifications script inside cakePHP function like this:
include $_SERVER['DOCUMENT_ROOT'].'/folder_name/Notifications.php';
When I call the script, I get the following warnings inside the scripts:
include_once(./db_connect.php) [function.include-once]: failed to open stream: No such file or directory [/home/username/public_html/gcm_server_php/db_functions.php
Warning (2): include_once() [function.include]: Failed opening './db_connect.php' for inclusion (include_path='/home/username/public_html/cake-dev/lib:.:/usr/lib/php:/usr/local/lib/php') [/home/username/public_html/gcm_server_php/db_functions.php, line 21]
And the following fatal error:
Error: Class 'DB_Connect' not found
File: /home/username/public_html/gcm_server_php/db_functions.php
Line: 25
Any help is much appreciated. Keep in mind that calling scripts from the same directory, everything runs smooth.