Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > PHP website problem

PHP website problem
Thread Tools
Forum Regular
Join Date: Apr 2002
Status: Offline
Reply With Quote
Apr 24, 2002, 10:47 AM
 
So heres the deal... I know that this is COMPLETELY unrelated to MAC's but i would ask anyway...

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-
snakes on a plane
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Apr 24, 2002, 11:09 AM
 
is this on the same server, or are you testing from your mac?

have you altered the paths accordingly?

btw, you might point that server's admin to the fact that php 4.2.0 is currently available, seeing as i notice you're still using php3 there.

if you're not already amongst it, then for testing purposes on your mac, go to Entropy and you can install php 4.1.2 from there, as well as mysql. that way, you can figure things out locally, then just upload your finished site
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Forum Regular
Join Date: Apr 2002
Status: Offline
Reply With Quote
Apr 24, 2002, 11:44 AM
 
Thanks for the link...

The latest version of PHP is installed and everything has been duplicated exactly and the paths are identical, The files are hosted on the same server.. just in another folder... it is an exact clone of the original site in every way.

These seem to be the lines of code that are "freezing the browser"

<?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");

The code randomly shuffles the order in which stores sale items appear...(ie: one time the shoes are on sale.. refresh the browser and now its a t-shirt)

it appears the "element" folder doesnt contain the correct files, but(like the others) it is exactly the same as it is on the live server (it works flawlessly there)

I'll keep playing.. and let you know...

Thanks again...

C-
snakes on a plane
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Apr 24, 2002, 11:54 AM
 
well, i know that if i'm testing a site in a directory that's one up (or is it down?) from the root of where it's looking for some files (say a .css file), then i have to alter some paths. have you not altered any paths? i'd say you should be paying attention to that 'element' directory path.

give that a go, then report back later. that might fix it, or at least make you bang your forehead and go "duh! i know what it is!" and render this thread redundant. the latter would be cool, because it's always nice to solve things for yourself

i'll check back later...
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Apr 25, 2002, 05:22 AM
 
this line must be the problem

if(!($r1=fopen("./element/$r1.htm","r1"))) {

If the page is now in a subfolder, shouldn't it be

if(!($r1=fopen("element/$r1.htm","r1"))) {

?
     
Forum Regular
Join Date: Apr 2002
Status: Offline
Reply With Quote
Apr 25, 2002, 11:33 AM
 
Everything is working now...

I appreciate everyones help... thanks...

C-

...................
snakes on a plane
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Apr 26, 2002, 05:35 AM
 
what was wrong? Don't keep us in the dark!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:32 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2