Josh Connerty 20 Unverified User

My thoughts would be that you have in some way put the variable down in the wrong way. Can you post the code so as I can take a closer look?

Also try taking a look in firefox right click on your page and then click source. This should give you two tabs "Page source for http://...." and the other is most likely your iframe source. Check them both just to make sure you are posting the variable correctly.

Josh Connerty 20 Unverified User

For instance anchors don't resize without them being displayed as block.

Anyway is it really worth arguing over. I was wrong you were right (again).

Josh Connerty 20 Unverified User

Well good thats easier for you then.

You need to look into PHP scandir() and PHP explode() then take a look at the mysql_() functions.

This will basicly tell you what you need to know.

Josh Connerty 20 Unverified User

Okay so here it goes.

I was working on a CMS earlier and I got pissed off with my text editor. So I downloaded a new one. Little to my knowledge it was a bogus.

It installed and during the installation my PC got really slow. PC Wizard did not recognise that there was much CPU usage going on about 3-7%. I thought seeming I had been running it all day and most of the night until early hours of the morning I would restart it, ooops!

When I boot up now I click on my username "Josh" when I click it I get a dong as if it were a windows error or notification. The screen takes a little longer than usuall to load but then the screen appears with a little dialog box. Title "C:\Program" with the message "Windows could not find the directory C:\Program".

I then get everything trying to log me in (im's and stuff) but to no adue. I show that I am connected to the internet and when I open FF or IE it is unsually quick about dimising the page as a "Page load error". At this point I disabled my wireless adapter and ripped it from the USB :P.

I thought imediately that it was a virus so I went to open Norton Internet Security 2009, wich by the way was not running wich is a little strange also. So I opened the Task Manager and saw …

Josh Connerty 20 Unverified User

Maybe this is more of an issue with more the element (maybe it was uputs) and more to do with the doctype. I was almost certain XHTML 1.0 requires you to state it as a block element.

Josh Connerty 20 Unverified User

I always thought include took all of the docs and whatever before it is echoed out, maybe I was wrong :(

Josh Connerty 20 Unverified User

is the DB on local host or a remote machine?

Josh Connerty 20 Unverified User

To add to that you must set the display to block so as you can actually change the size of it or most browsers will ignore it.

Josh Connerty 20 Unverified User

In that case URL include. That works as it loads all of the scripts before the the document is loaded INCLUDING client side scripts.

BEFORE everyone says they cant do that or whatever because their host has barred it, then shhhhh.

The host do not EVER ban anything except from PHP executing commands (or a command that can run a server script, such as a linkux .run file or a windows .bat file) all of the disallowed and limited PHP values can be altered by simply adding a file called php.ini in the directory the script is working out of.

Josh Connerty 20 Unverified User

Does pdf and txt have to be as a string or jumbled up chars?

Josh Connerty 20 Unverified User

If you stick the file_g..... function at the top of your script in a variable then it should be loading the code before you echo it out.

The issue comes as your are essentially loading two websites.

Maybe this website has a longer response or load time.

Only other thing is you could add a sleep statement in order for the named function to ctach up.

P.S: I do know the function just don't like to keep typing it, gets a little repetitive. :P

Josh Connerty 20 Unverified User

hi all,

I have done one work in using multiple select box in which i am fetching value of select boxes from database. This all work i have done using ajax. Like when we select country form first select box then it will show state comes under country. But now problem is that when i am selecting country form first select box then 2nd select box which is for state. This is dyanmically changes size . Sometimes it becomes large and sometime it is very short in size. Because value are changing dynamically . So i want now that size should be fixed of 2nd select box.

IS there any way in html code in which we can fix the size of 2nd select box or we can fix the larges size which it can be ?? how i can set this fix size?????

Please help me to solve this issue.
Thanks,
Gagan

You'll see on most select's they have a line like this >------------------------< That bassicly is doing what you described.

Josh Connerty 20 Unverified User

You could but this would involve JS and would be avoidable then you would have 100's of people logged in when their not.

As long as you have a decent host it shouldn't effect the server. And as for saving the last move in the session it is difficult to take data from the sessions, something I have never done.

I have always used this method and it hasn't made the site laggy at all and full fills it's purpose. :)

Josh Connerty 20 Unverified User

He is fetching them all at once. He says displaying 144 records, thats what I mean, would most likely give you a memory error.

Josh Connerty 20 Unverified User

Okay right, I will have a look about that for you.

As for the 64bit CPU I have one in my current system, it runs both x64 & x86 without any problems however I run a 32bit OS.

Josh Connerty 20 Unverified User

Hmmm, just something to say, I have never seen anyone user the round brackets to take post data...

you were usering $_POST('egnejg');
it should be $_POST;

And you can't use EDO twice I think you must use a different three letters for instance FOD...

Josh Connerty 20 Unverified User

Not that liekly though. I would have thought echoing out 144 records would most likely give you a memory error.

I would have thought that using a style attribute on the p tag to make it display as block and using "clear" with the value of "both" this should make sure it is on it's own line and doesn't appear under the table its self.

Try validating the source HTML (view the page and hit ctrl + S) and submit it to the W3C html validator and check for any HTML errors. It maybe that you are missing an opening or closing tag.

Please post your WHOLE document including the query and the loop.

Josh Connerty 20 Unverified User

If you are asking for a whole admin setup your opening up a can of worms that is a very time consuming and complex task else check out Atlis link to PHPMailer to send mail via php.

OmniX has a point if you do not have this knowledge yourself as of now, then you are looking at spending months trying to build a system like this (with ALLOT of help from other developers), or just hire a freelancer and have it done in a week (if not less). The only disadvantage of the second option is that you will not be learning anything.

Josh Connerty 20 Unverified User

Or use a smart idea and use the JavaScript time method to check for a new record using AJAX. Really, can no-one create a chatting system?

Basicly you need to look up javascript counting and that will teach you how to run the function and how spaced apart to run the function. As for the function its self you may want to look into jQuery AJAX as this is a more simplified version of the JavaScript AJAX.

In theory this is what needs doing.
1) Run a JS function every 10 seconds.
2) Run an AJAX statement in the function linking to check.php
3) In the check.php run a query to check the number of rows in the table.
4) Use the returned number from PHP in the JS function to check if it is larger than the current number of rows.
5) if it is then you will need to use AJAX once more to retreive a print out of the result from the MySql database.
7) Use JavaScript to replace the current results with the new one.

If there isn't another row added JS will simply just stop running the script and wait for the elapsed time again to check again.

Josh Connerty 20 Unverified User

For £114 you can get a AM2 motherboar (I no you like you MD's) with a Athlon x2 black edition 2.70GHz and 2GB DDRII 800MHz RAM.

£114 is roughly $183, this motherboard will allow you to add a SATA hard drive or four actually. And two PATA devices (older HDD and Optical Drive connector mostly likely what you currently have).

This motherboard also supports 4GB DDRII RAM (800MHz MAX) and has a PCIE slot for your graphics cards. It also has onboard graphics and onboard audio.

Instead of me explaining it all to you I will post ya the links. If you are in the US then they won't really mean much to you as you would have to pay customs expenses and it wouldn't be worth it. This is just so as you know the rough prices to getting a more up to date system that will allow you to upgrade it as and when you get the money.

MOBO: http://www.novatech.co.uk/novatech/specpage.html?MSI-K9NNF2
CPU: http://www.novatech.co.uk/novatech/specpage.html?AMD-X2775
RAM: http://www.novatech.co.uk/novatech/products/a937x1y0z1p0s0n0m0

You really must head the advice and take the step to either the LGA775's or the AM2/+.

Josh Connerty 20 Unverified User

My advice would be to go to http://ubuntu.com/ and downloading teither the 64bit or 32bit version of the ubuntu desktop. This is a 750M+ file that you can virtually mount and install inside windows.

This will diagnose wether it is the OS or the MOBO. I am split between three things. Either the CPU is faulty or not what you ordered, the motherboard needs flashing or replacing and the final thing is that you need to reformat your hard drive.

I am pretty sure it is one of the three above or a mixture of the three above.

I would advise looking for a local OEM store that could give you a board that would fit the CPU you have purchased. I don't know about you but http://novatech.co.uk/ (english store) will replace things that don't fit in with your system.

Have you not got a friend who has a similar build PC that you can play about with? I mean switching parts etc. between the two and seeing if it is a hardware issue or software or what not.

It isn't likely but maybe your PSU is becoming a little tired. I bought a 550W PSU from noavtech and I kept getting a blue screen error because of a faulty PSU it is quite common. I am currently using a 20 pin 250W PSU for a 24 pin LGA775 board and it works better, waiting for a replacement PSU to be …

Josh Connerty 20 Unverified User

Basicly you use the page.php with file_get_contents() to retreive the remote page.

This will only happen once your page has loaded and when javascript uses AJAX to take whatever the page.php returns.

If you don't know much javascript and ajax then http://jquery.com/ will simplify the process a little.

I use jquery as it also saves allot of javascript coding.

Josh Connerty 20 Unverified User

Note that you cannot use AJAX to fetch content from a domain other than the one the script runs on. The browser will not let you execute cross-domain AJAX requests.

Yarp thats why you must make the page.php to retrieve it for you.

Josh Connerty 20 Unverified User

No I did obviously I had suppresed a line out that was trying to tell me that. Just tested and, you are amazing, it indeed works.

Can see why you are much loved :P

Rep added and thankyou, you have been a great help.

Josh Connerty 20 Unverified User

It seems to be a max execution time error. I got some other error messages as well for the image resizing but I always get these but they resize anyhow.

Just changed the max execution and input times to zero for now as that will give it unlimited and will allow me to find out if this is indeed the issue.

Josh Connerty 20 Unverified User

no luck :(

Maybe it is a memory issue but don't you usually get error messages for that?

Josh Connerty 20 Unverified User

Ahh just noticed, I didn't provide an error statement for the if(@move_uploaded_file

This might be why I get a blank screen.

EDIT: Just checking the upload again... Just so you know why I am not replying yet :D

Josh Connerty 20 Unverified User

Okey dokw will do now.

Josh Connerty 20 Unverified User

BarJabba,

I've just re-read the entire thread, I believe it is a hardware problem. It either works or it dosen't. If the cpu is dual core and the motherboard supports it, then XP will see them, as will CPUZ or other utilities.

Please list for us information on motherboard manufacturer and model. Does the bios properly indentify the cpu at boot, what designation does it display during POST? I'm wondering if a bios update might be in order.

I hope you have patience and a sense of humor regarding some of the posts to this thread. Comment s such as "winXP doesn't have the proper threading apartments to calculate the cpu output" and "second core is more of a booster than anything else" are straight out of the ether.

I applaud your efforts to upgrade your machine. Dual core cpu's are not a gimmick. They work and work well even with software not specificaly written for two cores. By all means getting the most cpu your mobo can support is a cost effective way of moving forward.

By 2012 you'll likely see mainstream PC's with eight to twelve cores, they're already in server machines now, made by AMD and Intel both.

Please post spec's / Good Luck

Neon Zeon

I have an eight core computer :P (2 quad core xeons)

Josh Connerty 20 Unverified User

Yep make another file called page.php then use JavaScript and AJAX to retrieve it once your document is ready.

In this page.php you use file_get_contents() to retrieve the files contents.

Josh Connerty 20 Unverified User

White screen. As I say I have uploaded other archives that are of smaller size with no issue. This archive I'm trying to upload now is 114M :S.

And the @'s are from previous debuging.

Josh Connerty 20 Unverified User

Hey guys,

Basicly my nephew has just been born and I need to put soem images on my site for my grand parents (the great grad parents) to see.

I can upload smaller galleries and all is well but for some reason if I upload a larger archive, for example 54M this doesn't work.

I have added a php.ini file to the scripts directory that reads:

upload_max_filesize = 190M
post_max_size = 200M

However this doesn't effect it.

What happens is that when the archive is uploaded it is extracted the images are resized then put into a random string folder. Then the script is supposed to echo out a form that will add the gallery information to a Sql database. However when a large file is uploaded the script just goes dead.

I have heard of this before and I thought the post_max_size was supposed to resolve this, no?

Thanks in advance.

Script:

<?php



  if( isset( $_COOKIE['Username'] ) && $ui['Acc_Type'] == "adm" ) {

  ?>

	  <?php

	  if( !isset( $_GET['pro'] ) ) {

	  ?><h1>Add Gallery</h1>

	  

	  <p>To begin please upload a zip file containing all the images you wish to be in the gallery.</p>

	  

	  <form method="post" action="?pro=uploading" enctype="multipart/form-data">

	  

			 <label for="archive">Archive:</label>

			 <input type="file" name="file" id="file" />

			 <input type="submit" value="Upload" />

	  

	  </form>

	  <?php

	  }

	  if( $_GET['pro'] == "uploading" ) {

	   ?>

			<?php

			

			  if( !isset( $_FILES['file']['name'] ) ) {

				$err++;

				$cor .= '<li>You must select an archive to upload</li>';   

			  } else {

				$ext = explode( "." , $_FILES['file']['name'] …
Josh Connerty 20 Unverified User

So with PC Wizard when you minimiz it and you get the graphs does it show just core 1? or does it show 2?

Josh Connerty 20 Unverified User

It's better off you contact us when you need something like that, besides you usually hire a freelancer to do something like that.

Josh Connerty 20 Unverified User

No Problem, by the way I will post a link to the excel API I mentioned.

Josh Connerty 20 Unverified User

when time is echoed what format is used?

I usually use date as I can specify the format I wish to use?

But you store it as a timestamp right?

Josh Connerty 20 Unverified User

Ahh everyone shutup!!!

It is not easy to program your way out of a paperbag I assure you!!!

:D

You just made a valid point how is programming gona help you get out of a paper bag??

I know people say PHP has unlimited possabilities but really, it can break paper bags.

I suppose you could make a send mail script to email for help :P

Josh Connerty 20 Unverified User

I suppose so, I don't feel to happy taking FTP details as I only take those kind of details for a project or paid services. This way the user (i.e you) has some kind of security.

I think I might be able to email me at: josh [at] jjcon.co.uk

Can I ask, who exactly originally programmed these scripts? It's a little wierd as there is a mish mash of different PHP versions...

Usually a PHP programmer programs in just one version (usually the one they learned with) I myself am prodominently a PHP 4 & 5 programmer but I can program in PHP 6 aswell.

Josh Connerty 20 Unverified User

I have to say that when I saw this post i burst out laughing and everyone in this quiet office was looking at me like some kind on nut.

I have to agree, I do understand your ambition as I am a n00b myself (About 2-3 months) And I would love to do the same.

The difference between us is that I know that it takes years of experience to become a Guru.

Think about this.... If you get a job and you miss some vital code for security of your script and it gets hacked there goes your reputation for life. No one will hire you ever.

Correctamundo!

Josh Connerty 20 Unverified User

If you try doing it don't be shocked!

It doesn't make sense, obviously there is some structure to it, try googling for a word document view PHP, I know there is one out there for excel so there is more than likely one for word.

The only issue being that it would be difficult to edit a word document using only plain text...

Josh Connerty 20 Unverified User

Tehn you could make a web form having all of the fields the word document does and then create a new word document insert in parts all of the bits of the word document devided by the user input if you get my drift.

For example:

This is the word document it has some text here...

Here...

and here...

The first form field is here \/
Name:

Second here \/
Age:

Third here \/
Country of Residence:

The document will finish in just a few lines

a few more...

And another...

This is the last line.

So what you would do is create an different kind of PHP variable (presuming you have some knowledge of PHP).

// Use these variables to strip slashes and condition the data etc.
$name = $_POST['name'];
$age = $_POST['age'];
$country = $_POST['countryofresidence'];

$word_doc = <<<EOD
This is the word document it has some text here...

Here...

and here...

The first form field is here \/
Name: $name

Second here \/
Age: $age

Third here \/
Country of Residence: $country

The document will finish in just a few lines

a few more...

And another...

This is the last line.
EOD;

You might have to do some looking up here though, we need to open a new file and insert the contents. The only issue being is that if you can't open a word document with Notepad, you may have hit a flaw.

I personally hardly ever use word and this is a new PC …

Josh Connerty 20 Unverified User

Just to clarify, does the cookie holsd the username? if not then the script needs to be changed...

Infact are you using PHP Sessions?

The sooner you tell me these things the sooner I can send you on your way.

Josh Connerty 20 Unverified User
<?php
include("include/session.php");
?>
<html>
<title>bla bla</title>
<body>
 
<table>
<tr><td>
 
 
<?php
/**
* User has already logged in, so display relavent links.
*/
if($session->logged_in){
echo "<h1>Logged In</h1>";
 
 
echo "<h2>Your available downloads</h2>";
//$id = $_COOKIE['logged_in'];
//$query = mysql_query("SELECT * FROM `users` WHERE `id` = '$id'");
 
$user = $_COOKIE['logged_in'];
$query = mysql_query("SELECT * FROM `users` WHERE `username` = '$user'");
 
// This will echo out all the links to the downloads
$count = 1;
while( $row = mysql_fetch_array( $query ) ) {
$file_count = "file".$count;
if( $row[$file_count] == 1 ) {
$file_dets = fetch("SELECT * FROM `files` WHERE `file_id` = '$count'");
echo '<a href="'.$file_dets['file_src'].'" target="_blank">'.$file_dets['file_name'].'</a><br />';
}
$count++;
}
echo '<br/ >';
echo "Welcome <b>$session->username</b>, you are logged in. <br><br>";
echo "[<a href=\"process.php\">Logout</a>]";
}
else{

?>

<h1>Login</h1>

<?php

/**

* User not logged in, display the login form.

* If user has already tried to login, but errors were

* found, display the total number of errors.

* If errors occurred, they will be displayed.

*/

if($form->num_errors > 0){

echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";

}

?>

<form action="process.php" method="POST">

<table align="left" border="0" cellspacing="0" cellpadding="3">

<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>"></td><td><?php echo $form->error("user"); ?></td></tr>

<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>"></td><td><?php echo $form->error("pass"); ?></td></tr>

<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <?php if($form->value("remember") != ""){ echo "checked"; } ?>>

<font size="2">Remember me next time &nbsp;&nbsp;&nbsp;&nbsp;

<input type="hidden" name="sublogin" value="1">

<input type="submit" value="Login"></td></tr>

<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">Forgot Password?</a>]</font></td><td align="right"></td></tr>

</table>

</form>

 

 

</td></tr>

</table>


</body>
</html>

Should work now.

Josh Connerty 20 Unverified User

Heh, sorry about your meltdowns. I have been with AMD since about 2000 and I just love it. I had Intel and even worked there. A lot of negative on that Intel stuff.

I have some of the most processing intensive software on my system, so, a statement of AMD that it cannot handle things such as video and audio processing is just not true. If you have some legacy chips from AMD beginnings, then yes, you might not get to multi task or even use some of the higher end applications. You can't upgrade your applications to 2009 era and not upgrade you CPU's too. Also, motherboards are also a factor. If you are using the same MB and the AMD chips are compatable with it, then it just might be the board. I've seen boards mess up CPU's and I've seen people not look carefully as to what CPU's are supported by that MB.

Just a thought. Now back to the issue of this tread...

It is not so much AMD but the chip itself. For instance the athlon AM2+ 3.oGHz is a great chip, my brother plays WOW with the lates patch 24/7/365 and it seems to handle it fine.

Although I am very much an Intel person myself. I actually have a P4 x2 and seems to run fine.

Thats a point, my BIOS recognises that it is a Pentium 4 Dual Core but my OS (XP PRO) doesn't seem to take much notice …

Josh Connerty 20 Unverified User

I had a toshiba with XP media center and there was a similar issue.

I found hitting the windows key and L will lock the computer (switch users, not sure) and you can then click the shut down button and it shuts down.

I am affraid mike this was due to norton 360. I think it is a uncommon issue, may be something to do with other software installed aswell.

But yes wiping 360 off and replacing it with AVG Free Edition seemed to do the trick (symantec was running out in I think it was a week anyway). I have never come accross this issue with Internet Security though.

Josh Connerty 20 Unverified User

I've been Very Dissapointed before when stores have shipped me single core cpu's instead of dual core. Make certain the name includes the "X2" as in Athlon 64 X2, as opposed to Athlon 64. Pull the chip and read name stamped there and compare it to the packaging.

If it indeed an "X2" it will be recognized by any mobo capable of running it, period. Otherwise it is a single core or it's broken. Get an RMA from where you purchased it. Good Luck.

Two weeks ago I recieved an Athlon 64 3800+, when I had ordered an Athlon 64 X2 3800+. When I contacted the store they informed me that they were out of stock. I chose to keep the single core because we needed that PC back in place.

Thats cheeky of them, I think it wasn't an accident :P

Josh Connerty 20 Unverified User

On the occasions I have replaced a CPU I haven't been warned of any hardware changes either.Then again it has always registered the cores.

Have you not thought about getting a new ASUS MOBO for £40 and formatting your HDD and doing a fresh install. At least then you know the motherboard is going to recognise it no problems.

My only other input will be that maybe you have damaged the CPU in some way, I have heard of overclockers burining out one of their cores so it may be that their is something faulty with the CPU.

Try a friend who might have a 939 Dual CPU and give that a whirl.

Josh Connerty 20 Unverified User

Is it of upmost importance that the form is in word?

Josh Connerty 20 Unverified User

Okay found the problem myself on that one

in

<h2>Your available downloads</h2>

i changed it to

echo "<h2>Your available downloads</h2>"

Now i get

Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/bluetek/public_html/dac/main.php on line 24
echo "<h2>Your available downloads</h2>"

you missed the closing ;

echo "<h2>Your available downloads</h2>";
Josh Connerty 20 Unverified User

Rihgt. It is quite difficult and I don't have much knowledge of this. Could you not convert the word document into a .exe file and then have the user fill it out and on the send button have it converted into a word form then emailed to the user?