Page 2 of 4

Posted: Fri Jan 20, 2006 4:53 am
by judebert
I can't tell which version of Serendipity you're installing. Maybe Garvin can pick that up.

I see that the latest versions are checking a form variable to find ImageMagick. You need to fill out the entire path and executable name, i.e "/usr/local/bin/convert".

Even if it is there, Serendipity checks for a function called "is_executable". This function was only added to Windows servers in PHP 5. (What are you running?) Finally, even if you filled out the program path correctly and is_executable() is available, it has to verify that the program is executable.

If all three of those things (correct path, function exists, program is executable) are taken care of, you won't get the ImageMagick warning.

Posted: Fri Jan 20, 2006 5:29 am
by elf2000
t0m_taylor,

"Full path"(in "Paths" section) is specified by installation work.
Was this specification made into "/usr/local/lib/php/s9y/"?

This specification is used on the next screen.
"include/db/db.inc.php" is added to this value.
This warning means that this specification was "/home/tommytay/dj.tommytaylor.co.uk/html/"

You have to install s9y in "/home/tommytay/dj.tommytaylor.co.uk/html/" to specify with this value.

Shared installation of s9y has a problem (see: http://www.s9y.org/forums/viewtopic.php?t=3702 ).
It cannot be judged whether my knowledge is correct.
Probably, it will be good in waiting for the result of survey from Garvin( or other dev-team).

Thanks!!

Posted: Fri Jan 20, 2006 10:34 am
by t0m_taylor
judebert wrote:I can't tell which version of Serendipity you're installing. Maybe Garvin can pick that up.

I see that the latest versions are checking a form variable to find ImageMagick. You need to fill out the entire path and executable name, i.e "/usr/local/bin/convert".

Even if it is there, Serendipity checks for a function called "is_executable". This function was only added to Windows servers in PHP 5. (What are you running?) Finally, even if you filled out the program path correctly and is_executable() is available, it has to verify that the program is executable.

If all three of those things (correct path, function exists, program is executable) are taken care of, you won't get the ImageMagick warning.
heres the info from the pre-install page @ http://dj.tommytaylor.co.uk

Code: Select all

- Serendipity v0.9.1 pre-installation report -

PHP installation
Operating system 	Linux 2.4.20-021stab028.19.777-enterprise, i686
Webserver SAPI 	apache2handler
PHP version >= 4.1.2 	Yes, 4.3.8
Database extensions 	MySQL, PostgreSQL
Session extension 	Yes
PCRE extension 	Yes
GDlib extension 	Yes
OpenSSL extension 	Yes
mbstring extension 	Yes
iconv extension 	Yes
zlib extension 	Yes
Imagemagick binary 	Not found

Imagemagick binary is installed at the following, i can do a which convert in shh via putty and i will get the following: "/usr/local/bin/convert". So in the installation form the path is correct, and the binary does work!

So what would i need to change in the installation script so it will install, or will i need to do something to my server so it will detect Imagemagick binary??
elf2000 wrote:t0m_taylor,

"Full path"(in "Paths" section) is specified by installation work.
Was this specification made into "/usr/local/lib/php/s9y/"?

This specification is used on the next screen.
"include/db/db.inc.php" is added to this value.
This warning means that this specification was "/home/tommytay/dj.tommytaylor.co.uk/html/"

You have to install s9y in "/home/tommytay/dj.tommytaylor.co.uk/html/" to specify with this value.

Shared installation of s9y has a problem (see: http://www.s9y.org/forums/viewtopic.php?t=3702 ).
It cannot be judged whether my knowledge is correct.
Probably, it will be good in waiting for the result of survey from Garvin( or other dev-team).

Thanks!!
the blog has been installed to "/usr/local/lib/php/s9y/" and then i have followed the instructions from http://www.s9y.org/41.html for the shared install, linked the folders and sorted the permissions.

So the problem that is now occuring is it cannot grab a database include file, as by the looks of things its trying to get it from the html directory in dj.tommytaylor.co.uk, not in the "/usr/local/lib/php/s9y/"!!

The next problem, would then be for each install to SHARE the user table, so they can use one account to login to each installation of the blog, as it will also be installed on web.tommytaylor, me.tommytaylor etc :D

Im sure i will have to use the same database, and have a seperate prefix for each installation (dj_ , web_ , me_ , etc) its just to make each installation share the same user table.

If all of these problems can be resolved, hopefully this thread will help other users, i may even write my own install doc for shared config as im sure i will never forget the problems i have experienced lol

Posted: Fri Jan 20, 2006 11:33 am
by garvinhicking
Hi Tom!

Yes, the path that is queried in your install for the "db.inc.php" file is wrong, it should fetch it from the shared install directory. In my case this is working properly, but as elf said, it doesn't work for him. I'll be inspecting this this weekend.

Can you please tell me which paths were detected/you configured in the installation?
The next problem, would then be for each install to SHARE the user table, so they can use one account to login to each installation of the blog, as it will also be installed on web.tommytaylor, me.tommytaylor etc :D
That feature is not existing, it must be created. This would be quite tough, actually and much to code. It seems you want this: http://sourceforge.net/tracker/index.ph ... tid=542825

We are in need of developers, did I mention this? :)

I'lll report back here if I can find the issues with the shared install!

Regards,
Garvin

Posted: Fri Jan 20, 2006 1:42 pm
by garvinhicking
I think I've found the problem with those wrong directory problems. Your server doesn't seem to set $_SERVER['PHP_SELF'] and thus the correct "serendipityPath" variable is not detected. "serendipityPath" needs to point to your local installation directory, not the global shared directory.

The first $test_path1 check should in your case return the directory! The $test_path2 is used for NON-Shared installs.

Please try this patch:

http://nopaste.php-q.net/185833

Regards,
Garvin

Posted: Fri Jan 20, 2006 4:40 pm
by t0m_taylor
garvinhicking wrote:I think I've found the problem with those wrong directory problems. Your server doesn't seem to set $_SERVER['PHP_SELF'] and thus the correct "serendipityPath" variable is not detected. "serendipityPath" needs to point to your local installation directory, not the global shared directory.

The first $test_path1 check should in your case return the directory! The $test_path2 is used for NON-Shared installs.

Please try this patch:

http://nopaste.php-q.net/185833

Regards,
Garvin
Hey Garvin,

Ok iv modified the code, i cant upload it yet as im in work, so i will not know if it works until i am home in about 3 hours time.

Ok as i can see there is no solution to having shared blogs running the same user table across different prefixes for each blog, then i shall have a go at fixin that up ;)

Another problem is my imagemagick binary, it is there, just the installation or possibly the blog cannot see it, so i need a solution for that also

Thanks

Tom

Posted: Fri Jan 20, 2006 4:49 pm
by elf2000
t0m_taylor,

Where is the execution binary of ImageMagick?
In my environment, convert is in /usr/bin/.
However, s9y cannot find it...

Since I was not using ImageMagick, I have not found.
From now on, I will investigate.

Posted: Fri Jan 20, 2006 5:00 pm
by garvinhicking
Tom: If it doesn't work out for you after the patch (the instlalation) please post what exact paths you are using, how s9y autodetected them in the install page and how (if) you changed them.

You must put the s9y local directory (not the shared one) into a path that is a subdirectory of your VirtualHost's DOCUMENT_ROOT.

Regards,
Garvin

Posted: Fri Jan 20, 2006 5:03 pm
by elf2000
The problem was found.
ImageMagick may not be found when open_basedir is set up.

* my environment.

Code: Select all

$ which convert
/usr/bin/convert
* case open_basedir set up.

Code: Select all

    php_admin_value open_basedir "/usr/local/lib/php/:/usr/local/lib/php/s9y/:"/home/tommytay/dj.tommytaylor.co.uk/html/"
Actual result: convert is not found.

* case open_basedir not set up.

Code: Select all

    php_admin_value #open_basedir "/usr/local/lib/php/:/usr/local/lib/php/s9y/:"/home/tommytay/dj.tommytaylor.co.uk/html/"
Actual result: convert is found.
This reason is that an is_executable() ( and exec() )function influences work of open_dir.

Please delete open_dir, if you want to use ImageMagick.
However, the intensity of security falls.

Posted: Fri Jan 20, 2006 6:17 pm
by t0m_taylor
Ok thanks, i will try that within the next 2 hours when im home from work :D

what was you using previous to imagemagick elf?

Thanks

Posted: Fri Jan 20, 2006 10:02 pm
by Guest
Ok everyone major update!

i have managed to install it!

i followed eft2000s advice of doing the following to my httpd.conf:

Code: Select all

