Click to See Complete Forum and Search --> : Not sure - PHP problem -
beenframed
12-16-2002, 02:17 PM
Hi all - I am trying to move this web site to a new location. I've installed apache and php4 on a new server and uploaded all of the data. The old server was apache and php3. The index page has 4 or 5 incude statements on it non of which are being pulled on the new server. On the new server the page comes up just with it's gray background and nothing else. Not sure what to do here - I have:
AddHandler server-parsed .shtml .html
and
AddType application/x-httpd-php3 .php3
in the httpd.conf file on the new server.. Is that ok even though I have installed php4.
Do I need to add a php.ini file?
Any help would be appreaciated. If you need more information please let me know and Ill try my best to explain what i have...
thanks.
-bf
knelson
12-16-2002, 02:59 PM
yes...you'll need to make sure that the include file path matches with the one that's set in the php.ini file. i don't know what platform you're working on, but the modified php.ini file in many unix implementations is located in /usr/local/lib.
the include path is typically /usr/local/lib/php/.
for apache, php 4.x needs this...
if you have compiled php as a module
LoadModule php4_module /usr/apache2/modules/libphp4.so
(this path may be different, depending on platform and apache version)
In the AddType section, uncomment the lines that specify the php filetypes:
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
#
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
good luck.
knelson
beenframed
12-16-2002, 04:36 PM
In the php.ini file on both the old and new server (which by the way are running Solaris 8) The Include_Path statments look like this:
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
On the old server everything works fine...
And on both the old server running php3 and the new server running php4 here is what my Add Type Statements in the httpd.conf file look like:
AddType text/html .shtml
AddHandler server-parsed .shtml .html
AddHandler cgi-script .cgi .pl
AddType application/x-httpd-php3 .php3
Did you suggest that I add:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
to that file on the new server running php4?
Thanks for your help...
-BF
knelson
12-16-2002, 05:02 PM
yes...
add the AddType information below the php3 entries.
i'm also running Solaris 8, and I modified my include file to say this:
; UNIX: "/path1:/path2"
include_path = "/usr/local/lib/php/includes"
meaning, of course, that the UNIX line is commented out and the true include path is specified there. I created the "includes" directory.
beenframed
12-17-2002, 10:56 AM
ok - I got it to work so so...
I've added this line to my httpd.conf
Options Indexes FollowSymLinks Includes
and now I can bring up the page...I still have a problem though.. maybe someone knows how I can fix it..
I can't just go to the IP address like http:\\ipaddress
The page doesnt come up, But If I go http:\\ipaddress\index.html
Then the index page loads just fine...
Anyone know how I can fix that...... thanks...
-bf
knelson
12-17-2002, 11:24 AM
there's a line in httpd.conf that specifies what the default file of a given index is so that, for example, you'll go straight to the home page when you type only the domain name. likewise, if you typed a URL that ended with a directory name and not a file, the browser should point to the default file within that directory.
if your default page is set to index.php, and it doesn't exist, that's whiy you're not seeing anything. but if your homepage actually ends in .html, you're going to have to type it..
hope that makes sense..
knelson
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.