This topic contains 12 replies, has 0 voices, and was last updated by  cbx550f 10 years, 10 months ago.

  • Author
    Posts
  • #5306

    Thrax
    Participant

    @bobirov wrote:

    @thrax wrote:

    ok, http://advguild.myftp.org:8080/stats/index.php are the one’s i’d
    been working on and have changed every line containing only
    < ?
    to
    < ?php and… http://advguild.myftp.org:8080/stats1/index.php is a set right out
    of the box and with no frames.
    Config.php is correctly loaded with my details and none of
    the < ? have been changed
    to < ?php. I don’t know about you guys.. buy i’ve got these installs of apache and
    php5 correctly set and working as far as i can see.

    it seems to me theres something ing the array reading.. some thing’s are
    being outputted, as is seen in the names, scores etc.. but in other places,
    it’s not.. like series name is just being fuzzed, and printing “name”

    Just < ? ?> should be fine, I’ve never had to put php in there. For
    the record, I am running PHP 4.4.1 on my webhost, maybe this is
    somehow an issue with the stats pages and PHP 5? I wonder what version
    of PHP gav is running.

    I really don’t know what the deal here is, I’m no expert at PHP or
    anything. I’m just an ol’ hack who can look at something thats already
    working and make some changes to it. Thats all I’ve done really aside
    from write the allstats.php page, and that was a massive undertaking for
    someone with my level of knowledge heh.

    I see that the seriesid and other variables are being passed properly to
    the playerstats page (the individual players listed on the index) on the one
    you edited. But they are not being passed to all the other pages (allstats,
    stathistory, weaponstats, etc). The ones contained within an echo
    statement appear to work right, but the ones that are just embedded
    within regular HTML using the aren’t working. Why that is, I
    really have no clue, but thats what I am seeing.

    Perhaps we should bring this discussion out into the public to get some
    more eyes on the situation?

    That may be part of it, maybe php4 decodes some of them
    automatically without being told it’s specifically < ?php coding. it may require me to down-grade my php, or totally rewrite the pages.

    #39820

    cbx550f
    Participant

    I’m not sure what the issue here is, but I’ve always used <?PHP when opening the php code. I believe that is the standard )not certain)

    #39821

    Thrax
    Participant

    @cbx550f wrote:

    I’m not sure what the issue here is, but I’ve always
    used <?PHP when opening the php code. I believe that is the standard )not
    certain)

    I would have assumed so, but it seems there’s some differences in what
    the 2 versions can do..
    apparently, php5 does not assume the entire php-file is coded in php..
    sections not specifically surrounded by the tags are left out of scope.
    And just plopping the tags in willy-nilly ain’t gonna work.

    The current stats pages won’t work right out of the box with php5.
    I’ve prodded it enough to enable as much as i currently understand, and
    will poke it more as i learn.

    #39822

    cbx550f
    Participant

    It all works fine for me – I recently upgraded from php4 to 5.1.4 and it was seemless.
    Running it with Apache, btw.

    I’m thinking there’s likely a setting in your php.ini that needs to be changed? Sorry, no idea what, offhand.

    #39823

    cbx550f
    Participant

    You’re not y2k compliant! GAH!

    #39824

    Thrax
    Participant

    @cbx550f wrote:

    It all works fine for me – I recently upgraded from
    php4 to 5.1.4 and it was seemless.
    Running it with Apache, btw.

    I’m thinking there’s likely a setting in your php.ini that needs to
    be changed? Sorry, no idea what, offhand.

    Sorry.. i diddn’t reply fast enough..

    I was busy re-writing it a bit.
    Yes, there’s a few things slightly diff, but i’ve sorted it out and
    am rebuilding them to work now.

    i’ll have them going again in a little bit.

    #39825

    cbx550f
    Participant

    Thrax,
    I just want to verify that it is the <?php bit that is messing it up.
    If so i can fix that in a few minutes. (I still need to look it up to see what the specification)

    Let me know.

    #39826

    cbx550f
    Participant

    Hey Thrax,
    It just occurred to me that it is likely your webserver configureation that it is causing this. Check to make sure that it is configured to preprocess .php files with php5 rather than php4.
    I don’t know what webserver you’re using but for my version of of Apache, it had to be set up for php5 – I think this is quite different for a generic Windows install than it is for mine (mine is kept trim, for security reasons), but the key line is the following:
    AddType application/x-httpd-php .php

    It seems to me that, like you said, the file isn’t assumed to be php, but it should. 😉

    I still need to check into whether or not <? is technically okay, but with the webserver configured to preprocess .php files with php automatically, it shouldn't matter.

    HTH

    cbx

    #39827

    Thrax
    Participant

    @cbx550f wrote:

    Thrax,
    I just want to verify that it is the <?php bit that is messing it up.
    If so i can fix that in a few minutes. (I still need to look it up to see
    what the specification)

    Let me know.

    Yup.. been past that part a while now. that <?php was only bit
    needed, also had to re-word many lines that used the encasing.
    anything encased such was being written as text, instead of being read as
    code.

    have them almost all re-coded
    http://advguild.myftp.org:8080/stats/index.php

    I do have one major issue to cure tho yet. Some reason, the
    getIntParameter in the config.php isn’t functioning. No arguements
    are being passed from page to page.

    Except for that one linking part, I have almost all the pages redone.

    #39828

    cbx550f
    Participant

    Concurrent posting – see my above post. 😉

    #39829

    Thrax
    Participant

    @cbx550f wrote:

    Concurrent posting – see my above post. 😉

    Above / Below / inside-out.. 😀

    yes, my installation of apache did not include any php of course.. it’s
    not packed with it.
    I completed it with a true install of php5. including in it the support
    for mysql extentions, which were not installed by default in php5.

    the auto-installer in php5 set everything up correctly.
    including adding these lines into my apache’s config file

    PHPIniDir “C:Program FilesApache Software FoundationApache2.2php”
    AddType application/x-httpd-php .php
    LoadModule php5_module “C:Program FilesApache Software FoundationApache2.2phpphp5apache2_2.dll”

    The file’s are marked with the .php extention, but the file’s contents can
    turn on and off the php with the tags thru it, as the source-
    pack of stats pages does.

    beats me why or how, i’ve never even looked into a php file till a few
    day’s ago.. i’m learning as i go. although my c++, HTML, and Java
    coding experience are helpnig me to sort it out.. 😛

    #39830

    cbx550f
    Participant

    Dunno. All I can think of is to make sure that you aren’t loading the php4 module. ❓

    Side note: In php it is intended to process/not process the file through php by opening/closing the tags – makes it easier to include a bunch of html.
    php is pretty easy if you are familiar with any C-like language…. makes it easy to pick up. (And made me smile when I first tried lol)

    #39831

    Thrax
    Participant

    @cbx550f wrote:

    Dunno. All I can think of is to make sure that you aren’t
    loading the php4 module. ❓

    Side note: In php it is intended to process/not process the file through php
    by opening/closing the tags – makes it easier to include a bunch of html.
    php is pretty easy if you are familiar with any C-like language…. makes it
    easy to pick up. (And made me smile when I first tried lol)

    Whoopity-YeeHaw.. All cured!

    All stats pages back up and functioning perfectly.
    Replaced all $HTTP_GET_VARS with $_GET
    and the arg passing everywhere is solved.

    #39832

    cbx550f
    Participant

    Good catch, Thrax.

    I just did a bit of searching, and found this:
    @php.net – Description of core php.ini directives wrote:

    register_long_arrays boolean

    Tells PHP whether or not to register the deprecated long $HTTP_*_VARS type predefined variables. When On (default), long predefined PHP variables like $HTTP_GET_VARS will be defined. If you’re not using them, it’s recommended to turn them off, for performance reasons. Instead, use the superglobal arrays, like $_GET.

    This directive became available in PHP 5.0.0 and was dropped in PHP 6.0.0.

    Using the superglobal arrays should hurt anyone, I don’t think.

    I’ll do a bit of regression testing and then update the cvs.

    Thanks

    cbx

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.