Jump to content

d22552000

Members
  • Posts

    535
  • Joined

  • Last visited

    Never

Posts posted by d22552000

  1. the funny part is this is all one page... but ok :D

     

          if (isset($_SESSION['$id']) && ($_SESSION['$id'] == $pw)) {

     

    would that be a better session checker?

     

    and I changed my set code to:

     

          session_start();

          $_SESSION['$id'] = $p

     

    I might as well put session_start(); at the top of hte page since the whole page is a restartcted area and it has its own login system, all in one php ifle :D

     

    Why would I not put session_start at the top of the page?

  2. LOL, not really.

     

    the same way you would time a page loading, call a php script from php.

     

    <?PHP
    
    (start timer here)
    require(samp.php);
    (end timer here)
    
    ?>
    

     

    <?PHP
    ?>
    

     

    Now if your server doenst ignore the file altogether, this should give you the time it takes to parse and load an entire php file.  (engine times).  just devide by two and u have shutodnw and startup I guess... otherwise you can't.

     

    lol, rememerb to use a 14 digit floating point number, or you might get 0 as the time.

  3. ok so my first time ever trying to use sessions...  and I suck at it.

     

    Normally I simply don't use sessions altogether.  So bear with me.

     

     

          session_start();
          session_register($id);
          header("location: index.php?id=".$id."&pw=".$pw."&s=2");
    

     

    This happens to set the session IF you get your password right.

    Do I need to pass a sid or semething to the page for it to get it?

     

    I have set the script to generate a 403 error if the session is either invalid or not set.  I goto the page and I get a 403.  How do I set sessions then?

     

          if (isset($_SESSION['$id'])) {
    

     

    That is what checks for the session.. am I doing this all wrong?

  4. wouldnt a gd image be problematic or slow loading if it was refreshing second wise?  also my apache doenst seem to like gd2 module.  when I enable it vbulletin still cant output gd2 images, so I had to use imagmagic and I dont even know how to work it -,-.

  5. Yes your right I would like to know why it happened, but tback then I tried to do the script with echo "<hr>"; just to test output, and it still iddnt understand that < was in a script... my php engine didnt understand itself being called;...WTF?

  6. Uh, I am installing ZPANEL on my site to have a panel for my users to use.

     

    Problems:  I installed it, it worked fine.  When I tried to update packages DURING installation I got "Duh, I don't think so." (what the |=*** kind of message is that?)

     

    After installing I updated my packages but it wont accept where my zpanel is installed, it keeps thinking I use IIS and defaults to inetpub/wwwroot/  I changed this in the admin panel and it didnt stay.

     

    I treid to edi tthe demo user and god "Unexpected $end in users.php" WTF!?

     

    Now when I tried to login I get these errors:

     

    
    Warning: include(languages/) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\zpanel\database\db.php on line 99
    
    Warning: include() [function.include]: Failed opening 'languages/' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\zpanel\database\db.php on line 99
    
    Warning: include(templates//template.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\zpanel\zpanel.php on line 40
    
    Warning: include() [function.include]: Failed opening 'templates//template.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\zpanel\zpanel.php on line 40
    
    Warning: No such directory "C:\PHP"
    
    Warning: No such directory "C:\wamp\www"
    

     

    Is my webserver just falling apart all around me or something?

  7. this was an old erro rhwne I originally tried to run apache and php as a module..

     

    I got htis and I laughed.

     

    Unexpected < on line 1
    

    when I ran:

    <?PHP
    ?>
    

     

    but that was back on apache1 and php4...  I fixed it (idk how) but that made me laugh hard.

  8. alright imma try that, cause I think my connection is interrupting vb's connection.  Since I don't know to much of VB I can't just use its connection -,-.  Trying code now...

     

    $link = mysql_connect("localhost", "root", "") or die(mysql_error());
    mysql_select_db("forum",$link) or die(mysql_error());
    
    $do = "INSERT INTO `post` (`postid`, `threadid`, `parentid`,  `username`, `userid`, `title`, `dateline`, `pagetext`,
    `allowsmilie`, `showsignature`, `ipaddress`, `iconid`, `visible`, `attach`, `infraction`, `reportthreadid`) 
    VALUES (postid, ".$threadinfo.", 0, 'Staff Reviewer', 1337, '', now(), 'Thank You for submitting your application.\n\n
    It will be reviewed by a staff member As soon as possible, please be patient. ', 0, 0, '1.3.3.7', 4, 1, 0, 0, 0)";
    mysql_query($do,$link);
    

     

    same thing.

  9. I would try this but because VB auto redirects the page I cannot do any debuggingm unless I write all output to a file. It will not show up on screen.

    here is what vb does:

     

    You fill in info for post at newthread.php

    you submit data to newthread.php

    newthread.php mulls over the data

    you INSTANTLY get redirected to showthread.php regardless if newthread.php is done or not.

     

    so I cannot debug it in this way *cry*. I have run the sql through a seperate php document and got no errors so I think my code is somehow stopping cause of how VB is setup..

     

    Is there a way to NAME my handle to mysql_connect ?

     

    if it wasnt for VB copyright I would paste more of newthread.php.

  10. oh,. LOL i didnt even noticed I did that! ill run the code again and see what happens:

     

     

    it redirects to the new thread so its nto breaking the funciton anymroe, but still no new auto post.

     

    mysql_connect("localhost", "root", "") or die(mysql_error());
    mysql_select_db("forum") or die(mysql_error());
    
    $do = "INSERT INTO `post` (`postid`, `threadid`, `parentid`,  `username`, `userid`, `title`, `dateline`, `pagetext`,
    `allowsmilie`, `showsignature`, `ipaddress`, `iconid`, `visible`, `attach`, `infraction`, `reportthreadid`) 
    VALUES (postid, ".$threadinfo.", 0, 'Staff Reviewer', 1337, '', now(), 'Thank You for submitting your application.\n\n
    It will be reviewed by a staff member As soon as possible, please be patient. ', 0, 0, '1.3.3.7', 4, 1, 0, 0, 0)";
    mysql_query($do);
    

  11. I am trying to make something to post a response to the user's new thread automatically.

     

    mysql_connect("localhost", "root", "") or die(mysql_error());
    mysql_select_db("forum") or die(mysql_error());
    
    $do = "INSERT INTO `post` (`postid`, `threadid`, `parentid`,  `username`, `userid`, `title`, `dateline`, `pagetext`,
    `allowsmilie`, `showsignature`, `ipaddress`, `iconid`, `visible`, `attach`, `infraction`, `reportthreadid`) 
    VALUES (postid, ".$threadinfo.", 0, 'Staff Reviewer', 1337, '', now(), 'Thank You for submitting your application.\n\n
    It will be reviewed by a staff member As soon as possible, please be patient. ', 0, 0, '1.3.3.7', 4, 1, 0, 0, 0)";
    $mysql_query($do);
    $mysql_close();
    

     

    I am not sure, but shouldnt that work? I have it set to execute this code AFTER the original post has been posted. When I got to make a new post, I get a blank white page with no redirects. The thread is made but the auto post is NOT posted.

     

    I have ran my code though phpmyadmin and it was sucessful.

  12. What is the easiest way to show a table with two fields, the first ebing the percentage of progress adnt eh second being there to show blank.

     

    I thought I could do:

     

     

    <table bgcolor="black" width="50%" id="prg">

    <tr>

    <td bgcolor="green" width="prgprct"></td>

    <td>&</td>

    </tr>

     

     

    I know that bgcolor isnt the right command and my ID is wrong but you get the point.  I have AJAX feeding the script the value but is there an easier way of showing the graph?

  13. I get this error when trying to download a file from a URL using a script form PHPatm.

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 67107842 bytes) in *\index.php on line 1647
    

     

    My php.ini settings are below:

    ;;;;;;;;;;;;;;;;;;;
    ; Resource Limits ;
    ;;;;;;;;;;;;;;;;;;;
    
    max_execution_time = 60     ; Maximum execution time of each script, in seconds
    max_input_time = 120	; Maximum amount of time each script may spend parsing request data
    memory_limit = 128M      ; Maximum amount of memory a script may consume (8MB)
    
    ;;;;;;;;;;;;;;;;;;;;;;;;
    
    ; Maximum size of POST data that PHP will accept.
    post_max_size = 64M
    

     

    I am not sure if there is a maximum memory size for sockets or something.. Please help me out here.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.