Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

D0ct0rteeth

macrumors 65816
Original poster
So heres the deal... I know that this is COMPLETELY unrelated to MAC's but i would ask anyway... the threads have been mostly general discussion lately anyhow...

I have a php based website that is going threw a redesign hosted on my proprietary linux server...

folder structure is set up like this...

html
-element
-image
-script
-sfo
-shop
-spec
-and various html files


to eventually test the redesign I have setup an additional folder called "TEST" inside "HTML" that duplicates the heirarchy like so:

html
-test
--element
--image
--script
--sfo
--shop
--spec
--and various html files
-element
-image
-script
-sfo
-shop
-spec
-and various html files

well all is well and good until i try to load the page... when i point the browser to the "index.php3" page in the "TEST" folder it takes forever to load and eventually locks up the browser...

is this a database issue due to the moved files, or a php thing?

I have never had a problem like this before; but then again this is the most complex site I have done..

I appreciate any feedback and let me know if i didnt explain things too clearly...

Thanks "A TON" in advance...

C-
 
Re: PHP website question

Originally posted by D0ct0rteeth
well all is well and good until i try to load the page... when i point the browser to the "index.php3" page in the "TEST" folder it takes forever to load and eventually locks up the browser...
C-

Your PHP file probably is in an infinate loop for some reason... when it starts loading... hit STOP in the browser and view source... you'll probably see some error message.

arn
 
<?php
$element = array("AA2", "HT4", "MA5100", "MC275-II", "MC500", "MQ107", "MX113", "SL-1","TD190", "M1", "S3", "MAC1900", "SL-6", "MAC4100", "MC7108", "MR7082", "MVS3", "C39", "MA6200");
shuffle($element);
$r1 = $element[0];
if(!($r1=fopen("./element/$r1.htm","r1"))) {
print(" ");
}
while(!feof($r1)) {
$line = fgets($r1, 255);
print("$line");


these are the lines of code that are "freezing the browser" oddly the files/paths are the exact same as the ones on the live server... which works fine

thanks again... i will keep playing.. im sure it is me somehow...

i'll start in the "element" folder...

C-
 
remember you have to close the file

also maybe try separating the variable so "./element/$r1.htm" is "./element/".$r1.".htm" sometimes i've had problems with this.

also instead of ./element/file, maybe try a relative URL, element/file

also is your while loop closed? or did you just cut off the last }
 
Choppaface;

seperating the variable worked... now let the redesign begin...

thanks everyone for the help...

"snif" I love macrumors

C-
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.