Forum Moderators: coopster
For example. index.php has data on the page. index.php?page=2 has different data. The page variable has been declared in index.php. However, since the upgrade, index.php shows the same data regardless whether page is defined or not. I have tried toggling Register Globals on and off and no effect.
This is how page is declared: $page = $_GET['page'];
I have two websites depending on this variable passing. Any suggestions?
I did the echo command and it shows the variable. There does not seem to be any error, it's just nothing is happening.
When you click on next, the page data does not change even though it says index.php?page=2.
This exact same code worked in the earlier version of PHP, which was 4.1.2. We upgraded to 4.3.4. This script is designed to work with 4.3.2 and above.
The program is Maian Weblog. Under normal circumstances this script works just fine. But since the upgrade the page variable will not work.
If you look at index.php on line 211, the page variable is declared as $page = $_GET['page'];
I have tried turning register globals off and on in the php.ini and no effect.
I am completely stumped as to why this happened. I heard about a bug in PHP 4.2.3 that required certain conditions like session.bug42 or something of that nature. I don't know if it would be relevant but my clients' websites won't work until this problem is solved.
On another note, before the upgrade, we also installed the BlueDragon server for coldfusion. I am not sure if it could be linked to the problem. Any thoughts? Thanks!
[edited by: jatar_k at 4:42 pm (utc) on Mar. 28, 2004]
[edit reason] no personal urls thanks [/edit]
Glad you made it to the forum. I`m just wondering if its because I declared the $_GET variable too late in the index.php file. Try moving:
$page = $_GET['page'];
to before line 97 in the index.php file.
Also, don`t know if it will make any difference, but on line 97 change:
if (!isset($page))
to
if (!empty($page))
David.
But, I reverted empty back to isset with page still declared at 97 and it WORKED! Well done!
There is just one more thing though, I hope you still support v1.1 of your weblog.
The demo site you saw is live. and it has another section that depends on your v1.1 weblog which is having the same problem right now. And I cannot find the page declared variable in that index.php.
Go here to see: <snip>
There is 20 pages of news, and it won't go past page 1. The same problem as before. I have several projects going right now so unfortunately I don't have time to upgrade it to v1.2.
Any suggestions on that?
[edited by: jatar_k at 1:13 am (utc) on Mar. 29, 2004]
[edit reason] no personal urls thanks [/edit]
The howtos' that I read seemed a little complicated. Which is the easy way to Install PHP on redhat? RPM? Straight compile, apt-get?
I saw that 4.3.5 is out. And maybe that could fix this problem?