Jump to content

Recommended Posts

I've tried to find a solution by scouring the forums here and other sites on the web, still no luck.

 

I have a PHP/MySQL app installed on a shared hosting (Network Solutions) server. The php code has 'includes' coded to pull in outside configuration files. The app is designed to use .htaccess files to set the 'include_path' variable to the directory where the include files are stored.

 

Apparently Network Solutions runs PHP as a CGI rather than an Apache process, disabling the use of .htaccess files. I've tried to use local php.ini files, but the server doesn't seem to recognize those either. If I embed the 'include_path' in a PHP page, the PHP finds the include files. I really don't want to do that because of the number of files that use the includes.

 

Unfortunately, this PHP app also needs 'register_globals' set to ON which Network Solutions does have set.

 

I'm looking for some direction for troubleshooting this installation. The software I'm trying to get working is http://www.localfoodcoop.org/, an online app for farm co-ops to sell locally. Network Solutions is no help, yet, and the author of the app has helped me as much as he can.

 

What is frustrating is that the php.ini 'include_path' is actually showing up in a phpinfo(), but I'm still getting the following message when I run the app:

 

Warning: include_once(config_foodcoop.php) [function.include-once]: failed to open stream: No such file or directory in /data/19/1/81/66/1896718/user/2063405/htdocs/shop/index.php on line 4

 

You can view my phpinfo here: http://www.localrootswooster.com/shop/php_info.php.

 

Could there possibly be another cause to this error message? As I said, the file loads if I embed the 'include_path' in the PHP file.

 

I don't have access to the server's php.ini file. If there is another workaround, I'm all ears.

 

Sherm Stevens

iNvision Studios

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/173907-php-include_path-issue/
Share on other sites

Oh, I forgot to include the other error message, related to the first:

 

Warning: include_once() [function.include]: Failed opening 'config_foodcoop.php' for inclusion (include_path='.:/usr/services/vux/lib/php') in /data/19/1/81/66/1896718/user/2063405/htdocs/shop/index.php on line 4

 

Looks like it's showing a different include_path from my phpinfo().

 

Thanks again for taking a look.

As a follow-up, I got a reply from Network Solutions. They only support a php.ini file located in the cgi-bin directory. I changed it slightly and moved it in there, and part of the app is working... Except when I access any links that have to go inside another directory.

 

For example, the index.php file in the root directory of the application works fine. When I attempt to access anything in the /admin/ folder, however, I get a similar message as before... "No such file or directory..."

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.