Forums / Install & configuration / Cannot setup ezpublish on my host (Windows based server)

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.

eZ debug

Timing: Jan 18 2025 19:36:28
Script start
Timing: Jan 18 2025 19:36:28
Module start 'content'
Timing: Jan 18 2025 19:36:28
Module end 'content'
Timing: Jan 18 2025 19:36:28
Script end

Main resources:

Total runtime0.0145 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.4063180.8047
Module start 'content' 0.00650.0045 770.210998.0078
Module end 'content' 0.01100.0035 868.218874.7031
Script end 0.0145  942.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002114.6176120.0002
Check MTime0.00106.9391120.0001
Mysql Total
Database connection0.00085.157210.0008
Mysqli_queries0.003121.081340.0008
Looping result0.00000.316420.0000
Template Total0.003222.010.0032
Template load0.00075.101510.0007
Template processing0.002516.907610.0025
Override
Cache load0.00053.519610.0005
General
dbfile0.00042.4852100.0000
String conversion0.00000.042630.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs