-
Posts
15,071 -
Joined
-
Last visited
-
Days Won
414
Posts posted by requinix
-
-
What's in your index.php?I tried this and when loading the file, the result is a blank page.
Not happening for me.Here is the link to my index.php page - Notice the behavior when it jumps to index.html:
-
Make sure you put the file in the right place and that Apache can read it. Also make sure you've installed any dependencies there may be.
-
You can still use those lines but you can't put them in the .htaccess. Try the virtualhost config instead; if you have multiple sites and more than one needs it, in the global config.
-
With the same mechanism you used to put the make into the table: echo it.
">
Which is a guess, since the code you've posted doesn't quite match up with the description you gave. -
You could just alter the execution time: figure out how long a single image should take and multiply that by the number of images (then add a bit more just in case), change the time limit accordingly, and do your work.
Processing multiple images at once will be a bit faster than each one individually, though I wouldn't expect there to be that huge of a difference.
-
Have you looked at the server error logs yet?
-
Well, you know how to get the make, and you know how to put things into URLs, so... do that. The next page uses $_GET to get the make and runs a query with it.
How about giving that a shot? If you have problems, post your code and explain what's going wrong.
-
Why not just change the form to use method=get?
-
Windows-1252 does not have those characters. Whatever you may be doing with conversions, going to or from Windows-1252 will not work.
-
That's not (supposed to be) a problem that you simply find-and-replace your way around. It's being inserted by something, odds are your browser, because you've given it characters to display that aren't valid for the character set you told it to use.
Where are you seeing that and what code and/or database do you have behind the scenes powering it?
-
"unfollow="+unfollow+"follower="+follower+"&action=unfollow"
Missing a & -
The problem is how you're fetching the data in your code. You can't use an associative array, like
$row["description"]
, because the row has multiple columns named "trans_ref" and "description".You could use another fetch method that lets you refer to each value by column number, which sucks because then you have to keep track of what column has what values, or you can use aliases in your query:
SELECT table1.trans_ref AS table1_trans_ref, table1.description AS table1_description, table1.date_paid AS table1_date_paid, table1.recurring AS table1_recurring, table1.amt AS table1_amt, table1.bill_code AS table1_bill_code, table2.trans_ref AS table2_trans_ref, table2.description AS table2_description, table2.amt_deposited AS table2_amt_deposited, table2.deposit_date AS table2_deposit_date FROM table1 RIGHT JOIN table2 ON table1.username = table2.username
(named all the columns with "tableN_" for consistency)And I think you should be using a LEFT JOIN, if either at all. Ask yourself what you want to happen (a) if there are rows in table1 with no matching rows in table2, and (b) if there are rows in table2 with no matching rows in table1. How you answer determines whether it's LEFT, RIGHT, or INNER JOIN.
-
Make that link go through a PHP script as well. waitfile.php can handle it too. I figure you can have the same URL as before but with an added value in the query string indicating it's the "click here" link, and you log those requests a little differently.
-
At this point you should be thinking "Undefined method? You mean that mysqli_stmt does not have a 'bind' method? I wonder what methods it does have..." and then heading over to the documentation.and now im getting Fatal error: Call to undefined method mysqli_stmt::bind()
-
Server access logs generally are in a file. But whatever.
Make waitfile.php write to a log itself. Build a string with the information you want, like
$line = date("m.d.Y h:ia ") . $_SERVER["REMOTE_ADDR"] . $filename;
then write to the file with file_put_contents with the append flag. Make sure you don't take the $filename blindly from $_GET - you should make sure it looks valid (like http://site1.com/download/) before writing it to a file. -
db_connect() never actually returns anything.
-
How about your server access logs?
-
Yeah... I don't really care for Dreamweaver. I could go on a long rant about it (no, really) and other things like it, but suffice it to say: I don't like the habits it teaches.
Which is not to say anything about you. Showing initiative is a good thing and everybody has to start somewhere.
-
Take a look at how the recipient, purpose, and description make their way into the HTML:
<td width="230" align="left" valign="top"><?php echo($rsBenefactions->getColumnVal("be_recipient")); ?></td> <td width="230" align="left" valign="top"><?php echo($rsBenefactions->getColumnVal("be_purpose")); ?></td> <td width="230" align="left" valign="top"><?php echo($rsBenefactions->getColumnVal("be_nature")); ?></td>
It's not particularly good (shakes fist at Dreamweaver) but you need to mirror what it does with $rsBenefactions in your own code. Optionally mirroring the style too:<?php echo($rsBenefactions->getColumnVal("be_index")); ?>
You also cannot use smart quotes in code. Probably Dreamweaver's fault again (continues shaking fist). -
Well, that's Dreamweaver's fault.Locks everything up = basically the computer won't work. No keys will function within Dreamweaver and I can't Alt-Tab to any other software I may have running. The only option I have is to use Ctrl-Alt-Del to access Dreamweaver and shut it down.
Actually, how about posting the full PHP code to the entire file? This pointy-clicky bull with Dreamweaver just doesn't cut it.The live code is
- 1
-
And I'm saying,
Don't make the download script itself do the waiting. Make whatever page that shows the link, or whatever, do the wait.
-
You need a separate page that shows the message and has the delay. Ever seen one of those "your download should start in X seconds, click here if it does not" pages? That.
<html> <head> <meta http-equiv="Refresh" content="3;url=http://www.example.com/download.php?f=downloadfile.zip"> </head> <body> <p><a href="http://www.example.com/download.php?f=downloadfile.zip">Download</a><p> </body> </html>
If the page were more complicated than that, it would take the average user at least a couple seconds to even find where the link is. (The first time.) If you don't want them to even see the link then you can hide it with CSS and do some simple Javascript work to show it.window.setTimeout(function() { // show the link }, 3000);
-
What does "locks everything up" mean? What does the HTML source of the page (ie, browser's View Source) show for the link?
-
[edit] At some point there was a response in here... Something, something, array doesn't have a min in it. [/edit]Notice: Undefined index: min in /phpvalidation.php on line 100
Can't use header() if there's been output. In this case the output came from that first error message (notice where it said the output started) so when you fix that then this one will go away too.Warning: Cannot modify header information - headers already sent by (output started at /phpvalidation.php:100) in /doeditprofile.php on line 53
index.php Not Displaying And...
in PHP Coding Help
Posted
Normally a blank page is the result of a parse error; as it so happens, line 199 is missing a semicolon and the if block on line 229 is unfinished. You should be getting error messages about this, and if not right on the page (a bad idea in production) then in some error logs.
You also need to learn about SQL injection. It's a bad thing and you're vulnerable to it.