Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 1999
Posts: 17
Newbie
Newbie
Offline
Joined: Jun 1999
Posts: 17
Here is what I have found to be able to run WWWThreads on PHP 3, all the modifications you need to do :

1) In PHP 3, all functions must be declared BEFORE they are called. So, in some files, you need to move the functions at the top of the file. For example, in postlist.php, the show_replies function.

2) In PHP 3, you must have all variables defined into a function since PHP 3 does not support variable number of parameters to a function. The easy fix to that is to add, for example, in the function declaration = "" to variables that might not have any value on the call. For example, in main.inc.php, the send_header function, the $user setting should be $user = ""

3) In PHP 3, the "array_push" function is not available (used in addpost.php and modifypost.php, and maybe others). A workaround for PHP 3 is to replace :
array_push ($words, $line);
by
$words[count($words)] = $line;

4) In various places, arrays statements have a "," after the last value entry - PHP 4 does not mind, but PHP 3 does. Remove the "," after the last entry.

5) All "require" entries for language files produces an error. But this may be only on my host since the "require" adds automatically the first portion of the path which gives a wrong directory for the file at the end --- so with require, I must use relative path. While with "include" I can make absolute path reference. But, it might be a host configured issue. To make it work, I modified all "require" for languages files to "include", and removed the "$config[path]/" at the beginning of the file reference.

That is all I remember that I had to do to make it work with PHP 3... there might be others changes that I did but I do not remember.

Suggestion: Put a blank "index.php" into each language directories. Currently, someone could see the directory listing of all languages directories since it is not protected by a cgi-bin directory.

So, it's possible to be running the snapshot under PHP 3, but you need to modify most of the files in order to do so.


Sponsored Links
Entire Thread
Subject Posted By Posted
If you wish to run the WWWThreads PHP into PHP 3 Fhutow 11/02/2000 4:07 AM
Re: If you wish to run the WWWThreads PHP into PHP 3 The Team 11/02/2000 4:51 AM
Re: If you wish to run the WWWThreads PHP into PHP 3 Eileen 11/02/2000 6:38 AM
Re: If you wish to run the WWWThreads PHP into PHP 3 The Team 11/02/2000 7:06 AM
Re: If you wish to run the WWWThreads PHP into PHP 3 Rick 11/02/2000 7:33 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)