[thelist] Installing PHP??

McAtee, Malcolm MMcAtee at philamuseum.org
Mon Jul 9 10:16:10 CDT 2001


I did choose the server install and Apache is running. 
I have migrated all of my website files from my NT box using Samba. (which
works great!!)
SSI's are working, CGI scripts are working. But none of the existing PHP
Code that exist on my files are working (see below)

<? 

// function to randomly display an image above menu

srand(time());
$im = rand(0,9);
$dims = getimagesize("images/rotation/$im.jpg");
print("<img src=\"images/rotation/$im.jpg\" " . $dims[3]);
print(" border=0 alt=\"");
if (file_exists("images/rotation/$im.txt")) 
   {
   $capfile = fopen("images/rotation/$im.txt", "r");
   $caption = fgets($capfile, 255);
   fclose($capfile);
   print(chop($caption));
   }
print("\"><br>");
print("<img src=\"/images/spacer.gif\" width=1 height=1 border=0
alt=\"\">");
print("<br>");
virtual("global/menu.shtml");

?>

I also tried your recommendation of:

<?php
phpinfo();
?>


 nothing.

At this stage of the game I assuming that it is not installed.
I am pretty new to Linux /Apache3/ etc. so I am probably more comfortable
installing using  RPMs.
Does this mean I need to install Apache all over again??


Thanks for the help



-----Original Message-----
From: Steve Cook [mailto:steve.cook at evitbe.com]
Sent: Monday, July 09, 2001 7:43 AM
To: 'thelist at lists.evolt.org'
Subject: RE: [thelist] Installing PHP??

A lot here depends upon the installation method you chose. If you chose a
straightforward "Server Install" then both Apache and PHP should be
installed. If you chose another install method you would have had to specify
PHP (as far as I remember). There's a good chance that you already have
apache however.

Apache may be up and running already - type http://127.0.0.1 into your web
browser on that machine. If you get an Apache page you're laughing, if
server is not found then either Apache isn't installed or it's not running.
You can use RPM to check whether it was installed (both Gnome and KDE have
nice handy graphical RPM clients where you can search for "apache").

If Apache is running, then track down the web root (/home/www or
/var/www/htdocs are possible locations) and create a file called index.php
containing the following lines:

<?php
phpinfo();
?>

Type http://127.0.0.1/index.php in your browser. If you get an error then
PHP isn't installed, if however you get a nice page full of handy server
information then everything is as it should be and you can start programming
PHP to your heart's content.

Should you find that one or either of PHP and Apache aren't working then
your best bets are either to use your original RedHat 7 CD to install them
directly, or even better download the latest RPMs and install the very
latest versions.

Personally my mileage has varied with the RPMs - if you're feeling brave
your best bet is to compile everything from source files, but it's not the
most straightforward of processes. Alternatively I believe there are quite a
few scripts around on the web which will help you through a complete install
of Apache, PHP AND MySQL all in one go. Perhaps someone else can recommend
something that's worked for them?

I hope this helps Malcolm.

.steve

----------------------------------
   WapWarp - http://wapwarp.com
 Wap-Dev - http://www.wap-dev.net
 Cookstour - http://cookstour.org
----------------------------------

> -----Original Message-----
> From: McAtee, Malcolm [mailto:MMcAtee at philamuseum.org]
> Sent: den 9 juli 2001 16:23
> To: thelist at lists.evolt.org
> Subject: [thelist] Installing PHP??
>
>
>
>  I have installed REDHAT linux 7.0 on my test server. Apache was also
> installed.
> Was PHP installed? How do I "activate" it? Everything I am
> reading indicates
> that I need to install PHP and Apache at the same time ...
>
> Do I need to reinstall Apache??
>
> Thanks Malcolm
>

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list