php_admin_value #open_basedir "/usr/local/lib/php/:/usr/local/lib/php/s9y/:"/home/tommytay/dj.tommytaylor.co.uk/"
and i applied the patch to the "functions_installer.inc.php" include.

PROBLEMS BEING i still got the following during and on the installation complete page:

Code: Select all

Warning: serendipity_checkinstallation(/home/tommytay/dj.tommytaylor.co.uk/html/include/db/db.inc.php): failed to open stream: No such file or directory in /usr/local/lib/php/s9y/include/functions_installer.inc.php on line 585

Warning: serendipity_checkinstallation(): Failed opening '/home/tommytay/dj.tommytaylor.co.uk/html/include/db/db.inc.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/lib/php/s9y/:/usr/local/lib/php/s9y/bundled-libs/:/usr/local/lib/php/s9y/:/usr/local/lib/php/s9y/bundled-libs/') in /usr/local/lib/php/s9y/include/functions_installer.inc.php on line 585
and i also get the following on the admin pages:

Code: Select all

8!
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lib/php/s9y/include/functions_installer.inc.php:2) in /usr/local/lib/php/s9y/include/functions_config.inc.php on line 263

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lib/php/s9y/include/functions_installer.inc.php:2) in /usr/local/lib/php/s9y/include/functions_config.inc.php on line 263

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lib/php/s9y/include/functions_installer.inc.php:2) in /usr/local/lib/php/s9y/serendipity_admin.php on line 11
:(

So the next step is to fix those! and what to do with the line in my httpd.conf file which i commented out so it would find imagemagick

Thanks

Tom

Posted: Fri Jan 20, 2006 10:04 pm
by Guest
garvinhicking wrote:You must put the s9y local directory (not the shared one) into a path that is a subdirectory of your VirtualHost's DOCUMENT_ROOT.
also what did you mean by the following (sorry hehe bit of a blonde moment after a hard week of work!)

Thanks

Posted: Fri Jan 20, 2006 10:29 pm
by t0m_taylor
by the way those 2 guest posts above are from me lol

also it would be cool to make the plugins install to the plugin folder in usr/local/lib/php/s9y/ instead of me having to create a seperate plugin folder in the root folder (which is what iv had to do for dj.tommytaylor.co.uk)

This would mean i have to install the plugins every time i do a shared install on another sub domain, if they would all download to the plugins folder in the shared library of s9y, then i could just select which ones i would like to operate or hide in the control of that sub domain

Hopefully if we can get these resolved, we'll be laffing ;)

Posted: Sun Jan 22, 2006 8:14 pm
by t0m_taylor
Wehey! ok all the path problems above have been solved!

Me being a complete dick on friday meant that i forgot an else rule when i applyed the patch! so its ok now with no more errors :D

We would still need to work on the paths problem, including the problems when the installation procedure cannot detect Imagemagick

My only concern now, is when i upgrade or download a plugin via Spartacus, it will NOT download to the shared plugin directory (in "/usr/local/lib/php/s9y/plugins", as i had to create a local plugin directory and i do not want to have seperate installs of the plugins for each site (would take up more room and be a pain to upgrade or fix etc) :(

One that is sorted, i need to upgrade pear (such as its xml_tree, as iv tried a "pear upgrade -of XML_Tree" in ssh and it will not upgrade to v2 which Flickr Api and other bits and bobs require, its just stuck at v1.1!)

After that is sorted, we could work together in gettin all the seperate shared sites to run off one user database or table! :D

We could then add all this to the next release, and the blogger could be marketed big time, due to it being one of the only blogging systems that can support multiple installs from one codebase ;) would kick wd and mt up the arse!

And with Spartacus, this bloggers is onto a winner ;)

Thanks!

Tom

Posted: Sun Jan 22, 2006 8:59 pm
by garvinhicking
Hi!
My only concern now, is when i upgrade or download a plugin via Spartacus, it will NOT download to the shared plugin directory (in "/usr/local/lib/php/s9y/plugins", as i had to create a local plugin directory and i do not want to have seperate installs of the plugins for each site (would take up more room and be a pain to upgrade or fix etc) :(
You should copy the plugins you want to have for each user into the shared plugin directory. If each user were able to install plugins into the shared dir, it would create security issues easily.
After that is sorted, we could work together in gettin all the seperate shared sites to run off one user database or table! :D
I'm hoping for your patches. It's a lot of work. :-)

Best regards,
Garvin