[2.0] Smartifying the backend
Re: [2.0] Smartifying the backend
@YL
Even if you change both of them?
What about disabling the first and have the 2cnd with require_once?
@Garvin
New Mysql 5x versions come with InnoDB as the default storage engine, AFAIK... but Serendipity needs MyIsam, at least for things like CREATE FULLTEXT INDEX. So it would be good to check this before install, wouldn't it?
Even if you change both of them?
What about disabling the first and have the 2cnd with require_once?
@Garvin
New Mysql 5x versions come with InnoDB as the default storage engine, AFAIK... but Serendipity needs MyIsam, at least for things like CREATE FULLTEXT INDEX. So it would be good to check this before install, wouldn't it?
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [2.0] Smartifying the backend
Yes.Timbalu wrote:Even if you change both of them?
That looks as if it works, i.e. it gives me a success message, but if I try to view the blog, it takes me back to the installation screen.Timbalu wrote:What about disabling the first and have the 2cnd with require_once?
Also, the 2.0 does not get the url to the blog right, it populates the field with "http://www.example.com/serendipity" and I have to change it to the proper hostname manually.
YL
Re: [2.0] Smartifying the backend
Hmm, I have no other idea on this. It looks like your PHP configuration does not really know that include_once means include only once while processing... Did you ask your hoster about it? Normal LAMP servers should know...!
Yes, the default defaultBaseURL is 'http://www.example.com/serendipity/', to be changed manually in installation step 2a/b. Has there ever been something else with 1.6 or below?
Yes, the default defaultBaseURL is 'http://www.example.com/serendipity/', to be changed manually in installation step 2a/b. Has there ever been something else with 1.6 or below?
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Re: [2.0] Smartifying the backend
I'm suspecting some hiccup between root and subdomains, but I won't touch anything unless the hoster's support gets back to me since I nearly shot my main blog (which is on the same space) just now.Timbalu wrote:Hmm, I have no other idea on this. It looks like your PHP configuration does not really know that include_once means include only once while processing... Did you ask your hoster about it? Normal LAMP servers should know...!
Erm, I've never had to edit that manually before, it has always detected the correct hostname automagically for as long as I can remember (which is 0.6).Timbalu wrote:Yes, the default defaultBaseURL is 'http://www.example.com/serendipity/', to be changed manually in installation step 2a/b. Has there ever been something else with 1.6 or below?
YL
Re: [2.0] Smartifying the backend
Trying to translate the answer from my (German) hoster as good as possible:
I kind of masked the original error message in order to not reveal my user data. The error message actually is like this:
So this means (according to my hoster's support) that the installer has a dependency on the DOCUMENT_ROOT variable which shouldn't be there.
According to the hoster's support, one solution is adding
at the beginning of serendipity_config.inc.php, but this doesn't sound like a very elegant solution since it needs to be changed again if the installation is in the root directory. Also, most of our users might not be comfortable with editing core files.
I am aware that this might only be an issue in my hoster's setup, but IMHO we should still check if there's a workaround for this in the installer since it's a hoster which is becoming increasingly popular in Germany and actually has a setup which is pretty great for s9y hosting. Plus, they know what they're doing.
YL
I kind of masked the original error message in order to not reveal my user data. The error message actually is like this:
This means the installer is including a version of db.inc.php which is not the one in the subdomain's directory, but the one in DocumentRoot, which is confirmed by the fact that one of my test installations actually (but fixable) crashed my main blog in DocumentRoot.Fatal error: Cannot redeclare serendipity_db_update() (previously declared in /var/www/virtual/username/html/include/db/db.inc.php:27) in /var/www/virtual/username/subdomain.domain.tld/include/db/db.inc.php on line 56
So this means (according to my hoster's support) that the installer has a dependency on the DOCUMENT_ROOT variable which shouldn't be there.
According to the hoster's support, one solution is adding
Code: Select all
$_SERVER['DOCUMENT_ROOT'] = realpath('..');
I am aware that this might only be an issue in my hoster's setup, but IMHO we should still check if there's a workaround for this in the installer since it's a hoster which is becoming increasingly popular in Germany and actually has a setup which is pretty great for s9y hosting. Plus, they know what they're doing.
YL
Re: [2.0] Smartifying the backend
In another support mail, they recommended using dirname(__FILE__) to get the physical path to the s9y installation, whatever that might mean.
YL
YL
Re: [2.0] Smartifying the backend
True. 2.0 broke that (that's why the simple installaiton isn't working atm). Ian, that should be based in your port of the installer to smarty (maybe that got transferred to smarty and accidentally hardcoded) . Can you look into it?yellowled wrote:Erm, I've never had to edit that manually before, it has always detected the correct hostname automagically for as long as I can remember (which is 0.6).Timbalu wrote:Yes, the default defaultBaseURL is 'http://www.example.com/serendipity/', to be changed manually in installation step 2a/b. Has there ever been something else with 1.6 or below?
YL
Re: [2.0] Smartifying the backend
Yes; I would expect that too, but I wasn't sure remembering...yellowled wrote:Erm, I've never had to edit that manually before, it has always detected the correct hostname automagically for as long as I can remember (which is 0.6).
The funny thing is, it is <input class="input_textbox" size="30" name="baseURL" value="http://domain.de/test/serendipity160/ in 1.6 and in our 2.0 testcase 'defaultBaseURL' with the 'example.com' url. It must have to do with our change of installer.inc.php step 2a/b fetching the changed serendipity_printConfigTemplate() markup, which also points to serendipity_guessInput(), but I can't find the bug, I may have produced there. Please Garvin, Onli, have a fresh look inside.
Edit:
The baseURL bug is not inside the serendipity_printConfigTemplate() with new markup. I must be somewhere in installer.inc.php... still searching... need some more eyes!
Last edited by Timbalu on Wed Apr 04, 2012 7:43 pm, edited 2 times in total.
Regards,
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Ian
Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Re: [2.0] Smartifying the backend
it means:yellowled wrote:In another support mail, they recommended using dirname(__FILE__) to get the physical path to the s9y installation, whatever that might mean.
At line 243:
replace
Code: Select all
if (@file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php')) {
$local_config = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php';
Code: Select all
if (@file_exists(dirname(__FILE__) . '/serendipity_config_local.inc.php')) {
$local_config = dirname(__FILE__) . '/serendipity_config_local.inc.php';
Re: [2.0] Smartifying the backend
Thanks for clearing this up, but shouldn't this go into the s9y core then? Garvin?blog.brockha.us wrote:it means:yellowled wrote:In another support mail, they recommended using dirname(__FILE__) to get the physical path to the s9y installation, whatever that might mean.
YL
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Re: [2.0] Smartifying the backend
I think it should! This should work the same on normal and uberspace installations.
And PHP_SELF is often named as "evil"..
Did you try, if this solves your problem?
And PHP_SELF is often named as "evil"..
Did you try, if this solves your problem?
Re: [2.0] Smartifying the backend
Unfortunately, no. I didn't want to risk compromising my main blog by playing around with the subdomain installs any further, so I deleted them. I could of course install a new version if this needs further testing, but I wanted to check in with you guys first.blog.brockha.us wrote:Did you try, if this solves your problem?
YL
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Re: [2.0] Smartifying the backend
Well, I don't really know what's your problem exactly..
I only know, that DOCUMENT_ROOT is a problem at uberspace when used in subdomains.
Perhaps there are other locations in the source where this is used..
I only know, that DOCUMENT_ROOT is a problem at uberspace when used in subdomains.
Perhaps there are other locations in the source where this is used..
Re: [2.0] Smartifying the backend
That's just it – I can't install properly in an uberspace subdomain because of the way s9y uses DOCUMENT_ROOT (at least that's what the support made of it, but I'm pretty sure they figured it out right ). As a side effect, one of the installation compromised my main blog installation in DocumentRoot, but I was able to fix that.blog.brockha.us wrote:Well, I don't really know what's your problem exactly..
I only know, that DOCUMENT_ROOT is a problem at uberspace when used in subdomains.
Perhaps there are other locations in the source where this is used..
YL
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: [2.0] Smartifying the backend
Hi!
This code is required for shared installations, we cannot simply change/remove it.
Installing s9y on a subdomain that has the document_root not set to the root of the subdomain, with a s9y on the main domain will never work. I don't see an easy way to patch this, without opening a huge can of worms for other currently working scenarios.
Can't you check with your provider if DOCUMENT_ROOT can be changed to the real path of the subdomains core directory properly?
Otherwise I suggest you to patch this on your installation only, the usual scenario is that DOUCMENT_ROOTs are "properly" set. There are scenarios of course where this is NOT wanted, so you can't really have it both ways...
Regards,
Garvin
This code is required for shared installations, we cannot simply change/remove it.
Installing s9y on a subdomain that has the document_root not set to the root of the subdomain, with a s9y on the main domain will never work. I don't see an easy way to patch this, without opening a huge can of worms for other currently working scenarios.
Can't you check with your provider if DOCUMENT_ROOT can be changed to the real path of the subdomains core directory properly?
Otherwise I suggest you to patch this on your installation only, the usual scenario is that DOUCMENT_ROOTs are "properly" set. There are scenarios of course where this is NOT wanted, so you can't really have it both ways...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/