Jump to content

Trouble with initial installation


Recommended Posts

I'm running CentOS with Apache and MySQL, I've installed PHP but it doesn't seem to be working.  I've created a phpinfo.php file and placed it in the appropriate directory, but when I try to pull it up in a browser I just get plain text, its not executing.

 

I am running on a remote server, and have no access to the desktop, so testing with localhost is not an option, it is all live on the web.  My static test page for my URL is working, so I know Apache is working in regards to that.  What am I missing to get PHP to function properly?

Link to comment
Share on other sites

I am running on a remote server, and have no access to the desktop, so testing with localhost is not an option,

 

You can use command line browsers such as links or lynx, but its not likely to work locally and not from remotely.

 

What am I missing to get PHP to function properly?

 

How exactly did you go about installing php?

Link to comment
Share on other sites

You can use command line browsers such as links or lynx, but its not likely to work locally and not from remotely.

 

I only mentioned this because most of what I have found online suggests testing in a browser and pointing to localhost.

 

How exactly did you go about installing php?

 

I grabbed the PHP_5.2.14.tar.gz file from a mirror from PHP.net and placed it on my server, then I unpacked it and ran the following commands from within the source directory.

 

./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--disable-debug \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbstring \
--enable-mm=shared \
--enable-safe-mode \
--enable-track-vars \
--enable-trans-sid \
--enable-wddx=shared \
--enable-xml \
--with-dom \
--with-gd \
--with-gettext \
--with-mysql=/usr/local/mysql \
--with-regex=system \
--with-xml \
--with-zlib-dir=/usr/lib

make && make install

cp php.ini-dist /usr/local/lib/php.ini 

ln -s /usr/local/lib/php.ini /etc/php.ini

 

What exactly is in your phpinfo.php page, including what the php tags are?

 

This is the contents of my phpinfo.php page.

 

<?php
phpinfo();
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.