LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-11-2003, 03:21 AM   #1
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Rep: Reputation: 30
Please Help with php4 Apache2 for phpBB2 migration


Group,

I have done quite a bit of searching but I am now thoroughly lost.

My phpBB2 forum has been developed under IIS and MySQL on an XP laptop. I have now found hosting and will need to upload the BB to a linux/Apache server.

Now, I am new to most of this side - but I have been using Linux long enough to be able to get around. Please allow me to set out the problem...

I cannot seem to get a test phpinfo.php page to give me the information a book tells me it will once all is correctly installed:

<? phpinfo.php ?>

is in a file under /var/www/html/
in which my index.html (the home page from the migrating site) resides and loads correctly - even descending into the forum/ path to find the logos etc...

when I direct my browser to 127.0.0.1/phpinfo.php nothing comes up - but when I examine the source I can see the text from the file. Which tells me that PHP4 is not being called.

So I went through the install very carefully and ensured that I had the full PHP paths available and Apache configured thus:

LoadModule php4_module /usr/local/php4.3.2/libs/libphp4.so

but this returns the message in my logs/error_log

[warn] module php4 module is already loaded skipping

and yet prior to adding lines to httpd.conf there was no mention of php* anywhere in the file - I even had to add (as directed) the AddType lines:
AddType application/x-httpd-php .phtml .php
AddType application/x-httpd-php-source .phps

which the book seemed to think should have already been in the conf file (but commented out).

Now my Apache 2 was loaded as an RPM at install and I have become confused since downloading and installing 1.3 because I couldn't find the apachectrl file which I now have and which is working because it is stopping the service that is serving the page in the /var/www/html directory.

This is getting too involved for me to tackle I need some pointers as to why in this case things are not firing so I can get onto the database stuff and get the forum running under Linux/Apache before attempting to upload and go live with the site.

Please Help.

 
Old 08-11-2003, 12:43 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
The php code should be:
<?php phpinfo(); ?>
 
Old 08-11-2003, 05:09 PM   #3
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Original Poster
Rep: Reputation: 30
THANK YOU

David, thanks for your reply - it works of course!



I have rechecked the book and I was right in the code it listed <? phpinfo.php(); ?> . So I assume that it must be another version or configuration of Apache that reads the <? as the opening string for PHP or an earlier version of PHP????? Because the book goes on to list the following as "Opening Tags":

<?php
<?
<script language="php">

Thank you anyway for picking this up - I really appreciate it!
 
Old 08-11-2003, 06:56 PM   #4
C-Squared
Member
 
Registered: Feb 2003
Distribution: RedHat 9
Posts: 37

Rep: Reputation: 15
Quote:
So I assume that it must be another version or configuration of Apache that reads the <? as the opening string for PHP or an earlier version of PHP?????
The <?php and php?> are the default tags.
The <? and ?> only work if "Register_Globals" is set to "On" in either httpd.conf or php.conf (I forget which).
But I've never seen "<script language=php>".

I'm pretty sure that's how it works...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 and php4 in Debian swmok Debian 1 06-09-2005 05:21 PM
phpbb, apache2, php4 Odins_Son Linux - Software 2 12-23-2004 02:24 AM
apache2 + php4 atheist Linux - Software 6 10-25-2004 03:12 PM
Debian, apache2 and php4 Pasi Linux - Distributions 1 03-20-2003 07:28 PM
Apache2 & php4 CyberDrake Linux - Newbie 2 11-25-2002 11:32 AM


All times are GMT -5. The time now is 07:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration