Advertisement:

Author Topic: PHP 4.4.0 Compatibility  (Read 177005 times)

Offline tuesdae1

  • Newbie
  • *
  • Posts: 1
Re: PHP 4.4.0 Compatibility
« Reply #160 on: November 24, 2005, 09:03:26 AM »
Thank YOU!

Uploading the Subs.php file worked perfectly.

Offline kimncris

  • Semi-Newbie
  • *
  • Posts: 61
Re: PHP 4.4.0 Compatibility
« Reply #161 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

Offline StarWars Fan

  • Jr. Member
  • **
  • Posts: 157
  • Gender: Male
Re: PHP 4.4.0 Compatibility
« Reply #162 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... :)

Offline redone

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,938
  • Gender: Male
Re: PHP 4.4.0 Compatibility
« Reply #163 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.


Offline kimncris

  • Semi-Newbie
  • *
  • Posts: 61
Re: PHP 4.4.0 Compatibility
« Reply #164 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

Offline kegobeer

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,994
  • Gender: Male
  • I am ninja!
    • The Kazebeer Family Website
Re: PHP 4.4.0 Compatibility
« Reply #165 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.
"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")

Offline kimncris

  • Semi-Newbie
  • *
  • Posts: 61
Re: PHP 4.4.0 Compatibility
« Reply #166 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...

« Last Edit: November 25, 2005, 12:46:27 PM by kimncris »

Offline onionsack

  • Newbie
  • *
  • Posts: 1
Re: PHP 4.4.0 Compatibility
« Reply #167 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 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 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 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


Offline wadster

  • Newbie
  • *
  • Posts: 9
Re: PHP 4.4.0 Compatibility
« Reply #168 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.

Offline kegobeer

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,994
  • Gender: Male
  • I am ninja!
    • The Kazebeer Family Website
Re: PHP 4.4.0 Compatibility
« Reply #169 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?
"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")

Offline kimncris

  • Semi-Newbie
  • *
  • Posts: 61
Re: PHP 4.4.0 Compatibility
« Reply #170 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

Offline musicman2059

  • Semi-Newbie
  • *
  • Posts: 45
  • Gender: Male
  • Weeeee!
    • The Ancient Cave
Re: PHP 4.4.0 Compatibility
« Reply #171 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.

Offline That70sHeidi

  • Newbie
  • *
  • Posts: 3
Re: PHP 4.4.0 Compatibility
« Reply #172 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!!!!!!

Offline Puchu

  • Semi-Newbie
  • *
  • Posts: 36
Re: PHP 4.4.0 Compatibility
« Reply #173 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

Offline NarrativeKnight

  • Semi-Newbie
  • *
  • Posts: 14
  • Gender: Male
Re: PHP 4.4.0 Compatibility
« Reply #174 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

Offline JayBachatero

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,562
  • Gender: Male
    • @jaycreations on Twitter
    • JayBachatero.com
Re: PHP 4.4.0 Compatibility
« Reply #175 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
Follow me on Twitter

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