Page 1 of 1
Installation Error: Warning Failed Opening For Inclusion
Posted: Tue Mar 14, 2006 5:06 am
by hadrian
Using the latest beta available for download, I get the following error after installation:
Warning: Failed opening '//include/compat.inc.php' for inclusion (include_path='') in /serendipity_config.inc.php on line 21
For some reason it cannot find compat.inc.php and assume it has something to do with the the S9Y_INCLUDE_PATH variable that is set in serendipity_config.inc.php
I've looked around for possible answers to this, found one similar thread from a long time ago, but cannot determine its relevance or how to apply the solutions there to this problem:
http://www.s9y.org/forums/viewtopic.php?t=835
Any help would be apprciated, I'd like to get this up and running.... Thanks...
Edit: Of further note, I ran an identical unpacking of the file system on my OS X 10.4 home machine, and it works fine.... so why then on my virtual host web server does this cause a problem? I know it is running at least PHP 4.2.3
Edit #2: After some poking around, I changed the serendipity_config.inc.php file and got rid of the call to dirname(__FILE__) because it was returning a null string, replacing it with the hardcoded string the function should return. This allows setup to proceed. For now I will continue in this fashion, but if anyone could help as to why that function does not work, I would like to know. I have a spooky feeling it has to do with the way virtual hosts are setup sometimes and that PHP doesn't realize its a vhost and that there is probably an extra directory in there it misses.
Re: Installation Error: Warning Failed Opening For Inclusion
Posted: Tue Mar 14, 2006 12:32 pm
by garvinhicking
Hi hadrian!
Could you please create a small script "test.php" inside your "include" directory with this code:
Code: Select all
<?php
echo 'Current file: ' . __FILE__ . '<br />';
echo 'Dirname: ' . dirname(__FILE__) . '<br />';
echo 'PHPSELF: ' . $_SERVER['PHP_SELF'] . '<br />';
echo 'Hard Dirname: ' . dirname($_SERVER['PHP_SELF']);
?>
then call that script via HTTP and tell me the output?
Regards,
Garvin
Posted: Mon Mar 27, 2006 9:33 am
by hadrian
Sure, sorry it took so long to get back to you.
The output is:
Current file: /artific/public_html/md/include/test.php
Dirname: /artific/public_html/md/include
PHPSELF: /md/include/test.php
Hard Dirname: /md/include
artific is my virtual server account with my hosting provider, and md is what i changed serendipity to be called before uploading....
While I'm at it, tow things 1) how robust/efficient is Serendipity in terms of managing high levels of traffic? I'm concerned about performance as my site gains popularity.
2) I'm using a frame cloak for my site ie,
www.myserendipity.com forwards to myvirtualserver.com/myserendipity/ in a frame layout; is there a way to instruct Serendipity to make all the links to articles etc use the myserendipity.com address instead of the myvirtualserver.com/myserendipity? When people send each other links, for brand awareness purposes I'd like to have the domain I want appearing in the link. It seems like this would simply be changing a variable, perhaps the one in setup that tells it where it is installed, but when I do this it cant find my CSS and template files. I have a feeling this has to do with the hardcoded change I made to get it to work in the first place....
Any thoughts etc would be great, thanks
Posted: Mon Mar 27, 2006 1:19 pm
by garvinhicking
Hm, that output you gave looks in order, so a null string shouldn't have been returned in first place - did you check the output before patching it?
However, inserting the real path there should really fix the things, plus I'm currently ill and not at my best to look into this right now.
About traffic/efficiency: Serendipity is really dependant on how good your webserver is tuned, how your mysql is tuned. MySQL query cache and PHP bytecode caches like APC/Zend are a real must for high performance sites. Using lighthttpd instead of Apache is also a good boost in performance. The rest is up to the CPU of your machine; there are a few threads in this forum about performance you mgiht want to look up. Basically, if Serendpipity works too slow on your host, the chances are very high that all other PHP dynamic blogs will also work equally slow.
Serendipity does have a few caching options, which all affect the dynamicability of the blog though.
About item 2: You can change the baseURL configuration of your setup so that it points to a different domain. But you can NOT change the path setting; Serendipity requires the path layout for building up the links to your site, so you cannot set it to /myserendipity/ and having it listen on "/" on another domain. You can also play around with the "HTPT hostname auto detection" feature. I'm not experienced in that kind of frame cloaking, so I can't really help you very much with that. :-/
You might also just want to edit your template files (*.tpl, style.css) and insert the proper path structure there manually?
Regards,
Garvin
Posted: Mon Mar 27, 2006 10:47 pm
by hadrian
Thanks for your quick response.... I'll hack around over the next few days and see if I can get it tuned the way I'd like... for now I'm busy populating the database with content.
You've been very helpful, the system definitely works quite well and covers all my content management needs; if it gets popular I'll just migrate to a different host and worry about efficiency then.
For some reason I'm using a layout.php file, instead of a .tpl, is that particularly bad?
Posted: Tue Mar 28, 2006 4:00 am
by judebert
That sounds like a really old version of Serendipity. We recommend upgrading to 0.9.1 for security reasons.
What version are you running?
Posted: Wed Mar 29, 2006 2:30 am
by hadrian
Latest beta as of 3-14-06: Probably 1.01 or 1.02
Posted: Wed Mar 29, 2006 4:05 am
by judebert
Wow. I know we kept layout.php for compatibility, but I didn't realize it had made it this far.
If you can avoid using it, I recommend moving to the .tpl files.
Posted: Mon Apr 03, 2006 9:15 am
by hadrian
Yeah.... I think I'll do that, sigh, I knew I should've poked around a bit more before launching. I ended up selecting a random bundled template package and then rewrote it according to my design specs... guess I should have looked at the other templates to see if they were done the same way.
It's just a matter of me being lazy and wanting to install a BB. We'll see which comes first; thanks for your guys help, this project is great.