Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 1st, 2006, 12:31 PM
Registered User
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP Installation/Upgrade problems

I am currently attempting to upgrade a Linux server (running SuSE 9) from PHP version 4.3.4 to PHP version 5.1.6, the latest download I found online. I attempted to follow the instructions in the 'install' file which was packaged with the download, but I have apparently done something wrong. That's not too surprising, this is the first time I've ever tried to install PHP, or for that matter anything, on a linux box...I'm still fairly new to linux.

I was attempting to install php 5.1.6 on a system already running an apache2 server, which was hosting our 4.3.4 as far as I can tell. Everything seemed to be going well until I swapped out the old php.ini file for the new one. The new file was created by adding or changing the appropriate lines in the php.ini-recommended file that came with the download.

After I swapped out the ini files, I restarted the server, and it appeared to start. After this, though, I went to check on one of our previously coded php programs, which is dedicated to keeping updates on the slony database replication system. The page never displayed...or more precisely, a blank page appeared. Purely blank, no source code visible, and the word 'done' in the lower left corner. I tested this on a few other of our pages, and they all seem to have similar problems.

The situation is rather strange, because it's not like the system is totally broken down. A few of the pages I've built that I checked on were mostly echoed statements for building html forms that php would end up processing, and the print statements seem to work. That is, any print or echo statement between the '<?php' tag and the first non-print/echo statement produces output. (It should be noted that these are largely heredoc format print statements; there's really only a couple at most being processed.) The only other thing I was able to get to work was the phpinfo() command, which has glibly informed me that I'm still running 4.3.4 even after swapping out the ini files.

If anyone is willing to help me, I would greatly appreciate it. If you need more information, please let me know what is needed and I will respond as quickly as I can.

Thanks in advance,
-EnderX

"No trees were harmed in the creation of this message.&nbsp;&nbsp;However, several electrons were severely inconvenienced."
 
Old December 2nd, 2006, 04:44 AM
Registered User
 
Join Date: Dec 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A couple of things come to mind regarding your environment -
1. Check php.ini for "short_open_tag" - default is 'off' which denotes that only '<?php' is recognized. It seems that a lot of folks (myself included these days) are shortcutting by opening php blocks with '<?' only. I'd suggest setting short_open_tag to 'on', restart Apache, and try to hit one of your pages again. You may want to note where phpinfo() reports the location of php.ini and make sure that you're touching the right file.

2. It's interesting that phpinfo() reports the previous version instead of the new version - did you remove 4.3.4 prior to the 5.1.6 install, try to overwrite the existing install, or install 5.1.6 beside 4.3.4? Also, is PHP running as an Apache module or CGI? httpd.conf will tell you this along with where it is pointing to run PHP. Look also for reference to PHPRC env variable in both the httpd.conf, the user's environment starting Apache, and the Apache start script, I suppose if you log in as the user running Apache and get an output of env, you'll see where PHPRC is getting set somewhere (and to what) - it may contain some clues as to where Apache is pointing to PHP.

Hope that helps a little bit - I'd swear that PHP was a lot easier to install a few years ago.







Similar Threads
Thread Thread Starter Forum Replies Last Post
DB Installation and Upgrade Scripts happygv SQL Server 2000 1 March 1st, 2007 08:18 PM
php installation problems "No input file specified clem_c_rock PHP How-To 0 July 12th, 2004 10:58 AM
PHP Upgrade briggsa Beginning PHP 1 July 21st, 2003 02:17 PM
Ch. 1: PHP Installation Troubles: php3 vs php manjito BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 June 12th, 2003 03:59 PM
PHP upgrade killed my code- HELP [email protected] BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 June 9th, 2003 04:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.