Simple Machines Community Forum

Simple Machines => News and Updates => Topic started by: Ben_S on July 13, 2005, 07:50:22 AM

Title: PHP 4.4.0 Compatibility
Post by: Ben_S on July 13, 2005, 07:50:22 AM
Simple Machines is happy to release a compatibility update to Simple Machines Forum 1.0.5. This release addresses a backward compatibility issue with the new release of PHP, 4.4.0, which causes SMF to stop working entirely.

You can easily upgrade in one of the following ways:


You should install this update as soon as possible if you wish to install it via the package manager, as your forum will become inaccessible if your host upgrades to PHP 4.4.0 without this change, and you will not be able to access the package manager.

If you are using SMF 1.1 Beta 3 Public, you do not need to make any changes.  That version is already compatible with PHP 4.4.0.
Title: Re: PHP 4.4.0 Compatibility
Post by: shock on July 13, 2005, 10:26:08 PM
I take it this is good...
Title: Re: PHP 4.4.0 Compatibility
Post by: dtm.exe on July 13, 2005, 10:43:02 PM
I take it this is good...

If your host upgraded PHP to 4.4.0, then yes, it's good :).

-Dan The Man
Title: Re: PHP 4.4.0 Compatibility
Post by: Isaac on July 14, 2005, 12:21:58 AM
Update went flawlessly. :)
Title: Re: PHP 4.4.0 Compatibility
Post by: robotangel on July 14, 2005, 12:40:18 AM
Now, everything works well  ;)
Title: Re: PHP 4.4.0 Compatibility
Post by: Trekkie101 on July 14, 2005, 03:48:37 AM
Im using 1.1 Beta 3, but if your host is on 4.3.X would this cause a problem?
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on July 14, 2005, 03:49:37 AM
This doesn't affect SMF 1.1 Beta 3 Public.  I would recommend the change for anyone using a lower version than that of SMF, because you never know when your host might upgrade.

This change makes it work on both older and newer versions.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: Trekkie101 on July 14, 2005, 03:52:34 AM
Ah thanks, just wondered if my 1.0.5 test break if I done it.
Title: Re: PHP 4.4.0 Compatibility
Post by: Daniel D. on July 14, 2005, 05:19:28 AM
Im using 1.1 Beta 3, but if your host is on 4.3.X would this cause a problem?
Please read the first post...
Title: Re: PHP 4.4.0 Compatibility
Post by: Trekkie101 on July 14, 2005, 05:24:52 AM
I did, sorry for not being clear. It was 8.48am when I posted.

what I should of said

Im using 1.1 Beta 3 and although it doesnt affect me, will it break 1.0.5 if my host is still running PHP 4.3.X and I execute the changes.

and I got my answer :) (no)

sorry again.
Title: Re: PHP 4.4.0 Compatibility
Post by: Dannii on July 14, 2005, 06:16:38 AM
Upgrading now..

I just noticed the new packages header. Very cool :D
Title: Re: PHP 4.4.0 Compatibility
Post by: Powerbob on July 15, 2005, 01:15:25 AM
Hi went like a dream thanks. ;D

Also noticed the change  to the package manager header, very nice 8) 8)


Powerbob
Title: Re: PHP 4.4.0 Compatibility
Post by: frijole73 on July 15, 2005, 03:34:07 PM
works great!!!!  :D  :D  :D  :D  :D
Title: Re: PHP 4.4.0 Compatibility
Post by: Ped on July 15, 2005, 07:02:43 PM
I am a wee bit confused here. My server is running PHP 5.0.2 would the 4.4.0 upgrade have benefit?
Title: Re: PHP 4.4.0 Compatibility
Post by: Killer Possum on July 15, 2005, 07:05:53 PM
I'm not 100% sure, but you may want to upload the file just incase.
Title: Re: PHP 4.4.0 Compatibility
Post by: Ben_S on July 15, 2005, 07:06:53 PM
I am a wee bit confused here. My server is running PHP 5.0.2 would the 4.4.0 upgrade have benefit?

No, but PHP 5.0.4 is the latest 5.0x release.
Title: Re: PHP 4.4.0 Compatibility
Post by: Ped on July 15, 2005, 07:38:14 PM


No, but PHP 5.0.4 is the latest 5.0x release.

I am a mere "hobbyist reseller"  ;) & the more I learn the more apparent my lack of knowledge is. The version PHP 5 server upgrade came with some problems and BB2 type forums didnt fare too well with it, but SMF stood up well. I was just a little surprised to see that there "may" have been a potential problem.

Thanks for clearing that up  :D

Ped
Title: Re: PHP 4.4.0 Compatibility
Post by: HEB XI 1 on July 16, 2005, 02:04:20 AM
upgraded 3 forums from 1.0.4 to 1.0.5 and then installed the patch with no probs ... thanks as usual to the team for being on top of things :)
Title: Re: PHP 4.4.0 Compatibility
Post by: Jaraeth on July 17, 2005, 01:24:20 AM
Nice... and I was starting to get baffled with the fact that my forums would not log me out, not let me into the admin, or much of anything else due to session issues... Turns out, I updated to PHP 4.4.0 earlier this week and didn't notice this thread yet ;)
Title: Re: PHP 4.4.0 Compatibility
Post by: Champi on July 17, 2005, 07:14:10 AM
Hi Ben,

in your first post, you talked about attached file and make some modifications..

i just installed the patch trough the package manager with one click.. without making other modifications.. i hope that that's enough..??

Greetz

Indeed nice header in the admin panel  :P
Title: Re: PHP 4.4.0 Compatibility
Post by: deebee on July 17, 2005, 07:52:45 AM
I have SMF 1.0.4 and my server has just been upgraded to php 4.4.0. Tried deleting the '&' in subs.php but this hasn't fixed the problem. Also, I can't even access the board admin to upgrade to 1.0.5.

Any suggestions?

David.
Title: Re: PHP 4.4.0 Compatibility
Post by: Grudge on July 17, 2005, 08:01:15 AM
deebee,

Can you post a topic in the support forum? Can you detail in it in what way your forum isn't working (i.e. what do you see when you go into it)

Thanks,

Grudge
Title: Re: PHP 4.4.0 Compatibility
Post by: deebee on July 17, 2005, 08:37:51 AM
Hi Grudge,

Have already posted in the thread that suggested the amperasand fix in subs.php. I can't access any aspect of the board - when I try, I get this error message

"Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later." Host tells me the server is fine and running OK.

There is just one mod on the board - Mambo-SMF bridge from Mambohacks. Problem is I can't even access the admin side of the board to remove this mod before upgrading to 1.0.5.
Title: Re: PHP 4.4.0 Compatibility
Post by: Grudge on July 17, 2005, 11:34:01 AM
deebee,

I don't think that's related to the fix actually - it sounds like SMF can't find your database - can you verify the database is up by using phpMyAdmin - and if it is check the settings in Settings.php are correct...
Title: Re: PHP 4.4.0 Compatibility
Post by: deebee on July 17, 2005, 01:05:07 PM
grudge,

I can access the database with phpmyadmin OK. I have, as recommended in another post, replaced the settings.php and settings.bak files with the orginal files from the initial 1.0.4 download. However, I still get this connection error.

A post on the support forum suggested upgrading to 1.0.5. Have just done a full backup prior to trying this but am a little nervous because...

[a] the updater to 1.0.5 suggested that it can't be used if there mods in place (I have one, Mambo-SMF) and

does the upgrader work on 1.04 to 1.0.5

What settings in settings.php should I be looking for?
Title: Re: PHP 4.4.0 Compatibility
Post by: deebee on July 17, 2005, 01:24:20 PM
Sorry, forget the last post. I've just adjusted the setting in settings.php & I'm back in the board now.
Thx for your help  :)
Title: Re: PHP 4.4.0 Compatibility
Post by: Champi on July 17, 2005, 02:46:22 PM
hi guys,

i installed the patch trough the package manager.. is that enough.. or do i have to make some other modifications too.

greetz.. thnx in forward
Title: Re: PHP 4.4.0 Compatibility
Post by: xenovanis on July 17, 2005, 02:47:15 PM
hi guys,

i installed the patch trough the package manager.. is that enough.. or do i have to make some other modifications too.

greetz.. thnx in forward

That 'll do fine.  ;)
Title: Re: PHP 4.4.0 Compatibility
Post by: Champi on July 17, 2005, 02:48:57 PM
Dank je wel... Thnx for the quick reply..  :D
Title: Re: PHP 4.4.0 Compatibility
Post by: permutations on July 17, 2005, 06:26:06 PM
FYI.... The package worked on one of my sites, but failed on another. The site it worked on originally had 1.0.3 installed, later upgraded to 1.0.5. The site it failed on was originally running YaBB-SE, and I upgraded that to 1.0.5. When I looked inside Subs.php on the formerly-YaBB-SE site, I saw that it didn't have the ampersand before the mysql_query call in the first place.

So you might want to tweak your package a little to exclude SMF sites that were upgraded from YaBB-SE. This site had no mods installed and I wasn't hacking files there, so the ampersand  wasn't missing due to anything I did.
Title: Re: PHP 4.4.0 Compatibility
Post by: Grudge on July 17, 2005, 06:27:12 PM
permutations,

Be aware that the 1.0.5 packages on the download page have already had the fix installed - so if you upgraded recently that would be why it didn't work.
Title: Re: PHP 4.4.0 Compatibility
Post by: permutations on July 17, 2005, 06:43:20 PM
That's probably it. I downloaded the upgrade package just the other day.

I wonder if there's a way the package manager can respond to this condition in a less frightening way than "failure" (in boldface red). It didn't scare me, but it might scare someone who didn't know how to look in Subs.php and see what failed.

(And OH WOW - someone fixed a problem in the editor that has been driving me crazy for many versions! I can highlight "failure" and click "bold" then "red" without having to re-reselect the word.)

Here's a little nit I noticed (since discovering the free version of XML Spy yesterday):

The package.xml file has the <type> tag after the <version> tag. This doesn't affect functionality, but it differs from what the schema says, so XML Spy complains.
Title: Re: PHP 4.4.0 Compatibility
Post by: iman_ebru on July 17, 2005, 06:46:51 PM
 everything works well  :)
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on July 17, 2005, 06:53:40 PM
I wonder if there's a way the package manager can respond to this condition in a less frightening way than "failure" (in boldface red). It didn't scare me, but it might scare someone who didn't know how to look in Subs.php and see what failed.

Too many people ignore it.  The wording has been replaced with "Test failed" in 1.1 because people did not often realize that was what it meant.

Quote
(And OH WOW - someone fixed a problem in the editor that has been driving me crazy for many versions! I can highlight "failure" and click "bold" then "red" without having to re-reselect the word.)

Yes, this has changed in 1.1; Internet Explorer and Firefox both highlight properly.  Safari and Opera still do not.

Quote
The package.xml file has the <type> tag after the <version> tag. This doesn't affect functionality, but it differs from what the schema says, so XML Spy complains.

Odd - I don't believe the order is supposed to matter in the slightest.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: NBK on July 17, 2005, 07:16:51 PM
I'm not sure that I still have al package servers in the list on my site. I can't find the any of the update packages. What is the URL of the server where the packages are located on? Maybe I deleted something :o
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on July 17, 2005, 07:21:25 PM
I'm not sure that I still have al package servers in the list on my site. I never have been able to find any of the packages. What is the URL of the server where the packages are located on? Maybe I deleted something :o

The package for this is not on any package server.  Look at the "Browse Packages" page of your package manager and peel your eyes open.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: NBK on July 17, 2005, 07:24:14 PM
LOL, it's hard to find something when you keep looking in the wrong place :-X
Title: Re: PHP 4.4.0 Compatibility
Post by: sancho on July 17, 2005, 08:00:05 PM
And if one is running 1.0.5 and PHP 4.3.11 is there any conflict?  Or is this where the in case scenario applies? Thanks/
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on July 17, 2005, 08:01:54 PM
No, there's no conflict.  Even if you are running SMF 1.0 Beta 4 Public, you can apply this patch - and should, even on PHP 4.2.0 (although it won't make a bit of difference, until your host upgrades.)

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: sancho on July 17, 2005, 08:14:56 PM
Okay which file archive do I download? I downloaded smf 1.0.5 update zip on July 11 and this one has the same name for July 13.  Thanks
Title: Re: PHP 4.4.0 Compatibility
Post by: Krysia on July 17, 2005, 09:00:22 PM
I get the following alert when I tried to install via the Package Manager:

Quote
An Error Has Occurred!
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

I have SMF 1.0.5 installed. Could this be because my server may have already updated the PHP thing, or is it the file?
Thank you... :)
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on July 17, 2005, 09:45:20 PM
You'll have to download the package from the first post and upload it to your Packages folder manually.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: Mark_Breznay on July 17, 2005, 09:50:15 PM
I get this:

 You cannot download or install new packages because the Packages directory is not writable!

Does this mean it is already installed/
Mark
Title: Re: PHP 4.4.0 Compatibility
Post by: sancho on July 17, 2005, 09:53:29 PM
It's just the subs.php file right? 
Title: Re: PHP 4.4.0 Compatibility
Post by: Krysia on July 17, 2005, 11:40:05 PM
You'll have to download the package from the first post and upload it to your Packages folder manually.

-[Unknown]
Oh, darn. I knew it was going to be something like that. :-\
LOL...
<off to download>
Title: Re: PHP 4.4.0 Compatibility
Post by: xenovanis on July 17, 2005, 11:41:26 PM
You'll have to download the package from the first post and upload it to your Packages folder manually.

-[Unknown]
Oh, darn. I knew it was going to be something like that. :-\
LOL...
<off to download>

Have you read the first post? This is a minor change, you can either make the change yourself in Subs.php or just upload the file attached in the first post.
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on July 18, 2005, 01:18:04 AM
I get this:

 You cannot download or install new packages because the Packages directory is not writable!

Does this mean it is already installed/
Mark

No, it means either your Packages directory is not writable, or something else is wrong.  Please try doing it manually.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: colorjaws on July 18, 2005, 03:08:41 AM
heu I removed the & but that is the message i am getting know??? what do I have to do to get it back on track?

Quote
Parse error: ""/Subs.php on line 1515

Notice: Undefined index: ""s/Sources/Security.php on line 556

Notice: Undefined index: permissions in""s/Sources/Security.php on line 563

Warning: in_array(): Wrong datatype for second argument in ""htdocs/Sources/Security.php on line 563
session_start(): Cannot send session cache limiter - headers already sent (output started at ""Subs.php:1515)
 
Title: Re: PHP 4.4.0 Compatibility
Post by: happyb8888 on July 18, 2005, 03:12:25 AM
Three days ago, if you tried to get on my site you received a message saying the database couldn't be located.
Tonight I received your message about upgrade 1.05

Okay, I downloaded upgrade 1.05 and installed all the files.  When I try to go to the upgrade screen I get a message saying it can't be found.  It's there... in my www.mysite.com/forum (my real site not mysite) but it won't respond by opening when I address to it.  Am I doing something wrong??

I checked the Sub.php file and the ampersand isn't there.  But when I do the forum/index.php it still tells me the database can't be located.  Is this an ISP problem now??
Title: Re: PHP 4.4.0 Compatibility
Post by: colorjaws on July 18, 2005, 03:19:08 AM
Ok I got the problem out and everyting is working fine know  8)
Title: Re: PHP 4.4.0 Compatibility
Post by: Meriadoc on July 18, 2005, 06:11:00 AM
Three days ago, if you tried to get on my site you received a message saying the database couldn't be located.
Tonight I received your message about upgrade 1.05

Okay, I downloaded upgrade 1.05 and installed all the files.  When I try to go to the upgrade screen I get a message saying it can't be found.  It's there... in my www.mysite.com/forum (my real site not mysite) but it won't respond by opening when I address to it.  Am I doing something wrong??

I checked the Sub.php file and the ampersand isn't there.  But when I do the forum/index.php it still tells me the database can't be located.  Is this an ISP problem now??
Happy - could you post the actual error message you are receiving please?
Sounds like your Settings.php file doesn't have the right info to find your database. You could try repair_settings.php - What is repair_settings.php? (http://www.simplemachines.org/community/index.php?topic=18096.0)
Title: Re: PHP 4.4.0 Compatibility
Post by: sancho on July 18, 2005, 01:32:21 PM
I'm a bit confused here about these directions.

