PHP 4.4.0 Compatibility

Started by Ben_S, July 13, 2005, 07:50:22 AM

Previous topic - Next topic

tuesdae1

Thank YOU!

Uploading the Subs.php file worked perfectly.

kimncris

Quote from: Molly Dolly on November 24, 2005, 06:29:55 AM
Quote from: kimncris on November 23, 2005, 09:51:46 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

StarWars Fan

Quote from: kimncris on November 24, 2005, 03:26:09 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... :)

redone

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.


kimncris

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

kegobeer

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.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

kimncris

#166
i'll give it a shot- thank you!!

-cris

EDIT

I think I found that thread.  I inserted THIS code

// 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...


onionsack

Quote from: 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 hxxp:www.nwowatcher.com [nonactive] . 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 hxxp:www.downloads.com [nonactive], (which i have done) and i have access to the C-Panel for hxxp:nwowatcher.com [nonactive], 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 hxxp:www.lunarpages.com/ [nonactive]
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


wadster

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.

kegobeer

Why does it say "phpBB : Critical Error Could not connect to the database."  Are you sure you're running SMF?
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

kimncris

so onionsack- I'm guessing your avatars didn't dissapear?  ugh- now I have to start replacing templates.  rats  :(

-cris

musicman2059

Quote from: 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.

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.

That70sHeidi

Thank you thank you thank you. If only everything in life could be fixed by removing a freaking ampersand. My undying gratefulness!!!!!!

Puchu

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

NarrativeKnight

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

JayBachatero

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
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: