The Mother Board
Old and new php do not play nice together..

 
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Wed Aug 03, 2011 8:04 am    Post subject: Old and new php do not play nice together.. Reply with quote

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 crying
_________________
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Back to top
View user's profile Send private message Send e-mail Visit poster's website
evasive
Mobo-fu Master
Mobo-fu Master


Joined: 06 May 2001
Posts: 36699
Location: Netherlands, Breda

PostPosted: Wed Aug 03, 2011 7:39 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Thu Aug 04, 2011 5:17 am    Post subject: Reply with quote

don't see anything related to variables.

Quote:

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:
   
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:

       <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>


Quote:

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Thu Aug 04, 2011 10:53 am    Post subject: Reply with quote

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

result = success on both test server and live server... lachen
_________________
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Back to top
View user's profile Send private message Send e-mail Visit poster's website
evasive
Mobo-fu Master
Mobo-fu Master


Joined: 06 May 2001
Posts: 36699
Location: Netherlands, Breda

PostPosted: Mon Aug 22, 2011 11:25 pm    Post subject: do NOT use 5.3.7! Reply with quote

https://bugs.php.net/bug.php?id=55439

careful now!
_________________
We hate rut, but we fear change.



System error, strike any user to continue...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Tue Aug 23, 2011 7:25 am    Post subject: Reply with quote

Not quite sure how that fits in evasive...

Code:
   <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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
evasive
Mobo-fu Master
Mobo-fu Master


Joined: 06 May 2001
Posts: 36699
Location: Netherlands, Breda

PostPosted: Tue Aug 23, 2011 7:52 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master


Joined: 16 Dec 2001
Posts: 14081
Location: Maine

PostPosted: Fri Aug 26, 2011 5:25 am    Post subject: Reply with quote

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.. razz
_________________
Compaq-Fu Master
Other sites:
Hydrocephalus-Talk
DSL/Cable Webserver
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    The Mother Board Forum Index -> Programming All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group