Download the update archive file, and upload all of the files from it.
Download the modification file, attached to this message, and modify the files manually according to it.
Download the Subs.php file attached to this mesage, and upload it to your Sources directory (if you have no modifications installed.)
Find the following in Sources/Subs.php:


The update archive contains a number of files.  I can't find that archive.
Then there is the instruction to download the modification file and modify the files. 
Both of thse directions are in the plural and are talking of multiple files.
Then there is the option to download the subs.php which is just one file. So will my site be current if I just FTP the subs.php file or are there more files to edit or change?

Thanks
Title: Re: PHP 4.4.0 Compatibility
Post by: bubbahs on July 18, 2005, 04:06:01 PM
so the subs file is the the only thing that needs to be changed? Correct?
Title: Re: PHP 4.4.0 Compatibility
Post by: xenovanis on July 18, 2005, 04:11:42 PM
so the subs file is the the only thing that needs to be changed? Correct?

That is correct.
Title: Re: PHP 4.4.0 Compatibility
Post by: Meriadoc on July 18, 2005, 04:24:49 PM
I'm a bit confused here about these directions.

Download the update archive file, and upload all of the files from it.
Download the modification file, attached to this message, and modify the files manually according to it.
Download the Subs.php file attached to this mesage, and upload it to your Sources directory (if you have no modifications installed.)
Find the following in Sources/Subs.php:


The update archive contains a number of files.  I can't find that archive.
Then there is the instruction to download the modification file and modify the files. 
Both of thse directions are in the plural and are talking of multiple files.
Then there is the option to download the subs.php which is just one file. So will my site be current if I just FTP the subs.php file or are there more files to edit or change?

Thanks

those are 4 different options you have for the patch, 4 steps of the same direction.
Title: Re: PHP 4.4.0 Compatibility
Post by: happyb8888 on July 18, 2005, 05:27:40 PM
Happy - could you post the actual error message you are receiving please?
Sounds like your Settings.php file doesn't have the right info to find your database. You could try repair_settings.php - What is repair_settings.php? (http://www.simplemachines.org/community/index.php?topic=18096.0)

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.


That's the message I receive when I try to go to my site.  This is the message I receive when I try to load the upgrade.php file:

Page not found
The page you are looking for might have been removed,
had its name changed, or is temporarily unavailable.


I get the same message as above when trying to use the repair_settings.php .

Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on July 18, 2005, 06:08:08 PM
That's the message I receive when I try to go to my site.

