Re: PHP v5.2.5 installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Pleased to hear you have it sorted now Jesse.

In theory, theory and practice are the same;
in practice they are not.

On Wed, 5 Dec 2007, Jesse Santana wrote:

To: Keith Roberts <keith@xxxxxxxxxxxx>
From: Jesse Santana <jsantana@xxxxxxxxx>
Subject: Re:  PHP v5.2.5 installation

Keith,

Thank you for the feedback. I do tar up my PHP directory before performing an upgrade and I keep these tar files around indefinitely so I can always reference them if needed. I install PHP in the same directory each time because we are running PHP as a CLI and I don't have access to all the scripts that our 25 different webmasters and countless students have written. The last thing I want to do is to have to tell everyone to change the shebang line in each script every time I upgrade PHP. We have tossed around the idea of a soft link but for now we continue to tar up the old directory and replace it with the new.

What about if you just copied the php cli to /usr/local/bin, or /usr/bin? That way it would be in the PATH and that path will not change between upgrades? My /user/local is on a seperate partition, so anything installed there should survive an OS upgrade.

I also see from your ./configure script that you do not use the '--with-readline' option. On Fedora 8 I have to use this option to allow me to use php interactively like a BASIC interpreter. This is really handy for debugging PHP one line interactively at a time. I thought this was enabled by default, but apparently it's not.

Try typing php -a at a shell command. You should then see something like this:

[root@karsites php-5.2.x]# php -a
Interactive shell

php > echo "Hello World";
Hello World
php >
php > $keywords = '$40 for a g3/400';
php > $keywords = preg_quote($keywords, '/');
php > echo $keywords; // returns \$40 for a g3\/400
\$40 for a g3\/400
php >
php > quit
[root@karsites php-5.2.x]#

Really handy for checking out those one-liners that your not sure about. If php just seems to hang and output a command prompt, then you probably need to use the '--with-readline' option.

Kind Regards

Keith Roberts



I was able to determine that my problem was related to the --with-openssl addition in my configure statement. As soon as I changed that to --with-openssl=/usr/local/ssl, the make completed successfully. The mysql_set_character undefined symbol error was sort of misleading but it's not the first time I've seen something like this.

Jesse

Jesse Santana
Project Lead - Enterprise Services Group
Information Technology Services
California State University, Long Beach
1250 Bellflower Blvd.
Long Beach, CA  90840
Office: (562)985-8511
Fax:     (562)985-8855




Keith Roberts <keith@xxxxxxxxxxxx>
12/05/2007 07:17 AM
Please respond to
Keith Roberts <keith@xxxxxxxxxxxx>


To
php-install@xxxxxxxxxxxxx
cc

Subject
Re:  PHP v5.2.5 installation






On Tue, 4 Dec 2007, Jesse Santana wrote:

To: php-install@xxxxxxxxxxxxx
From: Jesse Santana <jsantana@xxxxxxxxx>
Subject:  PHP v5.2.5 installation

I am running a Solaris 10 (SPARC) system that has Apache 2.2.6 and PHP
v5.2.2 installed.  PHP is running as a CLI and not as an Apache module.
The system works fine.  I am now in the process of upgrading PHP to
version 5.2.5 using the following configuration parameters:

./configure --prefix=/usr/local/php5 --with-openssl \

Not sure if this answers your prob at all - but it may help
keep things apart in the future and avoid any other conflicts.

Would it be a better option to compile each version of PHP
(and any other compiled software, including different
versions of Apache (http, https)) into it's own subdirectory
under /usr/local?

That way you will have the previous version for reference
purposes, and also as a 'fallback' untill you have your
latest version up and running? These are the main reasons I
like to compile php and apache myself. It's handy just
copying the configuration files from the old version across
to the new version, without messing up the previous
version's installation.

./configure --prefix=/usr/local/php-5.2.5

I would be inclined to do a 'make clean' in the php-5.2.5
source dir, and try again with the above installation
prefix. See what that does.

HTH

Keith Roberts

--with-oci8=instantclient,/usr/local/oracle/instantclient_10_2 \
--with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock \
--with-zlib-dir=/usr/local/lib \
--enable-fastcgi --with-xsl \
--with-mcrypt=/usr/local/libmcrypt --enable-mbstring \
--with-ldap

The configure finishes fine but when I run make I get the following
error:

Undefined                       first referenced
symbol                             in file
mysql_set_character_set             ext/mysql/php_mysql.o
ld: fatal: Symbol referencing errors. No output written to
sapi/cgi/php-cgi
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cgi/php-cgi'

Can you do a clean compile without building the php-cgi
module? If so this may give you a clue where the problem is.

I have MySQL version 5.0.37 installed on the system and running and I
have
both my PATH variables and LD_LIBRARY_PATH pointing to the appropriate
MySQL directories.

Can someone shed some light on what this error is telling me and how I
can
fix it?

Thanks!

Jesse

Jesse Santana
Project Lead - Enterprise Services Group
Information Technology Services
California State University, Long Beach
1250 Bellflower Blvd.
Long Beach, CA  90840
Office: (562)985-8511
Fax:     (562)985-8855




[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux