d22552000
-
Posts
535 -
Joined
-
Last visited
Never
Posts posted by d22552000
-
-
why would I put session start on the second page?
-
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.
-
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?
-
again its complete code made not by me
and it happens to have worked back before I used hpp 5 and mysql 5 nad apache.
lol it workeed back on php4 mysql4 and abyssws.. ANyways, machine gone.
-
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 -,-.
-
ya, i can. I am ust ActiveASP as a substitute. It sitll works fine though.
-
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?
-
Pretty simple question, what is the syntax for:
header();
Output the URI:
(HTTP) 403 Unatauthorized
-
cmon ppl I have about 10 minutes before I throw out this server machine and get a new one, could you atleast tell me what the hell is happening?
-
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?
-
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.
-
h.. then why not set the script to call on vb's mail script just include "includes/mail.php" and call mail().
-
if you are under windows you ahve to use smpt. does your host have a proper smpt?
and if you are under linux make sure the mail funciton works properly,
-
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.
-
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.
-
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);
-
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.
-
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?
-
do date \3600 *-6
-
uh... preg_replace(' ','-'); Im not sure if that is exact, but you get the point.
-
oh cmon, please help me? The longer people can't upload by URL the mroe angry emails I get in my already full inbox.
NON SOLICITED LINK: (To see the error) http://24.86.150.207/downloads/index.php (I have temporarily allowed url uploading to guests)
-
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.
-
ya that would work, you mind sharing your source? I am interested in your upload script as it is. I have not been able to make an upload script that actually could read teh file -,-.
-
Do you think the above trouble is really worth it? Besides CRONTABS what does linux have that is so good?
The way I see chmodding, its just an extra step in installing anything and is a big security whole. As far ase what im running. What is the best linux to run lamp!?
Please help me out !
[SOLVED] uh,... Sessions, I suck at them
in PHP Coding Help
Posted
the funny part is this is all one page... but ok
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
Why would I not put session_start at the top of the page?