Have you contacted your host?  You might try to verify your connection information with repair_settings.php... What is repair_settings.php? (http://www.simplemachines.org/community/index.php?topic=18096.0)

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: happyb8888 on July 19, 2005, 03:32:30 AM

Have you contacted your host?  You might try to verify your connection information with repair_settings.php... What is repair_settings.php? (http://www.simplemachines.org/community/index.php?topic=18096.0)

-[Unknown]

I can't get into repair_settings.php.  I get a message saying it can't find the page, even though I uploaded it to my site.
Title: Re: PHP 4.4.0 Compatibility
Post by: Cynthia Blue on July 19, 2005, 10:04:54 AM
Thanks for this thread! My forums were broken, and a search revealed this fix. Whew!  My forums are back now and working fine.
Title: Re: PHP 4.4.0 Compatibility
Post by: teamvtec on July 19, 2005, 03:50:40 PM
everything OK, upgrade complete  ;D
Title: Re: PHP 4.4.0 Compatibility
Post by: DefTol on July 21, 2005, 03:12:12 AM
Hello...Just wondering,is this the part that was to have the ampersand removed,and if so is this the only place that it is located?

Code: [Select]
$ret = mysql_query($db_string, $db_connection);
if ($ret === false)
$ret = db_error($db_string, $file, $line);
Title: Re: PHP 4.4.0 Compatibility
Post by: Meriadoc on July 21, 2005, 04:41:09 AM
yes, there was only one place to remove it from, and that was it :)
Title: Re: PHP 4.4.0 Compatibility
Post by: MrWoof on July 21, 2005, 12:46:46 PM
that was a sweet and simple update. i just got the message today about subs.php, found this and voila! :D
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on August 05, 2005, 09:00:57 AM
Please post a link to your forum.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: Mark_Breznay on August 07, 2005, 01:29:09 PM
I have v 1.0.5 installed.  Do I need this php upgrade?  If so, where do I find the upgrade files?
Mark
Title: Re: PHP 4.4.0 Compatibility
Post by: xenovanis on August 07, 2005, 01:38:51 PM
I have v 1.0.5 installed.  Do I need this php upgrade?  If so, where do I find the upgrade files?
Mark

Yes, it would be wiser to update just incase your host decides to change the php-version. Have you read the first post of this topic (http://www.simplemachines.org/community/index.php?topic=41955.60)? It describes three different ways of how you can update.
Title: Re: PHP 4.4.0 Compatibility
Post by: dtm.exe on August 07, 2005, 01:38:54 PM
I have v 1.0.5 installed.  Do I need this php upgrade?  If so, where do I find the upgrade files?
Mark

PHP 4.4.0 is not required to run SMF 1.0.5.  This is merely a fix to make SMF 1.0.5 compatible with this new version of PHP.

-Dan The Man
Title: Re: PHP 4.4.0 Compatibility
Post by: Mark_Breznay on August 07, 2005, 03:16:12 PM
My Package Manager doesn't work.  I don't have any mods.  Please SPECIFY which one I should use.  I don't like multiple choice.
Mark
Title: Re: PHP 4.4.0 Compatibility
Post by: xenovanis on August 07, 2005, 04:11:26 PM
My Package Manager doesn't work.  I don't have any mods.  Please SPECIFY which one I should use.  I don't like multiple choice.
Mark

Just upload the attached Subs.php to your Sourcesdirectory.
Title: Re: PHP 4.4.0 Compatibility
Post by: Mark_Breznay on August 07, 2005, 04:32:41 PM
???????????????
Title: Re: PHP 4.4.0 Compatibility
Post by: dtm.exe on August 07, 2005, 04:35:35 PM
???????????????

Would you like for me to do it for you?  I understand how some people aren't the best with computers and the internet (like my mom :P).  Please PM or IM me if I can assist you with the upgrade.

-Dan The Man
Title: Re: PHP 4.4.0 Compatibility
Post by: Mark_Breznay on August 07, 2005, 04:53:03 PM
Just upload the attached Subs.php to your Sourcesdirectory.

This is what confused me.  To me, it indicated that this person had attached a file to his message.  I went back to the start of the thread and found the file.  It is now uploaded and all, hopefully, is well.  Thanks.
Mark
Title: Re: PHP 4.4.0 Compatibility
Post by: tdv on August 09, 2005, 04:27:16 AM
When I remore the '&', I got the following message:
Quote
Notice: Undefined index: is_admin in /home/davidh05/public_html/smf/Sources/Security.php on line 556

Notice: Undefined index: permissions in /home/davidh05/public_html/smf/Sources/Security.php on line 563

Warning: in_array(): Wrong datatype for second argument in /home/davidh05/public_html/smf/Sources/Security.php on line 563
session_start(): Cannot send session cache limiter - headers already sent (output started at /home/davidh05/public_html/smf/Sources/Subs.php:1890)
What I should do to get my board back?
Title: Re: PHP 4.4.0 Compatibility
Post by: xenovanis on August 09, 2005, 05:38:25 AM
Which version of SMF are you using? Try uploading the attached Subs.php from the first post of this thread. You'll need to install some mods again.
Title: Re: PHP 4.4.0 Compatibility
Post by: tdv on August 09, 2005, 06:46:21 AM
I uploaded the Sub.php, and got my boards back, thanks. ;)
Title: Re: PHP 4.4.0 Compatibility
Post by: SMAguy on August 18, 2005, 06:18:25 PM
Well, I have precisely the same problem as tdv but uploading the new Sub.php DIDN'T affect anything. I have SMF 1.04 and various mods.

Any ideas?
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on August 18, 2005, 06:22:41 PM
Upload all of the files from the upgrade zip file on the downloads page and reinstall your mods.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: SMAguy on August 19, 2005, 01:17:19 AM
Actually, having initially sent a trouble ticket to my hosting service, I received a reply in the interim from an engineer with them (they had just upgraded to PHP 4.4) and he examined the Sub.php and noticed an extra blank line that was somehow causing the problem!

I'm pretty impressed with that service (Site 5), I must say .

Title: Re: PHP 4.4.0 Compatibility
Post by: Herman's Mixen on August 20, 2005, 07:04:11 PM
oke ... but host upgraded to php 4.4.0 so why isn't SSI.php work correctly now
with SMF 1.0.5 installed it worked great with 4.3.xx of php version
???

Title: Re: PHP 4.4.0 Compatibility
Post by: xtremecruiser on August 20, 2005, 09:37:09 PM
Ok stupid Question.
My host went to 4.4.0 and I did the update and it was fine.  They changed back to 4.3.1 :o will that cuase issues ?
Thanks
Title: Re: PHP 4.4.0 Compatibility
Post by: codenaught on August 20, 2005, 11:06:05 PM
Ok stupid Question.
My host went to 4.4.0 and I did the update and it was fine.  They changed back to 4.3.1 :o will that cuase issues ?
Thanks
It should work fine doing the changes even if you are on PHP 4.3.
Title: Re: PHP 4.4.0 Compatibility
Post by: m0to on August 22, 2005, 01:37:11 PM
i cannot find the = &mysql_query....any ideas?
Title: Re: PHP 4.4.0 Compatibility
Post by: Compuart on August 22, 2005, 02:24:40 PM
i cannot find the = &mysql_query....any ideas?
The link in your signature points to an SMF 1.1 forum, which isn't affected at all by this compatibility problem. The same goes for the current 1.0.5 on the download page.
Title: Re: PHP 4.4.0 Compatibility
Post by: m0to on August 22, 2005, 02:53:41 PM
oh im sorry i forgot to mention it is my friends that is messing up. he is upgrading to 1.0.5 and he says he cannot find the & thingy can you help?
Title: Re: PHP 4.4.0 Compatibility
Post by: Meriadoc on August 22, 2005, 04:03:57 PM
1.0.5 on our downloads page contains the fix already, so it seems that when your friend upgraded, he uploaded a fixed copy of Subs.php.
Title: Re: PHP 4.4.0 Compatibility
Post by: newbe on August 30, 2005, 05:23:43 PM
Please help, I just moved to a new server.  Everything was working fine on the old server.  When I did the move, I know get this error msg.  I already had installed the update on the old server.  But it left the & in the subs file.  When I manually delete it, the site does not come up at all.  Just a blank screen, no errors, nothing.  Any idea.
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on August 30, 2005, 05:27:51 PM
Please help, I just moved to a new server.  Everything was working fine on the old server.  When I did the move, I know get this error msg.  I already had installed the update on the old server.  But it left the & in the subs file.  When I manually delete it, the site does not come up at all.  Just a blank screen, no errors, nothing.  Any idea.

What text editor are you using?  Have you tried doing it with just Notepad?

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: newbe on August 30, 2005, 05:32:20 PM
yes. first I used dreamweaver.  Then I started over using notepad.  Both do the same thing.  If I return to the backup version the site comes back up, but so does the error.
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on August 30, 2005, 06:07:53 PM
Are you uploading it using Dreamweaver?  Dreamweaver is known to mess up PHP files (like Subs.php.)

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: newbe on August 30, 2005, 06:12:42 PM
No, I am using cuteftp
Title: Re: PHP 4.4.0 Compatibility
Post by: newbe on August 30, 2005, 06:31:11 PM
Thank you for your help.  I tried editing the file directly on the server.  This solved the problem.  For now.  I hope...
Title: Re: PHP 4.4.0 Compatibility
Post by: Aaron on August 31, 2005, 12:47:49 PM
Download the 1.0.5 package from the downloadpage and extract Subs.php from it. Then upload that file. Solved?
Title: Re: PHP 4.4.0 Compatibility
Post by: Dannii on September 04, 2005, 08:51:32 AM
that's a whole lot of work for removing only 1 letter. Use the package manager if you can, or else just edit the file directly.
Title: Re: PHP 4.4.0 Compatibility
Post by: Elmacik on September 14, 2005, 04:05:36 PM
my php version is 4.4.0 but got no errors about it till now..
Title: Re: PHP 4.4.0 Compatibility
Post by: nobodyhere on September 15, 2005, 10:36:39 PM
SMF 1.1 Beta 3 Public spellcheck.js error?

SMF 1.05 upgraded to SMF 1.1 Beta 3 Public.
Spell check is enabled and working on my server.
php version to 4.4.0.

Click the Spell Check button and this error is displayed in a dialog box.

Problems with this Web page might prevent it from being displayed properly
or functioning properly. In the future, you can display this message .... etc.

Line: 9
Char: 2
Error: 'spell_formname' is null or not an object
Code: 0
URL: http://domainname.com/testforum/index.php?action=post;board=1.0

Did i do the upgrade wrong some how?
Is this a problem in spellcheck.js or somewhere else?
Any idea how to fix this?

I did search the board here and found nothing about this.
Did i miss it some how? Point me the right direction please?
Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on September 15, 2005, 10:57:31 PM
That has nothing to do with PHP 4.4.0, or if it does no one else has had the problem.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: M@D-M@X on September 19, 2005, 08:08:38 PM
I load from the pages upgrade package (http://www.simplemachines.org/download.php/smf_1-0-5_upgrade.zip) and I drove its to the server but fault didn't repair.

Where is fault? in the forum is a few mod eg. bannermod and old warning mod which didn't operate (so sight) admin panel. Forum version is 0.5

Look http://www.newface2005.net/smf

Title: Re: PHP 4.4.0 Compatibility
Post by: [Unknown] on September 19, 2005, 08:56:11 PM
Your problem is a mod installed in the theme you're using.

Please start new topics for new requests (http://www.simplemachines.org/community/index.php?topic=18624.0), and we'll help you there.

-[Unknown]
Title: Re: PHP 4.4.0 Compatibility
Post by: Owdy on September 20, 2005, 02:26:50 AM
Her problem started with this:

Notice: Only variables should be assigned by reference in /home/newface2/public_html/smf/Sources/Subs.php on line 232

Notice: Undefined index: is_admin in /home/newface2/public_html/smf/Sources/Security.php on line 556

Notice: Undefined index: permissions in /home/newface2/public_html/smf/Sources/Security.php on line 563

Warning: in_array(): Wrong datatype for second argument in /home/newface2/public_html/smf/Sources/Security.php on line 563
session_start(): Cannot send session cache limiter - headers already sent (output started at /home/newface2/public_html/smf/Sources/Subs.php:232)
Notice: Only variables should be assigned by reference in /home/newface2/public_html/smf/Sources/Subs.php on line 232


But its all fixed now.
Title: Re: PHP 4.4.0 Compatibility
Post by: skyhigh007 on October 26, 2005, 07:32:23 PM
My hosting company uses, PHP 4.3.11 and i download the smf 1.0.5.    and i got a  "Fatal error: Call to undefined function: db_error() in /home/placeto/public_html/forum/Sources/Subs.php on line 234"

The code for the line 234

$ret = mysql_query($db_string, $db_connection);
   if ($ret === false)
      $ret = db_error($db_string, $file, $line);   <------234

What should i do ?
Title: Re: PHP 4.4.0 Compatibility
Post by: ufuk.exe on November 02, 2005, 11:57:50 AM
Just edited the file manually after being SHOCKED that it was down, thinking I was hacked (since it said _admin, etc..) came here, saw the topic, and edited the file and removed the "&" and all is good now.

Thanks SMF for fast and great support, and figuring out what was the cause!!!!

Title: Re: PHP 4.4.0 Compatibility
Post by: huijaa on November 02, 2005, 05:09:02 PM
I had it too.... well very shocked....thought it was hacked...
It's damn good solution with an easy & removing... ;)
Title: Re: PHP 4.4.0 Compatibility
Post by: Aeolis on November 02, 2005, 05:49:14 PM
lemme guess, you two use 1&1 as well :P
Title: Re: PHP 4.4.0 Compatibility
Post by: ufuk.exe on November 03, 2005, 12:40:15 AM
Yes,
well Ignorant 1&1 !!! Nothing else that I could say, an easy "We will upgrade, please check compatibility of your php scripts" e-mail would have been nice, but NO, they couldn't do it!

Anyway, I guess it is the space/feature that counts rather than customer service, thank god the uptime is not bad on 1&1.
Title: Re: PHP 4.4.0 Compatibility
Post by: Eren Yaşarkurt on November 03, 2005, 03:59:51 AM
I don't work at 1&1, but hosts don't have to inform their customers about every upgrade they make. Also they can't know about all the spesific software and also if they will crash or not when an upgrade is made :)
Title: Re: PHP 4.4.0 Compatibility
Post by: BySilent on November 06, 2005, 03:00:19 AM
After following all the great advice in this thread and the links to other topics I am still getting the following error message and yes my ISP did upgrade to 4.4 today.....

Notice: Undefined index: fuseBox_autoOptDatabase in /home/interne7/public_html/msgboard/Sources/Subs.php on line 232

Notice: Undefined index: is_admin in /home/interne7/public_html/msgboard/Sources/Security.php on line 612

Notice: Undefined index: permissions in /home/interne7/public_html/msgboard/Sources/Security.php on line 619

Warning: in_array(): Wrong datatype for second argument in /home/interne7/public_html/msgboard/Sources/Security.php on line 619
session_start(): Cannot send session cache limiter - headers already sent (output started at /home/interne7/public_html/msgboard/Settings.php:63)


I first took out the & didn't work... downloaded 1.0.5 pulled out subs.php loaded it to the server still no change... I can not get into the control panel to use package manager and I pulled down the php package and manually loaded it into the package directory as the tar file (wondering if I have to do anything to activate it once loaded)

Just stumped at this time why I still getting the same error message I started with prior to making the changes.
Title: Re: PHP 4.4.0 Compatibility
Post by: Owain on November 06, 2005, 05:20:15 AM
I have a problem, when I click on the link in the admin section to upgrade my forum, it logs me out and says I do not have admin rights, so I log back in and it does it again!

Any ideas?

The actual error is :

Warning!
You are not allowed to administrate this forum.
Please login below or register an account with TractionKiting.co.uk


Owain.
Title: Re: PHP 4.4.0 Compatibility
Post by: LaurieC on November 08, 2005, 01:11:33 PM
Our host is upgrading to 4.4.1 and I was wondering if this is going to have an effect on our SMF installation? We are running SMF 1.1 RC1. Sorry if this is in the wrong place I have been unalble to find anything about 4.4.1  :(
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 08, 2005, 01:12:45 PM
Our host is upgrading to 4.4.1 and I was wondering if this is going to have an effect on our SMF installation? We are running SMF 1.1 RC1. Sorry if this is in the wrong place I have been unalble to find anything about 4.4.1  :(

This doesnt affect the 1.1 line. ;)
Title: Re: PHP 4.4.0 Compatibility
Post by: LaurieC on November 08, 2005, 01:17:36 PM
That was a huge sigh of relief for me  :P

Thank you
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 08, 2005, 01:18:23 PM
That was a huge sigh of relief for me  :P

Thank you

You welcome.
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 08, 2005, 03:09:39 PM
Our host is upgrading to 4.4.1 and I was wondering if this is going to have an effect on our SMF installation? We are running SMF 1.1 RC1. Sorry if this is in the wrong place I have been unalble to find anything about 4.4.1  :(

This doesnt affect the 1.1 line. ;)

It affected my SMF 1.1 Beta 1

So its after 1.1 Beta 3
Title: Re: PHP 4.4.0 Compatibility
Post by: David Gonzalez on November 13, 2005, 02:42:08 PM
Do anyone know how to update this in Fantastico via ssh?
Title: Re: PHP 4.4.0 Compatibility
Post by: thinkbig on November 17, 2005, 10:58:38 AM
I just came to learn about this thread.

My host upgraded the PHP to 4.4.. and now I cant get into my admin area at all!

Please advice :(
Title: Re: PHP 4.4.0 Compatibility
Post by: Killer Possum on November 17, 2005, 11:02:01 AM
I replied to your other post thinkbig. Just go to the first post in this thread, there is a fixed Subs.php file attached to it. Just download it and upload the file to your server.
Title: Re: PHP 4.4.0 Compatibility
Post by: thinkbig on November 17, 2005, 11:06:25 AM
Problem is solved! Thank you Killer Possum!

Much appreciated!

At last! I can smile ! :))
Title: Re: PHP 4.4.0 Compatibility
Post by: amysti2 on November 18, 2005, 02:37:39 PM
Our ISP struck this morning. So glad you were a step ahead. Can you believe it took me an hour to realize I couldn't see/download the php file from here without logging in?! How's that for swift.  ::) Now that I found/installed it, it worked without a hitch. Thanks so much.
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 02:53:51 PM
Well my issue is I have not reacted in time. Our Host has upgraded and we did not install this patch. Hence I can not access any part of my forum including the admin panel. Any hard code fixes to get me in to fix this?
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 02:55:19 PM
Here is the version output from the server:
PHP 4.3.11 (cli) (built: Jun 25 2005 12:25:11)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with Zend Extension Manager v1.0.7, Copyright (c) 2003-2005, by Zend Technologies
with Zend Optimizer v2.5.10, Copyright (c) 1998-2005, by Zend Technologies
Title: Re: PHP 4.4.0 Compatibility
Post by: morph on November 21, 2005, 02:55:59 PM
Find the following in Sources/Subs.php:

= &mysql_query

And remove the & (ampersand.)  How do I modify files? (http://www.simplemachines.org/community/index.php?topic=24110.0)
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 02:59:35 PM
Problem number 1: Incompleate Subs.php file. Here is what I do have:

<?php
/******************************************************************************
* Subs.php                                                                    *
*******************************************************************************
* SMF: Simple Machines Forum                                                  *
* Open-Source Project Inspired by Zef Hemel (zef@zefhemel.com)                *
* =========================================================================== *
* Software Version:           SMF 1.0.4                                       *
* Software by:                Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2005 by:     Lewis Media (http://www.lewismedia.com)         *
* Support, News, Updates at:  http://www.simplemachines.org                   *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it     *
* under the terms of the provided license as published by Lewis Media.        *
*                                                                             *
* This program is distributed in the hope that it is and will be useful,      *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
* See the "license.txt" file for details of the Simple Machines license.      *
* The latest version can always be found at http://www.simplemachines.org.    *
******************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');

/*   This file has all the main functions in it that relate to, well,
everything.  It provides all of the following functions:

resource db_query(string database_query, string __FILE__, int __LINE__)
- should always be used in place of mysql_query.
- executes a query string, and implements needed error checking.
- always use the magic constants __FILE__ and __LINE__.
- returns a MySQL result resource, to be freed with mysql_free_result.

int db_affected_rows()
- should always be used in place of db_insert_id.
- returns the number of affected rows by the most recently executed
query.
- handles the current connection so the forum with other connections
active at the same time.

int db_insert_id()
- should always be used in place of mysql_insert_id.
- returns the most recently generated auto_increment column.
- handles the current connection so the forum with other connections
active at the same time.

void updateLastMessages(array ID_BOARDs)
- takes an array of board IDs and updates their last messages.
- if the board has a parent, that parent board is also automatically
updated.
- columns updated are ID_LAST_MSG and lastUpdated.
- note that ID_LAST_MSG should always be updated using this function,
and is not automatically updated upon other changes.

void updateStats(string statistic, string condition = '1')
- statistic can be 'member', 'message', 'topic', 'calendar', or
'postgroups'.
- the condition is optional, and is only used to update post groups.
- the 'member' statistic updates the latest member, the total member
count, and the number of unapproved members.
- updating 'message' changes the total number of messages, and the
highest message id by ID_MSG.
- 'topic' updates the total number of topics.
- the 'calendar' statistic updates the cache of the calendar
information for a day before and after today.
- the 'postgroups' case updates those members who match condition's
post-based membergroups in the database.

void updateMemberData(int ID_MEMBER, array data)
- updates the columns in the members table.
- ID_MEMBER is either an int or an array of ints to be updated.
- data is an associative array of the columns to be updated and their
respective values.
- any string values updated should be quoted and slashed.
- the value of any column can be '+' or '-', which mean 'increment'
and decrement, respectively.
- if the member's post number is updated, updates their post groups.
- this function should be used whenever member data needs to be
updated in place of an UPDATE query.

void updateSettings(array changeArray)
- updates both the settings table and $modSettings array.
- all of changeArray's indexes and values are assumed to have escaped
apostrophes (')!
- if a variable is already set to what you want to change it to, that
variable will be skipped over; it would be unnecessary to reset.

string constructPageIndex(string base_url, int &start, int max_value,
int num_per_page, bool compact_start = false)
- builds the page list, e.g. 1 ... 6 7 [8] 9 10 ... 15.
- compact_start caused it to use "url.page" instead of
"url;start=page".
- handles any wireless settings (adding special things to URLs.)
- very importantly, cleans up the start value passed, and forces it to
be a multiple of num_per_page.
- also checks that start is not more than max_value.
- base_url should be the URL without any start parameter on it.
- uses the compactTopicPagesEnable and compactTopicPagesContiguous
settings to decide how to display the menu.
- an example is available near the function definition.

string comma_format(float number)
- formats a number to display in the style of the admins' choosing.
- uses the format of number_format to decide how to format the number.
- for example, it might display "1 234,50".
- caches the formatting data from the setting for optimization.

string timeformat(int time, bool show_today = true)
- returns a pretty formated version of time based on the user's format
in $user_info['time_format'].
- applies any necessary time offsets to the timestamp.
- if todayMod is set and show_today was not not specified or true, an
alternate format string is used to show the date with something to
show it is "today" or "yesterday".
- performs localization (more than just strftime would do alone.)

string un_htmlspecialchars(string text)
- removes the base entities (&lt;, &quot;, etc.) from text.
- should be used instead of html_entity_decode for PHP version
compatibility reasons.
- additionally converts &nbsp; and &#039;.

int forum_time(bool use_user_offset = true)
- returns the current time with offsets.
- always applies the offset in the time_offset setting.
- if use_user_offset is true, applies the user's offset as well.
- returns seconds since the unix epoch.

string doUBBC(string message, bool enableSmileys = true)
- parses bbc tags in message.
- only parses smileys if enableSmileys is true.
- does nothing if the enableBBC setting is off.
- applies the fixLongWords magic if the setting is set to on.
- returns the modified message.

void parsecode(string &message)
- this very hefty function does the bulk of message parsing.
- only parses BBC tags which are not disabled in disabledBBC.
- also handles basic HTML, if enablePostHTML is on.
- caches the from/to replace regular expressions so as not to reload
them every time a string is parsed.
- returns nothing, but instead modifies message directly.

void parsesmileys(string &message)
- the smiley parsing function which makes pretty faces appear :).
- if custom smiley sets are turned off by smiley_enable, the default
set of smileys will be used.
- these are specifically not parsed in code tags
- caches the smileys from the database or array in memory.
- doesn't return anything, but rather modifies message directly.

string highlight_php_code(string code)
- Uses PHP's highlight_code() to highlight PHP syntax
- does special handling to keep the tabs in the code available.
- used to parse PHP code from inside  (http://mailto:Dad@blah.com)
Code: [Select]
and [php] tags.
- returns the code with highlighted HTML.

void writeLog(bool force = false)
// !!!

void redirectexit(string setLocation = '', bool add = true, bool refresh = false)
// !!!
Title: Re: PHP 4.4.0 Compatibility
Post by: redone on November 21, 2005, 03:01:30 PM
Or you could just upload the Subs file that Ben attatched in his original post.

 ;)
Title: Re: PHP 4.4.0 Compatibility
Post by: morph on November 21, 2005, 03:01:42 PM
Go to the first post (http://www.simplemachines.org/community/index.php?topic=41955.msg304313#msg304313) and download the Subs.php file attached.

EDIT: too quick for me redone :P
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 03:03:13 PM
I did that too, now I get the following:

Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 03:10:15 PM
How do I fix this?
Title: Re: PHP 4.4.0 Compatibility
Post by: kegobeer on November 21, 2005, 03:33:30 PM
Read the first post in this thread for instructions.
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 03:41:43 PM
I have done that to the best of my abbilities, I am still recieveing a Template Parse Error. How do I get around this error?
Title: Re: PHP 4.4.0 Compatibility
Post by: redone on November 21, 2005, 04:33:49 PM
Even after uploading the file Ben attatched?

Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 04:52:18 PM
that is correct
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 21, 2005, 05:06:16 PM
Do you have any mods installed?  If so which ones?
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 05:14:41 PM
Not that I know of. I am not worried about undoing any mods. Feature wise SMF has been solid for what we want. If I did have any mods none of them work anyways.

I do use a custom theme though, but that worked before, and I dont see how that effects the template.
Title: Re: PHP 4.4.0 Compatibility
Post by: Owdy on November 21, 2005, 05:23:07 PM
That error message means that your theme files has something wrong. Does default theme work?

This should work if you are logged in admin: http://www.kromestudio.com/SMF_Forum/index.php?theme=1
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 21, 2005, 05:48:04 PM
Ok he just uploaded all of his files and replace all of them.  It's still giving him the error.  Any ideas Owdy?
Title: Re: PHP 4.4.0 Compatibility
Post by: Owdy on November 21, 2005, 06:19:09 PM
Did he try default theme?
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 21, 2005, 06:25:19 PM
Did he try default theme?

Ok problems solved.  I ran repair_settings.php and disabled Queryless URLs.  Everything is up and running.
Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 21, 2005, 06:26:37 PM
OMG, Finally after 5 and a hlaf hours it is working. Thanks to the help of JayBachatero. Jay you are awsome, you worked with me on this for some time and thanks to your help everything is working. Great Job Man.
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 21, 2005, 06:30:30 PM
OMG, Finally after 5 and a hlaf hours it is working. Thanks to the help of JayBachatero. Jay you are awsome, you worked with me on this for some time and thanks to your help everything is working. Great Job Man.

You're welcome.
Title: Re: PHP 4.4.0 Compatibility
Post by: Owdy on November 21, 2005, 06:56:48 PM
Good job Jay!
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 21, 2005, 07:35:41 PM
Good job Jay!

Hey don't we represent the 2nd finest team in SMF :P
Title: Re: PHP 4.4.0 Compatibility
Post by: Owdy on November 22, 2005, 09:22:46 AM
2nd?!! We are 'The greatest ones' ;D
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 22, 2005, 09:28:22 AM
Well first besides the Dev team.  W/O them SMF wouldn't be what it is today.
Title: Re: PHP 4.4.0 Compatibility
Post by: Owdy on November 22, 2005, 09:32:32 AM
Dont be so serious :P
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 22, 2005, 09:33:32 AM
I'm not sir :P  Just forgot my smiley. :P:)
Title: Re: PHP 4.4.0 Compatibility
Post by: thugpolice on November 22, 2005, 11:28:25 AM
Just wanted to thank everyone for the posts on this subject. I was receiving:

Notice: Only variables should be assigned by reference in /home/###/public_html/Sources/Subs.php on line 232

Notice: Undefined index: is_admin in /home/###/public_html/Sources/Security.php on line 556

Notice: Undefined index: permissions in /home/###/public_html/Sources/Security.php on line 563

Warning
: in_array(): Wrong datatype for second argument in /home/###/public_html/Sources/Security.php on line 563
session_start(): Cannot send session cookie - headers already sent by (output started at /home/###/public_html/Sources/Subs.php: 232)

I could not get to the admin panel - so I downloaded and installed the Subs.php file noted in the first post. There was no &mysql_query to be found though - the "&" was already gone.

Again, thank you all.  8)
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 22, 2005, 09:19:27 PM
we just got hit with this one today.  I removed the ampersand, and the forums are back but most of the avatars are missing (mine was uploaded to the forum server)

I re-uploaded the whole subs.php file above but the avatars are still mising.  Any ideas? (it's a simple thing to reupload the pictures, I'm just wondering why)

We are using 1.0.5 and the server says it is running php 4.4.1


-cris
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 22, 2005, 09:40:41 PM
Try repairing the settings.
What is repair_settings.php? (http://www.simplemachines.org/community/index.php?topic=18096.0)
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 22, 2005, 09:55:24 PM
OK I uploaded that- pointed my browser to is and clicked "save settings"

which reverted my theme back to the default theme but no avatars came back.

an interesting thing happened when I clicked the red x and chose properties

I get this : "http://scgarrison.net/smf/index.php?action=dlattach;id=17;type=avatar"

however I am user "1" not 17!

I was able to just change my avatar to "link" to the currently saved file on the server (the one that was already there) but I was not even able to re-upload it to rid myself of the dreaded red X.

another thing of note is that the attached files and images are still showing up- just not the avatars.  (some of them are- but maybe those are ones hosted by us...)

thanks again for your help!!

-cris


Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 22, 2005, 10:02:54 PM
Try this
Admin > Forum Maintenance > Find and repair any errors.
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 22, 2005, 10:15:34 PM
I wish I could say that worked, but it didn't :(

It said no errors (actually it was blank)

I clicked anyway and it said  "all fixed" but still no avail

if you wanted to see for yourself it is at

http://scgarrison.net/smf/index.php      name: testmember  password: password

the avatar is a red x for this member right now....


thanks again

-cris
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 22, 2005, 10:20:27 PM
when i go to http://scgarrison.net/smf/index.php?action=dlattach;id=88;type=avatar  it says attachment not found.  Not sure what to tell you.  Is this for all the memebrs or just thisone?
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 22, 2005, 11:32:13 PM
some members are showing up- some are red Xs.

Mine for instance was a red x
 
and so was the test member.  I think all of the hosted ones lost thier associations.  The thing is- even if they were erased, which I doubt, you should still be able to upload a new one which I was still not able to do...

I'll keep playing with it.  I swear the only file I touched was subs.php in sources!!

-cris

edit:  yep if I go to manage attachments in admin, all of the regular attachments are there, but if I go to avatars- even though it lists them all, if you click them you get file not found etc.  I checked the forum settings and it is still set to allow avatar uploads.  I cannot figure out what has changed. One minute all good- the next- Php4.4.0 errors galore followed by this after sources/subs.php was replaced...


Title: Re: PHP 4.4.0 Compatibility
Post by: worm5252 on November 23, 2005, 11:47:17 AM
Jay what about checking the attachments folder through ftp to see if the attachment files are indeed there. If not what about uploading test images into that directory and renameing them to match the files names he has in the list as a temporary fix to allow people to edit their profiles and upload a new one again>
Title: Re: PHP 4.4.0 Compatibility
Post by: redone on November 23, 2005, 12:05:40 PM
Check via ftp that the images are indeed there and that permissions are correctly set. Experiment with your admin account also to track the issues with avatars.

Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 23, 2005, 12:58:27 PM
thanks for the suggestions

this is what is in my attachments folder right now as far as avatars go:

 avatar_1.jpg 18 k 0644
 avatar_1.png 10 k 0644
 avatar_10.jpg 11 k 0644
 avatar_100.png 7 k 0644
 avatar_106.png 10 k 0644
 avatar_12.png 7 k 0644
 avatar_13.png 9 k 0644
 avatar_14.png 5 k 0644
 avatar_16.png 8 k 0644
 avatar_18.png 9 k 0644
 avatar_19.gif 4 k 0644
 avatar_2.jpg 18 k 0644
 avatar_2.png 10 k 0644
 avatar_20.png 9 k 0644
 avatar_27.png 9 k 0644
 avatar_28.png 7 k 0644
 avatar_3.png 8 k 0644
 avatar_30.jpg 6 k 0644
 avatar_31.png 8 k 0644
 avatar_33.jpg 1 k 0644
 avatar_35.png 7 k 0644
 avatar_37.png 9 k 0644
 avatar_39.png 7 k 0644
 avatar_50.png 9 k 0644
 avatar_52.png 12 k 0644
 avatar_55.png 8 k 0644
 avatar_60.png 8 k 0644
 avatar_62.png 6 k 0644
 avatar_69.jpg 16 k 0644
 avatar_69.png 5 k 0644
 avatar_75.png 7 k 0644
 avatar_76.png 8 k 0644
 avatar_79.png 8 k 0644
 avatar_83.png 7 k 0644
 avatar_88.png 7 k 0644
 avatar_9.png 8 k 0644
 avatar_92.png 8 k 0644
 index.php 0 k 0755


if you click them in  Cpanel you can see that the files are still there also.


the avatar I tried to upload to the testmember account is showing as

"http://scgarrison.net/smf/index.php?action=dlattach;id=90;type=avatar" when I right-click the "red x" properties but that member is actually ID = 2

as you can see, it DID upload the file correctly- avatar_2 is in the list and is the one I uploaded- but it is not linking correctly (I assume).

unfortunately (or fortunately for member 90) renaming the file avatar_90.png does not get it to show up for the testmember either.



I don't know if I said yet or not, but I CAN manually set the avatars to link to the files already on the server, but ever since I changed the &mysql to mysql in subs.php all of the avatars hosted in the attachments folder turned to red x's in the forum display.  And since we are now on php4.4.1 I can't even switch it back to the original file for testing.  I'm completely at a loss....



thanks again for the ideas!

-cris
Title: Re: PHP 4.4.0 Compatibility
Post by: watchman23 on November 23, 2005, 06:12:18 PM
Hello, i'm a new member here and could really use some help in getting the new PHP installed and SMF 1.0.5.

My website is www.nwowatcher.com . About 3 days ago, the Forums stopped working, but everything else is still running. >:(

We work through the Lunar server, and have been on it for the past 2 years, and with the SMF for the past year. Anyway, long story short, i have been responsible for the billing at Nwowatcher for the past year, and was not the one keeping tabs on the SMF information. The person who installed the SMF has 'gone missing' for the past 4 months, and i recieved no notification that i would have to upgrade the PHP in order for our forums to continue running..

Lunar told me to download the newest version, as well as winzip from www.downloads.com, (which i have done) and i have access to the C-Panel for nwowatcher.com, but have no clue how to get this latest version installed, and finally get our forums working properly again..

Any help would be GREATLY appreciated as soon as possible..

Thanks in advance for any technical assistance that can get this problem taken care of..

Peace
Mike
--------------------------
--------------------------

Here is what comes up for our forums now:

Notice: Only variables should be assigned by reference in /home/nwowat2/public_html/smf/Sources/Subs.php on line 232

Notice: Undefined index: is_admin in /home/nwowat2/public_html/smf/Sources/Security.php on line 556

Notice: Undefined index: permissions in /home/nwowat2/public_html/smf/Sources/Security.php on line 563

Warning: in_array(): Wrong datatype for second argument in /home/nwowat2/public_html/smf/Sources/Security.php on line 563
session_start(): Cannot send session cache limiter - headers already sent (output started at /home/nwowat2/public_html/smf/Sources/Subs.php:232)
Notice: Only variables should be assigned by reference in /home/nwowat2/public_html/smf/Sources/Subs.php on line 232
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 23, 2005, 06:34:31 PM
I am on lunar pages too.  Just uploading the newest subs.php was the fix for us- however as you can see above, for some unknown reason our uploaded avatars no longer display.  I'd be curious to see if yours come back since you are on the same host as us...


-cris
Title: Re: PHP 4.4.0 Compatibility
Post by: watchman23 on November 23, 2005, 06:40:49 PM
Hey Kimncris, Lunar mentioned the same thing to me, but due to my computer illiteracy, i'm not quiet sure how to go about this..

Lunar Said
Quote
One of their quick easy solutions mentioned is to remove the &  (ampersand)
from the following code in  /Sources/Subs.php

= &mysql_query

I have access to the C-panel for the site, but haven't been responsible for the more technical aspects. I've been trying to take care of all the other things needed to keep the site active (such as making the payments..:P )

Any advice on how to upload the newest subs/php ? ::)
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 23, 2005, 09:51:46 PM
the easiest way is to go to cpanel file manager and then go to "your smf direcctory"/sources and edit the subs.php file to remove the above mentioned "&"

but you could also just download the new subs.php in the first post of this thread and upload it to your site on top of the existing one in the folder called sources.

I'd make a backup of the current one before you do either, just in case....


ck
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on November 23, 2005, 11:17:06 PM
@watchman23 open up Subs.php and look for = &mysql_query and replace with = mysql_query.
Title: Re: PHP 4.4.0 Compatibility
Post by: StarWars Fan on November 24, 2005, 06:29:55 AM
the easiest way is to go to cpanel file manager

Would highly recommend not using CPanel's editor for editing SMF files...
Title: Re: PHP 4.4.0 Compatibility
Post by: tuesdae1 on November 24, 2005, 09:03:26 AM
Thank YOU!

Uploading the Subs.php file worked perfectly.
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 24, 2005, 03:26:09 PM
the easiest way is to go to cpanel file manager

Would highly recommend not using CPanel's editor for editing SMF files...

really?  what have you found?  I haven't had a single problem yet and I've edited a TON of my template files.

(which may be the root of the problem with my missing avatars, but like I said they were working until the 4.4.1 upgrade and fix)

-cris
Title: Re: PHP 4.4.0 Compatibility
Post by: StarWars Fan on November 24, 2005, 04:48:37 PM
really?  what have you found?  I haven't had a single problem yet and I've edited a TON of my template files.

I don't remember the details, but, it corrupted files possibly something to do with "&" character... Use search - you'll find it here somewhere... :)
Title: Re: PHP 4.4.0 Compatibility
Post by: redone on November 24, 2005, 05:23:43 PM
The PHP update has nothing to do with your display of avatars. The update is purely to enable your forum to work with upgraded servers running newer versions of PHP.

Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 24, 2005, 05:55:41 PM
I realize that nothing in the update SHOULD have changed anything to do with that,

But the fact is that minutes before Lunarpages updated to 4.4.1 everything was working properly and then after I deleted the single "&" symbol, the board came back without the avatars.

regardless, I'm just going to start a general support thread.  When or IF I figure out WHY I'll report back here....

ck
Title: Re: PHP 4.4.0 Compatibility
Post by: kegobeer on November 24, 2005, 10:00:08 PM
This may be related to the imagejpeg function not working properly when PHP 4.4.1 is running in safe mode.  I posted a reply to a recent topic asking a similar question.  A search for 4.4.1 imagejpeg should return the thread.  It may help you.
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 25, 2005, 04:07:53 AM
i'll give it a shot- thank you!!

-cris

EDIT

I think I found that thread.  I inserted THIS code

Code: [Select]
// Save it!
if (!empty($modSettings['avatar_download_png'])) {
                $fh=fopen($destName,'w');
                fclose($fh);
imagepng($dst_img, $destName);
} else {
                $fh=fopen($destName,'w');
                fclose($fh);
imagejpeg($dst_img, $destName, 65);
        }

into subs.graphics.php but it did nothing-no new errors, but the problem still exists.  Maybe we are not in Safe-mode?  The images actually do save, it's just the linking to them that is screwy or something...

Title: Re: PHP 4.4.0 Compatibility
Post by: onionsack on November 25, 2005, 01:29:21 PM
Hello, i'm a new member here and could really use some help in getting the new PHP installed and SMF 1.0.5.

My website is www.nwowatcher.com . About 3 days ago, the Forums stopped working, but everything else is still running. >:(

We work through the Lunar server, and have been on it for the past 2 years, and with the SMF for the past year. Anyway, long story short, i have been responsible for the billing at Nwowatcher for the past year, and was not the one keeping tabs on the SMF information. The person who installed the SMF has 'gone missing' for the past 4 months, and i recieved no notification that i would have to upgrade the PHP in order for our forums to continue running..

Lunar told me to download the newest version, as well as winzip from www.downloads.com, (which i have done) and i have access to the C-Panel for nwowatcher.com, but have no clue how to get this latest version installed, and finally get our forums working properly again..

Any help would be GREATLY appreciated as soon as possible..

Thanks in advance for any technical assistance that can get this problem taken care of..

Peace
Mike
--------------------------
--------------------------

Here is what comes up for our forums now:

Notice: Only variables should be assigned by reference in /home/nwowat2/public_html/smf/Sources/Subs.php on line 232

Notice: Undefined index: is_admin in /home/nwowat2/public_html/smf/Sources/Security.php on line 556

Notice: Undefined index: permissions in /home/nwowat2/public_html/smf/Sources/Security.php on line 563

Warning: in_array(): Wrong datatype for second argument in /home/nwowat2/public_html/smf/Sources/Security.php on line 563
session_start(): Cannot send session cache limiter - headers already sent (output started at /home/nwowat2/public_html/smf/Sources/Subs.php:232)
Notice: Only variables should be assigned by reference in /home/nwowat2/public_html/smf/Sources/Subs.php on line 232


I had EXACTLY the same problem, and I just wanted to say thanks for the good info already available here for sorting it out.  :)

Here's a recap, with EXPLICIT instructions for folks like me who know squatola about computers:

1. go to http://www.lunarpages.com/
2. log in with your user name and password
3. Click on the link to Control Panel
4. Click on the link to Go to CPanel
5. Click "yes" to proceed if you get a security alert
6. Click on the link to File Manager in your CPanel
7. Click on the folder where your forum is located (you want to find the folder named "forum")
8. Click on the folder labeled "Sources"
9. Scroll down and click on "Subs.php"
10. In the upper right hand of this window, click on Edit File
11. This will give you a window with a LOT of code. Be very careful that you don't change anything here EXCEPT to remove the "&" symbol from this line: = &mysql_query; To find this line of code, do the following:
12. select the entire page of code. Hit ctrl + C (copy the page)
13. open up a new page using Microsoft Word
14. Hit ctrl + V (paste the code onto this page)
15. Now you want to use the "find" function by clicking on the little circle under the scroll bar on the right side of the Word page. Click on that circle, and then in the menu that pops up, click on the binoculars icon.
16. type in "&" in the search field and then click on "Find Next". Keep clicking on "Find Next" until you see = &mysql_query (it took me about a dozen clicks or so before I came to it). Now you know where the offending ampersand is located.
17. Go back to the page of code (step 12), find the = &mysql_query line and remove the "&". Be very careful because there is a space between the "equals" symbol and "mysql_query" text.
18. Go to the bottom of this code page and hit "save"
19. Voila, your forum is now working again.

*steps 12-16 can be skipped if you're able to find the "= &mysql_query" on your own, but I scanned that page three times and couldn't find it. Just too much code to wade through, so to save your eyes you should probably use the search function in Word.

Hope this helps. gl

Title: Re: PHP 4.4.0 Compatibility
Post by: wadster on November 27, 2005, 11:16:38 AM
I hope someone here can help me.  My host has PHP version 4.4.1.  I used fantastico to install SMF 1.0.5.  Whenever I try to load the forum, the page just says, "phpBB : Critical Error Could not connect to the database."  I have tried removing the '&' from subs.php and that did nothing.  I'm just wondering if this is a problem with my host or if I can do something to fix the problem.  Thanks in advance.
Title: Re: PHP 4.4.0 Compatibility
Post by: kegobeer on November 27, 2005, 01:11:34 PM
Why does it say "phpBB : Critical Error Could not connect to the database."  Are you sure you're running SMF?
Title: Re: PHP 4.4.0 Compatibility
Post by: kimncris on November 29, 2005, 01:36:51 PM
so onionsack- I'm guessing your avatars didn't dissapear?  ugh- now I have to start replacing templates.  rats  :(

-cris
Title: Re: PHP 4.4.0 Compatibility
Post by: musicman2059 on November 29, 2005, 05:31:29 PM
I hope someone here can help me.  My host has PHP version 4.4.1.  I used fantastico to install SMF 1.0.5.  Whenever I try to load the forum, the page just says, "phpBB : Critical Error Could not connect to the database."  I have tried removing the '&' from subs.php and that did nothing.  I'm just wondering if this is a problem with my host or if I can do something to fix the problem.  Thanks in advance.

What's the URL to your SMF installation?  I don't recall Fantastico allowing you to do so, but you might have installed SMF over phpBB, but the phpBB index.php still exists.  (As in it wasn't overwritten)

You're best trying to install to an empty directory, then try.
Title: Re: PHP 4.4.0 Compatibility
Post by: That70sHeidi on November 30, 2005, 04:56:37 PM
Thank you thank you thank you. If only everything in life could be fixed by removing a freaking ampersand. My undying gratefulness!!!!!!
Title: Re: PHP 4.4.0 Compatibility
Post by: Puchu on December 01, 2005, 11:50:48 PM
Easier way to do steps with finding...


Find:
= &mysql_query

Replace:
= mysql_query

just use the find and replace...


its not too much easier but it made me happier =P
Title: Re: PHP 4.4.0 Compatibility
Post by: NarrativeKnight on December 30, 2005, 10:21:51 AM
I was going do to the update but when I tried this happened:

Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Subs.php Failure

I chose not to hit the proceed button without further advice.  What does it mean when it says "Failure" on the package manager screen that has the 'Proceed' button on it.


Timothy
Title: Re: PHP 4.4.0 Compatibility
Post by: JayBachatero on December 30, 2005, 12:34:35 PM
It didn't find the string it was looking for so it spitted out a failure notice.  Just do the manual change and remove & from = &mysql_query

-JayBachatero