Re: [PHP] Weird issue with PHP5
On Thu, Jul 24, 2008 at 12:07 AM, Nathan Nobbe <[EMAIL PROTECTED]>wrote: > On Wed, Jul 23, 2008 at 11:43 PM, <[EMAIL PROTECTED]> wrote: > >> >> > >> > thats a decent bit of code to pick through, jeff. glancing at >> index.txt, >> > the code looks pretty straight forward, and by that i mean that it >> doesnt >> > look like theres anything that shouldnt work in php5. >> > >> > if i were to guess, i would suspect an environmental issue. you should >> > ensure that all the extensions you had in php4 are there in php5. you >> can >> > do this by writing a simple script, phpinfo.php >> > >> > > > die(phpinfo()); >> > >> > you should run this in both the php4, and php5 environments and make >> sure >> > things look essentially identical. as well, there are a few things that >> > changed in php5, here is a helpful reference from the manual that will >> > give >> > you things to look out for, >> > >> > http://www.php.net/manual/en/faq.migration5.php >> > >> > another thing i would recommend to weed out any environmental issues is >> to >> > configure error_reporting to show everything. so (depending on your >> > version >> > of php5) if youre using the latest version, your php.ini file should >> have >> > something like this >> > >> > display_errors = On >> > error_reporting = E_ALL >> > >> > on older versions of php5, you would have to tweak the error reporting >> to >> > also display E_STRICT errors, i doubt thats your problem, but i thought >> to >> > mention it. >> > >> > something else that might be helpful would be setting up a debugger, >> such >> > as >> > xdebug + protoeditor. i can help you through the configuration if you >> > want. this will allow you to set breakpoints and step through the code, >> > line-by-line if you wish, which could also help you isolate the problem >> > more >> > quickly. >> > >> > -nathan >> > >> >> Hi Nathan, >> it sure is a lot of code to work through. Its been driving me insane for >> the last couple of days. >> phpinfo on the same server when switching from php4 to php5 shows only a >> few differences. >> There is one different module in each version: >> PHP Version 4.4.8_pre20070816-pl0-gentoo >> - sapi_apache2 >> PHP Version 5.2.6RC4-pl0-gentoo >> - mod_php5 >> > > gentoo, hell yea bro, youre in good company! > > I've saved the phpinfo pages. >> http://nukeleaguedf.winsto.net/phpinfo/phpinfov4.htm >> http://nukeleaguedf.winsto.net/phpinfo/phpinfov5.htm > > > meh, as long as you stuck w/ the same use flags there likely arent any > extensions youre missing, but maybe.. > > I'm currently installing xdebug, but I don't see protoeditor in my Linux >> distro. Is it available for download? > > > its not even in portage atm, youll have to build from source, but i can > prolly help out there. heres the download page: > > http://sourceforge.net/project/showfiles.php?group_id=129439 > > ill hit you back in a few w/ the configure options i used to build it. > btw, im using kde, if you dont have that, youll likely have to pull down > kdebase as protoeditor is built atop the kate libs (which use kde of > course). > > >> >> Configuration help would be great, thank you. > > > it might be a little rough w/o getting a look at ur source, but we can > probly figure it out. are you running apache locally, or on a separate > box? if its on another box, youll have to install xdebug on that system. > as well, youll have to have php setup on your local box, and a copy of the > source of course. i recommend setting up apache locally for this if you > can, cause it makes things a lot easier, but either way we can noc it out ;) > > -nathan > > btw. > the protoeditor homepage is like mad borked, ill fire off a mail to thiago. > > > ok, so heres the process to install protoeditor. 1. unpack the source, cd into the unpacked directory. 2. ./configure --prefix=/usr/kde/3.5/ --without-arts --enable-debug=full 3. make && make install you can also pass the --enable-kate-plugin option to configure, if you want to build it as a plugin for kate, which is pretty nice. but i always found it easier to build as a standalone app, just to get the hang of it at first, then come back and build it into kate. on the xdebug side (and this will be gentoo-centric, since thats what youre running) 1. edit /etc/php/apache2-php5/ext/xdebug.ini enable the following lines xdebug.remote_enable="1" xdebug.remote_handler="dbgp" * xdebug.remote_host="10.0.1.6" xdebug.remote_mode="req" xdebug.remote_mode="hit" xdebug.remote_port="9000" xdebug.remote_autostart="1" you see ive put a star by xdebug.remote_host, youll need to set that to the host of your client box, and if its the same one running apache, it would be 127.0.0.1 (obviously :D). anyway, if apache is on a different box, that system will need to be able to send requests to your development system on port 9000, unless you change xdebug.remote_port, but either way, the server needs to have access to the client system. 2. smylink the extension into ext-activ
Re: [PHP] Weird issue with PHP5
On Wed, Jul 23, 2008 at 11:43 PM, <[EMAIL PROTECTED]> wrote: > > > > > thats a decent bit of code to pick through, jeff. glancing at index.txt, > > the code looks pretty straight forward, and by that i mean that it doesnt > > look like theres anything that shouldnt work in php5. > > > > if i were to guess, i would suspect an environmental issue. you should > > ensure that all the extensions you had in php4 are there in php5. you > can > > do this by writing a simple script, phpinfo.php > > > > > die(phpinfo()); > > > > you should run this in both the php4, and php5 environments and make sure > > things look essentially identical. as well, there are a few things that > > changed in php5, here is a helpful reference from the manual that will > > give > > you things to look out for, > > > > http://www.php.net/manual/en/faq.migration5.php > > > > another thing i would recommend to weed out any environmental issues is > to > > configure error_reporting to show everything. so (depending on your > > version > > of php5) if youre using the latest version, your php.ini file should have > > something like this > > > > display_errors = On > > error_reporting = E_ALL > > > > on older versions of php5, you would have to tweak the error reporting to > > also display E_STRICT errors, i doubt thats your problem, but i thought > to > > mention it. > > > > something else that might be helpful would be setting up a debugger, such > > as > > xdebug + protoeditor. i can help you through the configuration if you > > want. this will allow you to set breakpoints and step through the code, > > line-by-line if you wish, which could also help you isolate the problem > > more > > quickly. > > > > -nathan > > > > Hi Nathan, > it sure is a lot of code to work through. Its been driving me insane for > the last couple of days. > phpinfo on the same server when switching from php4 to php5 shows only a > few differences. > There is one different module in each version: > PHP Version 4.4.8_pre20070816-pl0-gentoo > - sapi_apache2 > PHP Version 5.2.6RC4-pl0-gentoo > - mod_php5 > gentoo, hell yea bro, youre in good company! I've saved the phpinfo pages. > http://nukeleaguedf.winsto.net/phpinfo/phpinfov4.htm > http://nukeleaguedf.winsto.net/phpinfo/phpinfov5.htm meh, as long as you stuck w/ the same use flags there likely arent any extensions youre missing, but maybe.. I'm currently installing xdebug, but I don't see protoeditor in my Linux > distro. Is it available for download? its not even in portage atm, youll have to build from source, but i can prolly help out there. heres the download page: http://sourceforge.net/project/showfiles.php?group_id=129439 ill hit you back in a few w/ the configure options i used to build it. btw, im using kde, if you dont have that, youll likely have to pull down kdebase as protoeditor is built atop the kate libs (which use kde of course). > > Configuration help would be great, thank you. it might be a little rough w/o getting a look at ur source, but we can probly figure it out. are you running apache locally, or on a separate box? if its on another box, youll have to install xdebug on that system. as well, youll have to have php setup on your local box, and a copy of the source of course. i recommend setting up apache locally for this if you can, cause it makes things a lot easier, but either way we can noc it out ;) -nathan btw. the protoeditor homepage is like mad borked, ill fire off a mail to thiago.
Re: [PHP] Weird issue with PHP5
> > thats a decent bit of code to pick through, jeff. glancing at index.txt, > the code looks pretty straight forward, and by that i mean that it doesnt > look like theres anything that shouldnt work in php5. > > if i were to guess, i would suspect an environmental issue. you should > ensure that all the extensions you had in php4 are there in php5. you can > do this by writing a simple script, phpinfo.php > > die(phpinfo()); > > you should run this in both the php4, and php5 environments and make sure > things look essentially identical. as well, there are a few things that > changed in php5, here is a helpful reference from the manual that will > give > you things to look out for, > > http://www.php.net/manual/en/faq.migration5.php > > another thing i would recommend to weed out any environmental issues is to > configure error_reporting to show everything. so (depending on your > version > of php5) if youre using the latest version, your php.ini file should have > something like this > > display_errors = On > error_reporting = E_ALL > > on older versions of php5, you would have to tweak the error reporting to > also display E_STRICT errors, i doubt thats your problem, but i thought to > mention it. > > something else that might be helpful would be setting up a debugger, such > as > xdebug + protoeditor. i can help you through the configuration if you > want. this will allow you to set breakpoints and step through the code, > line-by-line if you wish, which could also help you isolate the problem > more > quickly. > > -nathan > Hi Nathan, it sure is a lot of code to work through. Its been driving me insane for the last couple of days. phpinfo on the same server when switching from php4 to php5 shows only a few differences. There is one different module in each version: PHP Version 4.4.8_pre20070816-pl0-gentoo - sapi_apache2 PHP Version 5.2.6RC4-pl0-gentoo - mod_php5 I've saved the phpinfo pages. http://nukeleaguedf.winsto.net/phpinfo/phpinfov4.htm http://nukeleaguedf.winsto.net/phpinfo/phpinfov5.htm I'm currently installing xdebug, but I don't see protoeditor in my Linux distro. Is it available for download? Configuration help would be great, thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Weird issue with PHP5
On Wed, Jul 23, 2008 at 10:45 PM, <[EMAIL PROTECTED]> wrote: > > I have a module originally written for PHP-Nuke that I have ported to > CPG-Nuke/DragonFlyCMS. > > In PHP4, the page I'm displaying works fine. > In PHP5, it doesn't. > > The following link is a screenshot of the page using PHP4: > http://nukeleaguedf.winsto.net/working-php4.jpg > > And a screenshot from PHP5: > http://nukeleaguedf.winsto.net/broken-php5.jpg > > You can see that the stat lines for the first group (Batters) displays > properly. However, the stat lines for the following groups do not. > > I have copied the three offending files into text files: > http://nukeleaguedf.winsto.net/modules/League/index.txt > http://nukeleaguedf.winsto.net/modules/League/util.txt > http://nukeleaguedf.winsto.net/modules/League/classes.txt > > Line 1119 of index.txt is where is all begins. > I have tested that the while loop is actually looping 3 times as it should > (once for each group). > Doing a var_dump of $players shows all of the required information. > > Line 1126 is the actual line that displays the fields. > > I have scoured the code with my limited PHP knowledge, but I can't for the > life of me see why its not working in PHP5. > Perhaps part of the code is incompatible with PHP5, or perhaps its a bug > in PHP5. > Is anyone able to help? thats a decent bit of code to pick through, jeff. glancing at index.txt, the code looks pretty straight forward, and by that i mean that it doesnt look like theres anything that shouldnt work in php5. if i were to guess, i would suspect an environmental issue. you should ensure that all the extensions you had in php4 are there in php5. you can do this by writing a simple script, phpinfo.php http://www.php.net/manual/en/faq.migration5.php another thing i would recommend to weed out any environmental issues is to configure error_reporting to show everything. so (depending on your version of php5) if youre using the latest version, your php.ini file should have something like this display_errors = On error_reporting = E_ALL on older versions of php5, you would have to tweak the error reporting to also display E_STRICT errors, i doubt thats your problem, but i thought to mention it. something else that might be helpful would be setting up a debugger, such as xdebug + protoeditor. i can help you through the configuration if you want. this will allow you to set breakpoints and step through the code, line-by-line if you wish, which could also help you isolate the problem more quickly. -nathan