Advertisement:

Author Topic: Need an easy to follow php install guide for unix  (Read 14338 times)

Offline Onsite

  • Semi-Newbie
  • *
  • Posts: 73
Need an easy to follow php install guide for unix
« on: December 24, 2004, 12:11:12 AM »
I lease a few Verio servers and I want to upgrade php on them.
They have default install scripts, but I can't compile anything different using them.
For example I need to compile pspell during the install.

I've looked over the php.net documentation, but it's a bit beyond my skill level.
Do any of you know of a newbie level guide to compiling and installing?
My format will need to be:
Unix
FreeBSD
Apache

Thanks
« Last Edit: December 24, 2004, 01:32:26 AM by Onsite »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Need an easy to follow php install guide for unix
« Reply #1 on: December 25, 2004, 04:12:09 AM »
Well, I don't, but the basic idea is:

# wget http://url/to/file.tar.gz
# tar xvzf file.tar.gz
# cd file

At which point you'll have the file directory extracted.  The next step is configure - if you look at a phpinfo, you'll see your configure line.  An example is:

# './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-xmlrpc' '--with-zlib'

Just an example.  You may want to copy yours, and add at the end "--with-pspell" (and/or any other options.)  Then, you want to make it, like so:

# make

After that, it's time to install.  Installation has to be done as root... so:

# su
# make install

You also want to restart Apache.  There are a few ways to do this depending on your server, so I'll list them:

# apachectl graceful
# /etc/init.d/httpd graceful
# httpd graceful
# apache2 graceful
# /etc/init.d/apache2 graceful

Then we exit as root:

# exit

And just for safety, maybe check the error log:

# tail /var/log/messages

-[Unknown]

Offline kdizzle

  • Semi-Newbie
  • *
  • Posts: 67
Re: Need an easy to follow php install guide for unix
« Reply #2 on: August 14, 2005, 11:11:01 PM »
I know this is an old post but ....[Unknown] you have the knowledge I need.

I have this http://apbio.ohs.oside.k12.ca.us/testspell.php for php info.

Since I have php compiled currently how do I recompile it with --with-pspell ?

Do I download the source from the dvd I installed it from?  (Suse 9.3)
or
Do I get php4.4 from the web and use my same old configure settings.
or
Ignore my questions and explain in small words how I would recompile php over an existing php install?

Thank you.



Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Need an easy to follow php install guide for unix
« Reply #3 on: August 15, 2005, 01:43:07 AM »
I would just download the source from php.net.  I don't think any distros modify PHP.

-[Unknown]

Offline kdizzle

  • Semi-Newbie
  • *
  • Posts: 67
Re: Need an easy to follow php install guide for unix
« Reply #4 on: August 15, 2005, 02:10:50 AM »
I do not have a compiler in my SUSE distro because it is rpm based. 

I get the following error when I try to compile:

loading cache ./config.cache
checking host system type... x86_64-suse-linux-gnu
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

If you have time for a quick reply I would really appreciate it.

I have the rpm on the install dvd but not the source.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Need an easy to follow php install guide for unix
« Reply #5 on: August 15, 2005, 05:18:26 AM »
I do not have a compiler in my SUSE distro because it is rpm based.

You can always install gcc....

http://rpm.pbone.net/index.php3?stat=3&limit=1&srodzaj=1&dl=40&search=gcc-3&dist[]=33&dist[]=19&dist[]=20&field[]=1&field[]=2

-[Unknown]

Offline kdizzle

  • Semi-Newbie
  • *
  • Posts: 67
Re: Need an easy to follow php install guide for unix
« Reply #6 on: August 15, 2005, 12:19:03 PM »
I used yast and intatlled gcc then I ran the configure with my php.ifo output and now it says that it cannot find the path to apsx?

This is the output from the php.info:
'./configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib64' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib64/php/bin' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 'x86_64-suse-linux'

What is weird is that there is no apsx2-prefork in /usr/sbin ?

Thank you for your help I think this seems like alot of trouble,  I think I must be doing it wrong.
« Last Edit: August 15, 2005, 12:23:05 PM by kdizzle »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Need an easy to follow php install guide for unix
« Reply #7 on: August 15, 2005, 06:00:21 PM »
So I assume you installed the RPMs for everything, huh?

You may need apache2-devel.  Do you have slocate? (the locate command...)

-[Unknown]