Page 1 of 1

Script is having difficulty finding hesk_settings.inc.php

Posted: Fri May 27, 2011 6:24 am
by mcrawford
Script URL: No longer needed
Version of script: 2.2
Hosting company: Storm (Liquidweb)
URL of phpinfo.php: No longer needed
URL of session_test.php: No longer needed
What terms did you try when SEARCHING for a solution:
failed to open stream, require, Fatal error

Write your message below:

This is the error I receive when I try to access admin/index.php
"Warning: require(../hesk_settings.inc.php) [function.require]: failed to open stream: No such file or directory in /home/onesourc/test/hesk/admin/index.php on line 39

Fatal error: require() [function.require]: Failed opening required '../hesk_settings.inc.php' (include_path='.:/usr/local/lib/php:/usr/local/Zend/lib/ZendFramework-1.11.6/library') in /home/onesourc/test/hesk/admin/index.php on line 39"

It looks to be that the index.php is having issues finding the hesk_settings.inc.php. I'm unsure as to how to get this working. I've tried to set the path manually but that would require changing every single file and then it doesn't end up working anyhow.

Re: Script is having difficulty finding hesk_settings.inc.ph

Posted: Fri May 27, 2011 6:39 pm
by Klemen
It looks like your host has some very strange PHP setup - something I haven't seen before. The PHP files seem to be redirected internally somehow and they don't recognize the "../" path.

From what it seems you will indeed need to manually edit paths in files.

Re: Script is having difficulty finding hesk_settings.inc.ph

Posted: Fri May 27, 2011 8:54 pm
by mcrawford
Ahh ok that's what I was afraid of. I wanted to make sure I wasn't crazy before I went down that path. I was able to successfully set it up locally with xampp though.

I'm going to contact our host providers and the company that originally created our website to see if I can track down the issue. If I'm able to get it resolved I'll come back and update this thread.

Thank you for your response!

Re: Script is having difficulty finding hesk_settings.inc.ph

Posted: Sat May 28, 2011 6:50 pm
by mcrawford
After much searching about apache and php settings I finally came across information on the .htaccess file.

In the parent directory from where my hesk script is located I had a htaccess file that has these lines in it :

Code: Select all

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^filename/([A-Za-z0-9_%\s\.-]+)/([0-9]+)/([0-9]+)/oneSOURCE\.html$ /functions/download2.php?file=$2&filename=$1&key=$3 [L]
RewriteCond %{REQUEST_URI} "/userfiles/documents/"
RewriteRule (.*) index.html [L]
RewriteCond %{REQUEST_URI} "/functions/download2.php"
RewriteRule (.*) $1 [L]
RewriteCond %{REQUEST_URI} "/functions/databaseDump.php"
RewriteRule (.*) $1 [L]
RewriteCond %{REQUEST_URI} "/functions/queryResults.php"
RewriteRule (.*) $1 [L]
RewriteCond %{REQUEST_URI} "/functions/checkForDocs.php"
RewriteRule (.*) $1 [L]
RewriteCond %{REQUEST_URI} "/reports/"
RewriteRule (.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(php)$ index.php/$1 [L]
RewriteRule \.(html)$ index.php/$1 [L]
RewriteRule (.*) - [L]
RewriteRule (.*) index.php/$1 [L]
I created a .htaccess file with "RewriteEngine off" in it and uploaded to the hesk directory. Now the relative paths from the original script are working just fine.

Re: Script is having difficulty finding hesk_settings.inc.ph

Posted: Sun May 29, 2011 12:05 pm
by Klemen
Glad to hear you found the problem and thanks for sharing!