Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Site disabled after PHP upgrade
Old 03-18-2010, 03:13 PM Site disabled after PHP upgrade
Junior Talker

Posts: 2
Trades: 0
Hello, I have a site that I have never had a problem with until I updated from PHP
5.0.4 to PHP 5.3.1, I also updated my mysql to mysqli. Needless to say my site no
longer works.

I am trying to fix this one problem at a time. My first problem is, when I click on
a link the address that is displayed in the address bar changes to the correct page
but nothing happens it remains on my index page.

This is part of the code located at the top of my page:
$baseDir = "http://".$_SERVER['HTTP_HOST'].strrev(substr(strrev($PHP_SELF),
strrpos($PHP_SELF, "/")));

And this is the code for the links:
<a href=\"".$PHP_SELF."?page=welcome\"><IMG SRC=\"images/menu/button1.gif\"
border=0></a>

I have no idea what has gone wrong, do you see a problem with this code?

THANKS in advance for any assistance you can give me
LDWeb is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-18-2010, 04:42 PM Re: Site disabled after PHP upgrade
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
It looks like you were using register globals in 5.0; they are deprecated in 5.3. Change $PHP_SELF to $_SERVER['PHP_SELF'].
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 03-22-2010, 02:16 PM Re: Site disabled after PHP upgrade
Junior Talker

Posts: 2
Trades: 0
Thanks for your response. I have tried that and the links still do not work. This is how my code looks now

NEAR TOP OF PAGE:
$baseDir = "http://".$_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);

print("

CODE FOR LINKS:
<a href=\""$_SERVER['PHP_SELF']."?page=welcome\"><IMG SRC=\"images/menu/button1.gif\" border=0></a>
LDWeb is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Site disabled after PHP upgrade
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11460 seconds with 12 queries