Old and new php do not play nice together..

Discuss all aspects of programming here.

Moderator: The Mod Squad

Old and new php do not play nice together..

Postby Toby B. » Wed Aug 03, 2011 8:04 am

I am finding out that my code that works well with the 5.2.x branch of PHP does NOT work the same with the 5.3.x branch. Happy Happy Joy Joy!!

Basically I have a my PC setup as a Local Webserver so I can test things out without blowing up my live site as much. Now I have to find a middle ground where things work on both since the live server will be updated at some point in the future.

The really annoying part is it's only a few bits of code and I am at this point completely lost on what to fix and how... I can see hours of banging my head against the desk in my future :(
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14153
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby evasive » Wed Aug 03, 2011 7:39 pm

http://php.net/releases/5_3_0.php for an idea, i'm pretty sure all changes are in there in detail and they give pointers on what to adjust in your code.
We hate rut, but we fear change.
********************************
System error, strike any user to continue...
evasive
Mobo-fu Master
Mobo-fu Master
 
Posts: 36849
Joined: Sun May 06, 2001 12:01 am
Location: Netherlands

Postby Toby B. » Thu Aug 04, 2011 5:17 am

don't see anything related to variables.

Notice: Undefined variable: part_numbers in C:\www\common\board.tpl on line 173

Notice: Undefined variable: part_numbers in C:\www\common\board.tpl on line 175
Unknown


Code: Select all
   
172 <td colspan="2">
173   <p><?php if ($part_numbers == true) {
174      echo ($part_numbers);
175 } else if ($part_numbers == false) {
176   echo "Unknown";}?></p></td>


several of the blocks have the _ in the variables but there are a couple that don't that act the same way on the test server. I have tried renaming the variables but even renames don't help if the variable = false.

Code: Select all
       <p align="left"><b>Notes:</b><br>         <?php if ($Update == true) {
      echo ($Update);
} else if ($Update == false) {
   echo 'The bios program has been altered to a Compaq specific version. It is not recommended to flash back to the original. If anyone does this successfully please notify us by <a href="mailto:webmaster@ctechinfo.net">email</a>.';}?></p>


Notice: Undefined variable: Update in C:\www\common\board.tpl on line 248

Notice: Undefined variable: Update in C:\www\common\board.tpl on line 250
The bios program has been altered to a Compaq specific version. It is not recommended to flash back to the original. If anyone does this successfully please notify us by email.


The above is whats going on with the test server. the live server has no issues with the broken code.
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14153
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby Toby B. » Thu Aug 04, 2011 10:53 am

oddly enough I searched for what is usually related to databases (null/not_null)..

result = success on both test server and live server... :)
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14153
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

do NOT use 5.3.7!

Postby evasive » Mon Aug 22, 2011 11:25 pm

We hate rut, but we fear change.
********************************
System error, strike any user to continue...
evasive
Mobo-fu Master
Mobo-fu Master
 
Posts: 36849
Joined: Sun May 06, 2001 12:01 am
Location: Netherlands

Postby Toby B. » Tue Aug 23, 2011 7:25 am

Not quite sure how that fits in evasive...

Code: Select all
   <td colspan="2">
   <p><?php if (isset($processors)) {
      echo ($processors);
} else {
   echo "Unknown";}?></p>   
   </td>
   </tr>


is how I changed the code so it work on both the old php and new..
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14153
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby evasive » Tue Aug 23, 2011 7:52 am

Just that you are running 5.3.x somewhere and should wait with upgrading.
We hate rut, but we fear change.
********************************
System error, strike any user to continue...
evasive
Mobo-fu Master
Mobo-fu Master
 
Posts: 36849
Joined: Sun May 06, 2001 12:01 am
Location: Netherlands

Postby Toby B. » Fri Aug 26, 2011 5:25 am

evasive wrote:Just that you are running 5.3.x somewhere and should wait with upgrading.
Its on my own system not accessible from outside my network.. :P
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14153
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests