Cannot setup ezpublish on my host (Windows based server)

Author Message

Nick Wang

Wednesday 26 January 2005 1:08:29 pm

http://specopsinsignia.com/ezpublish/index.php

I always get the following error. I've set up the permission according to the message (And the technical people of my host did that too). But it still doesn't work. Anyone can sugguest what the problem? thanks.

Issues
1. Insufficient directory permissions

eZ publish cannot write to some important directories, without this the setup cannot finish and parts of eZ publish will fail.
The affected directories are: settings settings/override var var/log var/storage var/cache var/cache/codepages var/cache/ini settings/siteaccess settings/siteaccess/admin design

eZ publish could not detect the user and group of the webserver. If you know the user and group of the webserver it's recommended to change the ownership of the files to match this user and group. To do this you need to change the chown commands under Alternative shell commands.
Shell commands

These shell commands will give proper permission to the webserver.

cd c:\hosting\webhost4life\member\soibry\ezpublish
chmod -R a+rwx settings settings/override var var/log var/storage var/cache var/cache/codepages var/cache/ini settings/siteaccess settings/siteaccess/admin design

Alternative shell commands

These commands will setup the permission more correctly, but require knowledge about the running webserver.

chmod -R og+rwx settings settings/override var var/log var/storage var/cache var/cache/codepages var/cache/ini settings/siteaccess settings/siteaccess/admin design
chown -R nouser:nouser settings settings/override var var/log var/storage var/cache var/cache/codepages var/cache/ini settings/siteaccess settings/siteaccess/admin design

Note: The nouser:nouser must be changed to your webserver username and groupname.

Ignore this test

2. File uploading is not possible

The PHP upload directory C:\PHP\uploadtemp is not writeable. This means that it will be impossible to upload files or images to eZ publish.

You must change the permission on the directory C:\PHP\uploadtemp. If you do not have the possibility to create this yourself ask the administrator to do this for you.

eZ publish could not detect the user and group of the webserver. If you know the user and group of the webserver it's recommended to change the ownership of the upload directory to match this user and group. To do this you need to change the chown commands under Alternative shell commands.
Shell commands

This shell command will give proper permission to the upload directory.

chmod a+rwx /C:\PHP\uploadtemp

Alternative shell commands

If you know the user and group of the webserver you can try this command. Replace apache:apache with the user and group.

chmod ug+rwx /C:\PHP\uploadtemp
chown apache:apache /C:\PHP\uploadtemp

Nick Wang

Thursday 27 January 2005 10:04:24 am

check the code ezdir.php. Should the line
$tmpfname = $dir . eZSys::fileSeparator() . "ezsetup_" . md5( microtime() ) . ".tmp";

be

$tmpfname = $dirname . eZSys::fileSeparator() . "ezsetup_" . md5( microtime() ) . ".tmp";

?

/*!
\static
Check if a given directory is writeable

\return TRUE/FALSE
*/
function isWriteable( $dirname )
{
if ( eZSys::osType() != 'win32' )
return is_writable( $dirname );

/* PHP function is_writable() doesn't work correctly on Windows NT descendants.
* So we have to use the following hack on those OSes.
* FIXME: maybe on Win9x we shouldn't do this?
*/
// try to create temporary file
$tmpfname = $dir . eZSys::fileSeparator() . "ezsetup_" . md5( microtime() ) . ".tmp";
if ( !( $fp = @fopen( $tmpfname, "w" ) ) )
return FALSE;

fclose( $fp );
unlink( $tmpfname );

return TRUE;
}
}

Frederik Holljen

Thursday 27 January 2005 10:32:27 am

Does this fix help you in any way?

Nick Wang

Thursday 27 January 2005 11:26:42 am

Yes, I passed the permission test after I modified the code as above.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.