SOLVED PHP Version Information

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
pj_maybe
Registered User
Posts: 29
Joined: Sat Jul 09, 2005 4:25 pm

SOLVED PHP Version Information

Post by pj_maybe » Sat Aug 16, 2008 11:18 am

Hi all,

just a general question, if I go to my admin cp > system > php version, the board tells me I am running 4.4.8.

Yet in my hosting control panel it says I am running 5.2.5 which I am certain is the case.

How would I get the board to display/read the correct information ?
Last edited by pj_maybe on Sun Aug 17, 2008 12:24 pm, edited 1 time in total.

gbr1918
Registered User
Posts: 31
Joined: Fri Jan 26, 2007 10:04 pm

Re: PHP Version Information

Post by gbr1918 » Sat Aug 16, 2008 12:32 pm

If you upload a file with just one line:

Code: Select all

phpinfo();
to your server and call it by typing it's address into your browser window, you'll get every possible detail about your version of php. It'll be interesting to see what the result is!
The other possibility is that two versions of php are both present at once. Dunno quite how that works, but I think some hosting companies have done this to avoid breaking scripts when they upgrade the version. If that's the case you may need to specify php5 in your scripts to get the latest version.
Dave

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51780
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: PHP Version Information

Post by Brf » Sat Aug 16, 2008 12:41 pm

If you go to your ACP's System tab and click "php information", it will run that phpinfo for you.

User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: PHP Version Information

Post by Ricky_Racer » Sat Aug 16, 2008 12:42 pm

Maybe you could try re-uploading file, includes/acp/acp_php_info.php. :?
If that fails you might try this;
Using the code posted below, create a file, name it phpinfo.php, upload it to your webserver's root folder, (most likely /html/), now, open your browser, navigate to your website, and the newly created phpinfo.php file, (most likely http://www.your_domain_name.com/phpinfo.php)

Code: Select all

<?php
phpinfo();
?>
Now read the page and let us see what the server really has installed and configured for PHP.

pj_maybe
Registered User
Posts: 29
Joined: Sat Jul 09, 2005 4:25 pm

Re: PHP Version Information

Post by pj_maybe » Sat Aug 16, 2008 1:06 pm

OK did that :edit: (both the system check and the phpinfo.php) and I am surprised to see :

PHP Version 4.4.8 :?

I guess I should be contacting the hosts and asking them to upgrade ?

User avatar
T0ny
Registered User
Posts: 1383
Joined: Sun Jan 29, 2006 8:42 pm
Location: Lancashire
Name: Tony

Re: PHP Version Information

Post by T0ny » Sat Aug 16, 2008 2:32 pm

Your host may be running both versions. Try uploading the phpinfo file again using the extension .php5 and see if that runs and reports v5.2.5

pj_maybe
Registered User
Posts: 29
Joined: Sat Jul 09, 2005 4:25 pm

Re: PHP Version Information

Post by pj_maybe » Sat Aug 16, 2008 5:26 pm

T0ny wrote:Your host may be running both versions. Try uploading the phpinfo file again using the extension .php5 and see if that runs and reports v5.2.5
you are correct : PHP Version 5.2.5

so how would I go about making my board specify 5.2.5 ?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50577
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: PHP Version Information

Post by stevemaury » Sat Aug 16, 2008 5:36 pm

On some servers, you have to change all the .php file extensions to .php5. If you try this, I think the easiest way would be to work with the files on your computer and use DOS:

REN *.php *.php5

Unfortunately, there is no /s switch for this, so you must do it a folder at a time.

And then reupload them.

If it were me, I think I would upload phpbb3 to a different folder, after changing the file names, and then change the script path and test. If it works, just change the script path back and flipflop the folder names.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

User avatar
T0ny
Registered User
Posts: 1383
Joined: Sun Jan 29, 2006 8:42 pm
Location: Lancashire
Name: Tony

Re: PHP Version Information

Post by T0ny » Sat Aug 16, 2008 6:44 pm

If you're using cPanel hosting you may have the "PHP Configuration" icon in the "Software/Services" section of the control panel. If so, open it and see if there is a drop-down box labeled: The ".php" file extension will be processed by where you can select the version of PHP you want to use.

pj_maybe
Registered User
Posts: 29
Joined: Sat Jul 09, 2005 4:25 pm

Re: PHP Version Information

Post by pj_maybe » Sun Aug 17, 2008 12:00 pm

Thanks for all the responses, I tried each one and they all helped, the problem is now solved.

I didn't want to go through each file by hand (I think it was only 491 but still..) and I am not over familiar with using DOS so I went looking for an app and found this in case anyone is interested :

http://file-folder-ren.sourceforge.net/ ... ?page=Main

which I think is an excellent little tool when used along with any OS search function.

However, I found that adding the following line in your .htaccess file will instruct the server to handle all specified files with php 5.2.5 :

AddHandler application/x-httpd-php5 .php .htm .html

hope it helps someone :)

Locked

Return to “[3.0.x] Support Forum”