Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Apache2/PHP4 compile/startup fine but no PHP parsing (blan..

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache 2.0.52 symlinks from public_html/ to sibli..  
Author Message
Randell D.

External


Since: Feb 26, 2007
Posts: 2



(Msg. 1) Posted: Mon Feb 26, 2007 5:18 am
Post subject: Apache2/PHP4 compile/startup fine but no PHP parsing (blank page for phpinfo)
Archived from groups: alt>apache>configuration, others (more info?)

Folks,

I consider myself well versed with Apache 1.3 and PHP4 - I found
drupal and wanted to try it out - I had problems getting it working
with Apache2/PHP5/MySQL5 so I downgraded... Note: I did have Apache2/
PHP5 working... I confirmed this via phpinfo output... But now that I
removed my original directory containing Apache/PHP, and recompiled
from scratch, I get everything to startup and static html is displayd,
but phpinfo produces no errors, but no output (literally zero output).

Where am i going wrong?

This is my environment (forget mysql for the moment as I just want
Apache/PHP working first)
Apache 2.0.59
PHP 4.4.5

I compile the above using the following:

# cd apache
# ./configure --prefix=/opt/apache --enable-so --enable-vhost-alias
# make
# make install
# cd ../php
# ./configure --with-apxs2=/opt/apachebin/apxs --with-mysql
# make
# make install

And i have the following in my Apache httpd.conf file

LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php

Note - I see in the php.chm document it asks i place the following
below the ClearModuleList
AddModule mod_php4.c

I don't have a ClearModuleList and when I put AddModule in at the end
of my httpd.conf, I get the following error:

Syntax error on line 1039 of /opt/apache/conf/httpd.conf:
Invalid command 'AddModule', perhaps mis-spelled or defined by a
module not included in the server configuration

I can't recall using AddModule before though.

If i exclude the AddModule reference, Apache starts up fine... (log
reference below)
[Sun Feb 25 14:50:51 2007] [notice] Apache/2.0.59 (Unix) PHP/4.4.5
configured -- resuming normal operations

and a httpd -l output shows this;

Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_info.c
mod_cgi.c
mod_vhost_alias.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_alias.c
mod_so.c


When I connect using Firefox, I get the Apache test page. When I call
phpinfo.php, I just get a blank page and no source - I have the
Firefox Developer bar installed and get the headers listed as:

Date: Sun, 25 Feb 2007 13:55:19 GMT
Server: Apache/2.0.59 (Unix) PHP/4.4.5
X-Powered-By: PHP/4.4.5
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html

200 OK


Can someone tell me what i've forgotten?

Many thanks,
Randell D.

 >> Stay informed about: Apache2/PHP4 compile/startup fine but no PHP parsing (blan.. 
Back to top
Login to vote
Randell D.

External


Since: Feb 26, 2007
Posts: 2



(Msg. 2) Posted: Mon Feb 26, 2007 7:50 am
Post subject: Re: Apache2/PHP4 compile/startup fine but no PHP parsing (blank page for phpinfo) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Feb 26, 2:18 pm, "Randell D." <fiprojects.....DeleteThis@gmail.com> wrote:
> Folks,
>
> I consider myself well versed with Apache 1.3 and PHP4 - I found
> drupal and wanted to try it out - I had problems getting it working
> with Apache2/PHP5/MySQL5 so I downgraded... Note: I did have Apache2/
> PHP5 working... I confirmed this via phpinfo output... But now that I
> removed my original directory containing Apache/PHP, and recompiled
> from scratch, I get everything to startup and static html is displayd,
> but phpinfo produces no errors, but no output (literally zero output).
>
> Where am i going wrong?
>
> This is my environment (forget mysql for the moment as I just want
> Apache/PHP working first)
> Apache 2.0.59
> PHP 4.4.5
>
> I compile the above using the following:
>
> # cd apache
> # ./configure --prefix=/opt/apache --enable-so --enable-vhost-alias
> # make
> # make install
> # cd ../php
> # ./configure --with-apxs2=/opt/apachebin/apxs --with-mysql
> # make
> # make install
>
> And i have the following in my Apache httpd.conf file
>
> LoadModule php4_module modules/libphp4.so
> AddType application/x-httpd-php .php
>
[snip]
>
> Can someone tell me what i've forgotten?
>
> Many thanks,
> Randell D.

Got it!

I re-compiled everything and even did a make clean before configure
however I think I found a possible bug during re-installation...

/usr/local/lib/php existed (I guess from my previous php5
installation) and there must have been some reference to it in my /usr/
local/lib/php.ini

I removed all php references from under /usr/locallib and re-compiled
again from scratch and found that my phpinfo() worked...

I make note here in case someone else might find the same problem some
other time in the future... and need a solution...

cheers
Randell d.

 >> Stay informed about: Apache2/PHP4 compile/startup fine but no PHP parsing (blan.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Apache2 work with PHP4 - Hi all! I am running a SuSE 8.2 server with apache2 on it. I tried to use php on that server by installing mod_php and other necessary rpm's. Normally you run SuSEconfig and the whole thing is working. But with Apache2 it doesn't. On the tail of the..

apache2 php4 .htaccess - greetings, 3 years ago, i had a windows box configured as a webserver running apache2 and had a directory i wished to keep private, password protected with ..htaccess. it worked with no trouble for all the time it was in use, but that was long ago an...

Apache2 compile flags - Hi all, In PHP you can view the compile flag options that PHP was built with by using the phpinfo function. What's the equivalent for Apache2? I'm using Redhat9 which came with httpd 2.0.40-21 I'm looking into building Apache from source but want to..

I definitly cannot compile apache2 under aix - Hi, I got the following message while tying to compile apache 2.2.2 under AIX 4.3 with GCC 3. The configure options are : ../configure --prefix=/opt/httpd2 --with-apr=/opt/httpd2/apr --with-apr-util=/opt/httpd2/apr --enable-module="ssl auth_basic..

apache2 php4 - browser showing source ?? - I downloaded a GUI for nagios that uses PHP but when I point the browser at the PHP file, it shows me the source of .php file instead of executing it, if i use command line 'php filname.php' then I see exepected result but why can I not do that via web?...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]