DH PHP farting?


#1

I set up social media on my account today, and I get the ugliest error I’ve ever encountered.

"Warning: main(/dh/cgi-system/php.cgi/categories.class.php) [function.main]: failed to open stream: Not a directory in /home/.zane/halopc/hpcvideos.com/functions.php on line 506

Fatal error: main() [function.require]: Failed opening required ‘/dh/cgi-system/php.cgi/categories.class.php’ (include_path=’.:/usr/local/lib/php’) in /home/.zane/halopc/hpcvideos.com/functions.php on line 506"

I KNOW I have it installed right and nothing is written wrong, it’s the exact same code and install that’s running on my lunarpages account (that works, however they don’t support FFMPEG so i had to make the switch). I’ve tried switching the php versions, didn’t help.

Anyone out there to help? It’d be greatly appreciated. :]

  • Josh

#2

Get rid of the .zane in your config files. There’s no need to have it. See if that helps.

-Scott


#3

[quote]I get the ugliest error I’ve ever encountered.

"Warning: main(/dh/cgi-system/php.cgi/categories.class.php) [function.main]: failed to open stream: Not a directory in /home/.zane/halopc/hpcvideos.com/functions.php on line 506

Fatal error: main() [function.require]: Failed opening required ‘/dh/cgi-system/php.cgi/categories.class.php’ (include_path=’.:/usr/local/lib/php’) in /home/.zane/halopc/hpcvideos.com/functions.php on line 506"[/quote]
It may indeed be “ugly”, but it is a pretty common error when porting applications from one PHP environment to another. The clue is in the path as, obviously, there is no “catagories.class.php” in, or beneath, the the DreamHost system php-cgi binary file. :wink:

Installing it “right” might not be the issue as much as “installing it correctly for php-cgi on DreamHost” might be the issue.

The fix could be very simple,or a little more complicated, depending upon how the application you are using is written (how they set paths, use environment variables, etc.).

Your first, best bet for getting a quick fix is to contact the author of the script and provide him with access to the output of a phpinfo() running on your domain. Since he/she knows their own code, they should be able to see pretty quickly what you need to change in your setup to get it to run on DreamHost.

The next best step is to Google for the name of your app/script and DreamHost. As DreamHost has become rather large, and popular, it is highly likely someone else has already dealt with your issue with that particular application on DreamHost before, and has provided the “fix”.

Another step you could try is to try to run the script under mod_php (no longer officially supported, but read the comments for a workaround) and see if that solves your initial issue. If it does, then it is likely all you will need to do to “correct” your error running PHP-CGI on DreamHost is to change an environment variable or two.

Lastly, if you share the particulars of the script you are using here, or provide enough code so that we can see how that path is derived by the application, it is likely someone on these forums could spot the change that needs to be made.

–rlparker


#4

Thanks, rlparker. Now I feel >.< this big. Now I’m off to see if someone needs help tying their shoes. I think I can handle that.

I hope that categories.class.php file is somewhere in your software package. If so, then it would be some sort of path issue.

-Scott