FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP5 testing on server 1





Bondings
I installed php 5 (Version 5.2.3) on server 1 (people with a frihost.net subdomain) for testing purposes.

I would like to get some feedback from users on server 1 on errors and other problems due to php 5. If something is wrong with your site, please say so, because it's important for me to know (and for your website).

If there aren't many errors, I will assume all is ok and probably keep this version, otherwise I'll put the old php 4 back. If this test is successful, I'll probably do a similar thing on server 2.
Ratmaster
Yes! If this works I'll be able to install mediawiki on Server 2 soon!
SpellcasterDX
I know this is for people on server 1 only, but if it is successful and if server 2 gets php5 as well, I wouldn't mind. I don't think I'd have any problems with my website or my forums. But glad to see you're giving it a shot Bondings.
GSIS
SpellcasterDX wrote:

... glad to see you're giving it a shot Bondings.


Here here!

Will we get a little warning before it's installed on Server 2?

I'd like to set some time aside for testing and bug-fixing (although I'm not anticipating anything worth worrying about).

I hope that wasn't 'famous last words' ...
Bondings
And I already found the first problem. The captcha directory needed to be chmod to 777, otherwise the registration page failed to show.
tidruG
there appears to be something wrong with the status images too... look at your signature.
There was also a bug in my Wordpress, but the plugin rectified itself after I cleaned its cache.
Apart from that, my Wordpress installations are working fine (and that's the only thing on my site which depends heavily on PHP)
Bondings
tidruG wrote:
there appears to be something wrong with the status images too... look at your signature.
There was also a bug in my Wordpress, but the plugin rectified itself after I cleaned its cache.
Apart from that, my Wordpress installations are working fine (and that's the only thing on my site which depends heavily on PHP)

Yes I noticed it, I'll contact daniel15 about it.

Also, another error is the "substr" function in php. Apparantly it outputs false if the second value is a negative integer, which it didn't in php4, and isn't supposed to do according to the documentation.
Bondings
No mails were being sent from php as it is/was running as nobody. I fixed it now.
bladesage
Just out of curiosity, couldn't you have both PHP 4 and PHP 5 installed? On my personal home server I use for testing, I have PHP 4, PHP 5, and PHP 6 (Beta) installed by using them as Apache CGI programs. Then, I can simply change the AddType directives and Action directives, depending on which PHP version I want to be default. That way, each user could set the different PHP version they want to use in their .htaccess files.

I do this...in my httpd.conf file, I type
Code:
ScriptAlias /php4/ "c:/www/php4/"
AddType webapp/php4 .php4 .php
Action webapp/php4 "/php4/php.exe"

ScriptAlias /php5/ "c:/www/php5/"
AddType webapp/php5 .php5
Action webapp/php5 "/php5/php-cgi.exe"


Theoretically, this same method would work for Unix, simply by replacing the "c:/www/php*" with the path to the PHP binaries.

Then, if I feel like using PHP 5 as the default CGI, I can simply place a .htaccess file in any directory I want it to apply to, using this code
Code:
AddType webapp/php5 .php5 .php
AddType webapp/php4 .php4


I also know a few webhosts (none are quite as good as here Wink) that use a similar technique. Then, since I typically want to use PHP 5, I simply place the following code in a .htaccess file in my site's root directory
Code:
AddType x-mapp-php4 .php4
AddType x-mapp-php5 .php .php5 .phtml .phtm


Just wondering if it would work out okay on Frihost...I know it works wonders for me Very Happy.
Bondings
Bladesage, yes that is definitely possible, just a little harder when you have a control panel installed. But if there are only a few problems, then I would rather like to upgrade everything completely and let the users fix the small/few problems they have.
bladesage
Ah, I forgot to take the control panels into consideration. Well, I was just giving a little advice, I see it won't work. Well, your approach is entirely sensible.

I wish you the best of luck, I thank you for deciding to try upgrading the PHP, and I hope everything works well enough for you to do it on server 2 soon!

Thanks,
-Alex

PS: If at all possible, would you mind installing the Phar extension when you upgrade to PHP5? It's fine if you can't, but it would really make my site easier to run.
{name here}
Well, I guess I can go without Wikia hosting after all for a wiki! I can't wait until it's finally installed on server two.
Rosanova
Hi there,

Upgrading PHP seems like that might be the 2 years birthday present (if it works of cause).

I'm not afraid to upgrade or modify some scripts for that reason.

So just go on, on server 2

Cheers!
Bondings
I'll definitely upgrade server 2 to php5 since there were only minor problems on server 1 (till now at least). I'm not sure about the configuration though, I might make it a dual php4/5 config as there is such an option for DirectAdmin, it's however in beta and still seems to have quite some problems - a plain php 5 installation would be easier. But this most likely won't be for next week since I have a lot of other things to do.
wise
It rocks to have php5... It must work, and i am looking forward to see it on server 2.
Daniel15
Bondings, there's a problem with how you compiled PHP. phpSuExec used to be enabled, but is now disabled. This is causing several problems (like the problem with the CAPTCHA directory needing to be CHMODded to 0777). I strongly suggest that you recompile PHP, enabling phpSuExec.

Quote:
Just out of curiosity, couldn't you have both PHP 4 and PHP 5 installed? On my personal home server I use for testing, I have PHP 4, PHP 5, and PHP 6 (Beta) installed by using them as Apache CGI programs. Then, I can simply change the AddType directives and Action directives, depending on which PHP version I want to be default. That way, each user could set the different PHP version they want to use in their .htaccess files.

Yep, I've done this before at another host, ages ago (using a method very similar to what you described). There's instructions in the cPanel forums explaining how to do this.

Bondings wrote:
Yes I noticed it, I'll contact daniel15 about it.

The script I use to get the load average is returning the following errors:
Quote:
Warning: Unknown: open_basedir restriction in effect. File(/home/daniel15/public_html/stuff/loadavg.php) is not within the allowed path(s): (/home/darkeagl:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0

Fatal error: Unknown: Failed opening required '/home/daniel15/public_html/stuff/loadavg.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0

I'm accessing the file directly via IP address (http://216.32.68.250/~daniel15/.....). The open_basedir setting appears to be set incorrectly. When phpSuExec is in use, there is no open_basedir restriction... It instead relies on the Linux file permissions.
erlendhg
That's great news.
Actually I noticed a change in the php (and guessed you had upgraded to php 5), because a little bug in my code (a php-file included two times) gave me an error Razz
This never happend in php 4, so I guessed it might be a bug that is fixed.

Apart from that, all my self-written code seems to work just fine after the upgrade Smile
phpc0d3r
Yeah, finally Frihost joins the present.
This could really benefit sites especially people who program their own sites.
It adds function like file_put_contents() and file_get_contents().
swizzy
finally... PHP5 on the horizon... if the server 1 guys dont complain... we server 2 people get PHP5!!! Laughing


I dont think there should be a major problem posed at all for any hoster running scripts. Almost all companies and organizations make thier script to work on PHP4 AND PHP5 ...
And if any guy is running thier own coded script, and they face problems, it can always be sorted out in the PHP/MySQL forum...

I think Bondings should simply install PHP5 on server2 (if there is no very very large problem encountered on server1), since PHP5 means more security and less risks, then Server2 can run even more efficiently.

Bondings? Will all the previous features stay? Will all the functions you disabled, remain so? Any plans for ImageMagick (which is far more less resource intensive than GD), this time?

Anyways now we will see a big flurry of people hosting resource intensive MediaWiki and similar scripts... Crying or Very sad
Bondings
Yes I'll be installing php 5 on server 2. Maybe at the end of this week as I'm currently pretty busy with a lot of programming and private stuff to do.
littlegiant
Pardon my ignorance but how do we know which server we're on? Also, I recently started getting a "URL file-access is disabled in the server configuration" error message on my Wordpress blog which was happening because I had my blog installed in a sub-directory and I was using a PHP includes directive to access a file in my site root directory. The thing was I was using absolute addressing in the includes directive which now no longer works. Was disabling URL file-access something to do with the upgrade to PHP 5 or is that something separate?
tidruG
You're hosted on server 1, littlegiant.
All accounts ending with .frihost.net are on Server 1, all accounts ending with .frih.net are on Server 2.
littlegiant
Oh okay, thanks. I'll make a note of that.
MARCIV
Nice ! my testing server is in PHP 5 Smile thanks to bondigs.

Dont forget to use <?php instead of <? it doesn't work in php 5
and update some other variables like $PHP_SELF wich need to be changed in $_SERVER['PHP_SELF']
tamilparks
very nice to hear this good information
Bondings
MARCIV wrote:
Nice ! my testing server is in PHP 5 Smile thanks to bondigs.

Dont forget to use <?php instead of <? it doesn't work in php 5

Are you sure about that? I have a lot of php pages with only the "<?" and they seem to continue to work fine. Wink
mOrpheuS
Bondings wrote:
MARCIV wrote:
Nice ! my testing server is in PHP 5 Smile thanks to bondigs.

Dont forget to use <?php instead of <? it doesn't work in php 5

Are you sure about that? I have a lot of php pages with only the "<?" and they seem to continue to work fine. Wink

Indeed.
I believe it has got more to do with the "short_open_tag" directive in php.ini, than with the php version.
MARCIV
Quote:
ust upgraded PHP4 to PHP5.2.3 on a server and noticed that most of the scripts simply does not work because the PHP tag starts with the old style "<?", but if we update this tag into "<?php"... script starts working properly.

So, instead of updating thousands of files manually or using a script, is there an option in php.ini which would force PHP to accept that old style script too?



WHY NOBODY TELL ME IT BEFORE ....... Embarassed
The World is Yours
Yeah, I can't wait for php5 and media wiki!!
Bondings
The World is Yours wrote:
Yeah, I can't wait for php5 and media wiki!!

We now have php 5 installed on all servers. Wink
The World is Yours
Bondings wrote:
The World is Yours wrote:
Yeah, I can't wait for php5 and media wiki!!

We now have php 5 installed on all servers. Wink


That's awesome, thanks a million Bondings, for a job well done!!
Related topics
Need some help with FTP
Web Comics
CGI-bin script help
How many sites are you hosting in your frihost ??
MySQL backup, cant find where to load them
Why direct admin
quick question about mysql but quite urgent!
Google Pack
my site is down
PHP/Mysql - beginner!
Mysql question!
php5 finally!
Local PHP Testing Server
Dreamweaver and Local Testing Server
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.