path problems after transfering phpwcms from local to server

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

path problems after transfering phpwcms from local to server

Post by tuur66 »

I used to create a website on my local wamp server, but now that I'm almost finishing this website, I want to run it on my server. I therefore copied the entire phpwcms map to the directory www on my server. I also changed conf.inc.php so I could login. This worked.

But then I get this message:
Warning: include_once(/phpwcms/include/inc_ext/ss_image/ss_image.class.php) [function.include-once]: failed to open stream: No such file or directory in d:\www\subluna.nl\www\phpwcms\include\inc_lib\imagick.convert.inc.php on line 34

Warning: include_once() [function.include]: Failed opening '/phpwcms/include/inc_ext/ss_image/ss_image.class.php' for inclusion (include_path='.;C:\php-pear') in d:\www\subluna.nl\www\phpwcms\include\inc_lib\imagick.convert.inc.php on line 34

and
Warning: include_once(/phpwcms/phpwcms_template/inc_default/startup.php) [function.include-once]: failed to open stream: No such file or directory in d:\www\subluna.nl\www\phpwcms\phpwcms.php on line 425

Warning: include_once() [function.include]: Failed opening '/phpwcms/phpwcms_template/inc_default/startup.php' for inclusion (include_path='.;C:\php-pear') in d:\www\subluna.nl\www\phpwcms\phpwcms.php on line 425
However, I found out that the files are not missing and are in the right directories. So it must be a path problem!

In conf.inc.php, these are the relevant codes:
// site values
$phpwcms["site"] = "http://www.mydomain.nl/";
$phpwcms["admin_email"] = "info@mail.com";

// paths
$ptemp = dirname($_SERVER['SCRIPT_NAME']);
$ptemp = preg_replace('/\/setup$/i','', $ptemp);
$ptemp = str_replace("\\", "/", $ptemp);
$ptemp = preg_replace('/^\//', '', $ptemp);
$ptemp = preg_replace('/\/$/', '', $ptemp);
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT'];
$phpwcms["root"] = 'phpwcms';
$phpwcms["file_path"] = "phpwcms_filestorage"; //default: "phpwcms_filestorage"
$phpwcms["templates"] = "phpwcms_template"; //default: "phpwcms_template"
$phpwcms["content_path"] = "content"; //default: "content"
$phpwcms["cimage_path"] = "images"; //default: "images"
$phpwcms["ftp_path"] = "phpwcms_ftp"; //default: "phpwcms_ftp"
Couldn't find the answer in the forum database... Has anyone got any clues? Thanx!
fellchen
Posts: 158
Joined: Thu 21. Jul 2005, 15:48
Location: Wesel a. Rhein, Germany
Contact:

Post by fellchen »

Check these in your config.inc.php

Code: Select all

// paths
$phpwcms['DOC_ROOT']          = $_SERVER['DOCUMENT_ROOT'];
$phpwcms["root"]              = "";
$phpwcms["file_path"]         = "phpwcms_filestorage";
$phpwcms["templates"]         = "phpwcms_template";
$phpwcms["content_path"]      = "content";
$phpwcms["cimage_path"]       = "images";
$phpwcms["ftp_path"]          = "phpwcms_ftp";
Please look at the bottom of your config.inc.php

Code: Select all

// Try to check and uncomment the DOCUMENT_ROOT if you have problems 
// often neccessary on IIS or default MacOS X webserver settings.
// Do not use backslash "\" on Windows - always replace "\" by "/" 
//$_SERVER['DOCUMENT_ROOT']     = '/www/htdocs';
Perhaps this can help you...
(/www/htdocs only an example!)
You should not take life too seriously,
or you will not even get out of it alive!
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

Hi fellchen,
thanx for your reply. It didn't work, however. I removed
$phpwcms['DOC_ROOT'] = $_SERVER['DOCUMENT_ROOT'];
and removed // before
$_SERVER['DOCUMENT_ROOT']
at the bottom. Then I changed it into
$_SERVER['DOCUMENT_ROOT'] = 'http://www.subluna.nl';
. But nothing changes when logged in... :(
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Hello

(include_path='.;C:\php-pear') in d:\www\subluna.nl\www\phpwcms\include\inc_lib\imagick.convert.inc.php on line 34

This is no normal apache behavior :wink: Perhaps check inclusion of pics and the filestorage as well

Jürgen

EDIT: much more http://localhost links in your site .... :lol: When I called it, switch off your localhost and you will have the correct error
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

DF6IH wrote:(include_path='.;C:\php-pear') in d:\www\subluna.nl\www\phpwcms\include\inc_lib\imagick.convert.inc.php on line 34

This is no normal apache behavior :wink:
Means script cannot find the path listed, so default back to looking in PEAR library path.

Maybe try something like:

Code: Select all

// site values
$phpwcms["site"]              = "http://www.subluna.nl/";
//$phpwcms["site"]            = "http://".$_SERVER['SERVER_NAME']."/"; //or TRY Apache Environment Variable

// paths
$phpwcms['DOC_ROOT']          = "d:/www/subluna.nl/www";
//$phpwcms['DOC_ROOT']        = $_SERVER['DOCUMENT_ROOT']; //or TRY Apache Environment Variable
$phpwcms["root"]              = "phpwcms";
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

@Dexxus:

I had different error msg, when calling his server, all I saw was a little bit of red color and something redirected me to http://localhost !!!!!

So I think the error msg came from his localhost...
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

thanx for your replies. however, still it doesn't work. I wonder what d:\www means? where does it get the d:-drive from??
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

first of all this is NOT Part of the regular config.inc.php

Code: Select all

$ptemp = dirname($_SERVER['SCRIPT_NAME']);
$ptemp = preg_replace('/\/setup$/i','', $ptemp);
$ptemp = str_replace("\\", "/", $ptemp);
$ptemp = preg_replace('/^\//', '', $ptemp);
$ptemp = preg_replace('/\/$/', '', $ptemp); 
looks like you haven't downloaded the config-File at the End of the Setup-Procedure ( looks for me like a edited 'setup.conf.inc.php'

also check the Settings for GD/ImageMagick

Code: Select all

$phpwcms["imagick"]           = 0;        //if 0 = GD, 1 = ImageMagick convert, 2 = ImageMagick 4.2.9
$phpwcms["imagick_path"]      = "";       //Path to ImageMagick
$phpwcms["use_gd2"]           = 1;        //if 0 = GD1, 1 = GD2
and

Code: Select all

$_SERVER['DOCUMENT_ROOT']     =
has to be a real Path - not a URL - to get the right Path goto http://www.yourdomain.tld/setup/document_root.php and take it from this Line
your default $_SERVER['DOCUMENT_ROOT']: ...........
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Ok ;)

High risk of blaming myself, BUT:

as far as I read your doc route your site is now located:

http://subluna.nl/phpwcms

At first call... for a short moment.. content appears ! Then my browser is R E D I R E C T E D (!!!!) to http://localhost

So what I want to say is: The phpwcms IS RUNNING AT SERVERSIDE !!! Only within the last incomming things appears a REDIRECT! For me,it seems clear , this redirect comes from anything in the content ... The Error d:\ comes from localhost, as we know everyone has his own Localhost.

So ... (Am I crazy ? :roll: )if he is redirected to HIS localhost and perhaps there is the old content stored as well... therefrom comes the error..

If this would appear in config files... no content would follow.. imediate redirection would happen...

crazy or not ?

:D

Jürgen
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

body bgcolor="#C70100" text="#000000" link="#FF9900" vlink="#FF9900" alink="#FF9900" style="margin:0px 0px 0px 0px;">
<table border="0" cellspacing="0" cellpadding="0" align="center">

<tr>
<td valign="top" width="11"><img src="img/leer.gif" width="11" height="1" alt="" /></td>
<td valign="top"><table>
<tr valign="center"><td align="middle"><div align="center">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<font size="2" face="Verdana" color="FFFFFF">Welkom op de website van <i>Nagoya</i></font><BR />

<a href="http://localhost/phpwcms/index.php?welkom"><img src="/phpwcms/picture/upload/Image/logo2.gif" border="0" /></a><p>
<font size="2" face="Verdana" color="FFFFFF">Wacht enkele seconden of <a href="http://localhost/phpwcms/index.php?welkom">klik</a> om verder te gaan.</div>
</td></tr>
</table></td>
<td valign="top" width="10"><img src="img/leer.gif" width="10" height="1" alt="" /></td>
</tr>
</table>
</body>
</htm

YOU GUYS !!

I was right :)))))))
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Post by tuur66 »

no jürgen, I want this page to be redirected after 3 seconds, and I will adapt the url once phpwcms works as it should.

the question is: how can I move the entire phpwcms-map from my local drive to my server, with all codes correct? there must be some path that still isn't OK...
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Yes, I understand !

You need some local ip or ip management via dyndns.org f.e. and no way to http://localhost, cause this is local as it says :)

So f.e. it has to be http://your_2nd.dyndns.org , then your port 80/8080 is to be connected to localhost on your local machine.

Otherwise the client tries to connect his own localhost, which is in my case on my own machine. So only 2 ways:

Static IP
http://205.12.3.5/phpwcms/... anything open

Dynamic IP

http://....dyndns.org/phpwcms/

First of all you need to define the www dir in your local machine, which has the htdocs inside as the one which is free for all users...Mostly apache machines use /home/www/ or something like this.

Any d:\ Error belongs to your local machine, as windows is not build for apache :lol:

Jürgen
tuur66
Posts: 50
Joined: Fri 17. Dec 2004, 15:01
Location: Amsterdam

Hurray!

Post by tuur66 »

I finally found the solution! There were path problems in certain files. The paths usually causing the problem in those files were
include_once (PHPWCMS_ROOT."/include... etc"
instead of
include_once ("include... etc")
This was the case in about 10 files, in which I corrected the path(s).

So, now I can create and alter pages, templates, layout...
The only thing I still can't do is changing the 'home' directory in ADMIN > structure. I can't create a stylesheet (CSS) in ADMIN, either. And last but not least: I can't add images or other files in FILES - it then says
Do not try again [...] Contact the webmaster
Anyone familiar with this? Thanx in advance!
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

:lol: LOL :lol:
Where there is a will... there is a way !!!
Unfortunately, it sounds like all you did was alter the script to force using your way.
I would predict problems down the road.
It would serve you better to follow pico's advice about this:
pico wrote:and

Code: Select all

$_SERVER['DOCUMENT_ROOT']     =
has to be a real Path - not a URL - to get the right Path goto http://www.yourdomain.tld/setup/document_root.php and take it from this Line
your default $_SERVER['DOCUMENT_ROOT']: ...........
Quoting the file:
This file has to be placed in your web root - do not put it into any subdir of your webspace.
Run it from your web root and get the correct value for $_SERVER['DOCUMENT_ROOT'] :wink:
Post Reply