Problem creating a site layout/template

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
marco

Problem creating a site layout/template

Post by marco »

Hi,

I just came across this great script and installed it without problem on my Win XP localhost + Apache.

I tried to create a template by using the "page layout" option under the "admin" but when I tried to update it I got this error:

Warning: fopen(c:/home/www/include/inc_conf/conf.pagelayout.inc.php) [function.fopen]: failed to create stream: No such file or directory in c:\home\www\phpwcms\include\inc_lib\general.inc.php on line 658

Warning: Cannot modify header information - headers already sent by (output started at c:\home\www\phpwcms\include\inc_lib\general.inc.php:658) in c:\home\www\phpwcms\include\inc_act\act_pagelayout.php on line 145

I noticed there is no template in the phpwcms_template folder.

Thanks for any help,
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

you have forgotten to define the
phpwcms["root"] value in conf.inc.php.
In your case this should be "phpwcms".

Look at and compare this:
...www/include/inc_conf/conf.pagelayout.inc.php
...www\phpwcms\include\inc_lib

This says everything ;-) The slash/backslashes are not the problem. PHP can handle this.


There will also never a template file created inside the phpwcms_template folder. This is from a former version. But there are standard JavaScript and CSS files. So it is good to store all addtional files there.


Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
marco

Post by marco »

Thank you for the hint. Actually, on the first setup I did set

$phpwcms["root"] = "phpwcms"

(The full file path to the folder is: C:/home/www/phpwcms)

This resulted in a site that did not display the icon images
(only image placeholders) and the path in my browser showed:

http://localhost/phpwcms/phpwcms/phpwcms.php

whereas I would have expected it to be:

http://localhost/phpwcms/phpwcms.php

Then I looked again at the config.inc.php file and noticed the comment
for $phpwcms["root"] says //default: "". So I set the root to "". This immediately solved the icon problem but now I have the template save problem.

I am a PHP newbie so I am not sure what else to look for. (You may have noticed my other topic also reaises some beginner questions).

Thanks again,
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Post complete conf.inc.php
WITHOUT ANY PASSWORD/USERNAME
please!

Maybe there is a mistake.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
marco

Post by marco »

Here it is:

<?

// database values
$phpwcms["db_host"] = "localhost";
$phpwcms["db_user"] = "****";
$phpwcms["db_pass"] = "****";
$phpwcms["db_table"] = "phpwcms";
$phpwcms["db_prepend"] = "";
$phpwcms["db_pers"] = 1;

// site values
$phpwcms["site"] = "http://localhost/phpwcms/";
$phpwcms["admin_email"] = "****";

// paths
$phpwcms["root"] = ""; //default: ""
$phpwcms["file_path"] = "phpwcms_filestorage"; //default: "phpwcms_filestorage"
$phpwcms["file_tmp"] = "phpwcms_tmp"; //default: "phpwcms_tmp"
$phpwcms["templates"] = "phpwcms_template"; //default: "phpwcms_template"
$phpwcms["dir_thlist"] = "thumb_list"; //default: "thumb_list"
$phpwcms["dir_preview"] = "thumb_preview"; //default: "thumb_preview"
$phpwcms["content_path"] = "content"; //default: "content"
$phpwcms["cimage_path"] = "images"; //default: "images"
$phpwcms["ftp_path"] = "phpwcms_ftp"; //default: "phpwcms_ftp"

// content values
$phpwcms["file_maxsize"] = 2097152; //Bytes (50 x 1024 x 1024)
$phpwcms["content_width"] = 538; //max width of the article content column - important for rendering multi column images
$phpwcms["img_list_width"] = 100; //max with of the list thumbnail image
$phpwcms["img_list_height"] = 75; //max height of the list thumbnail image
$phpwcms["img_prev_width"] = 538; //max width of the large preview image
$phpwcms["img_prev_height"] = 400; //max height of the large preview image
$phpwcms["max_time"] = 1800; //logout after max_time/60 seconds

// other stuff
$phpwcms["compress_page"] = 0; //if 1 = page compression, 0 = no compression

// debugging timer
$phpwcms["timer"] = 0; //is for displaying a how long it needs to create


?>
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Your path values should be this:

Code: Select all

$phpwcms["site"] = "http://localhost/";
$phpwcms["root"] = "phpwcms"; 
That should help you.


Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
marco

Post by marco »

Thanks, that fixed it. Typical beginner errors. :D
Post Reply