mister X Posted July 27, 2009 Share Posted July 27, 2009 Hi, Im currently doing a project which help users to configure routers and switches through a web site. However, while im testing out the updating part for 1 configuration, it cant seem to update it. This is due to the long loading time. which cant load finish completely. Can anyone help? If you need the code, do pm me. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/ Share on other sites More sharing options...
trq Posted July 27, 2009 Share Posted July 27, 2009 You might need to extend php's max execution time, its in your php.ini. Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-883771 Share on other sites More sharing options...
mister X Posted July 27, 2009 Author Share Posted July 27, 2009 Hmm..it doesnt solve the problem. The loading bar will hang after the 5th bar.. any idea? Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-883786 Share on other sites More sharing options...
Q Posted July 27, 2009 Share Posted July 27, 2009 Try turning on error reporting. ini_set("display_errors", E_ALL); This might give you the reason of the hang Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-883804 Share on other sites More sharing options...
mister X Posted July 28, 2009 Author Share Posted July 28, 2009 Okay. I got the error message after i tried to save. Below is the msg. Forbidden You don't have permission to access /terminalserver-soft/5r4 Router/<br /><b>Notice</b>: Undefined variable: PHP_SELF in <b>C:/Program Files/Apache Group/Apache2/htdocs/terminalserver-soft/5r4 Router/Routing.php</b> on line <b>270</b><br /> on this server. -------------------------------------------------------------------------------- Apache/2.0.63 (Win32) PHP/5.2.9-2 Server at localhost Port 80 Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-884712 Share on other sites More sharing options...
trq Posted July 28, 2009 Share Posted July 28, 2009 The first error is a server error. You can't have spaces in url (or paths for that matter) and it looks like you where trying to access a url without a valid index file. The second error is a php one. PHP_SELF is a non existent variable. Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-884730 Share on other sites More sharing options...
mister X Posted July 29, 2009 Author Share Posted July 29, 2009 So am I suppose to declar the PHP_SELF ? Or is there any way to solve the problem? Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-885529 Share on other sites More sharing options...
lonewolf217 Posted July 29, 2009 Share Posted July 29, 2009 where is the code that uses PHP_SELF ? are you referencing it as $_SERVER['PHP_SELF'] ? Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-885530 Share on other sites More sharing options...
mister X Posted July 29, 2009 Author Share Posted July 29, 2009 Hm.. I dont think so. Here the paragraph that uses the $PHP_SELF <!--LEFT COLUMN: DISPLAY INFORMATION & SETTINGS--> <tr><td align="center"> <form name="Password" method="post" action="<?php echo $PHP_SELF; ?>" onSubmit="return Routingcheck();"> Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-885558 Share on other sites More sharing options...
mister X Posted July 29, 2009 Author Share Posted July 29, 2009 okay.. i found out. the program can only excuted to configuration terminal in command prompt. below is the coding. Do help to see, is there any mistake or how can i improve on it.. thanks if($control == "enable" || $control == "disable") { fputs ($fp, "config t\n"); if($protocolType == "RIP") { if($control == "enable" && $networkAdd != "") { fputs ($fp, "router ".$protocolType."\n"); fputs ($fp, "network ".$networkAdd."\n"); $moredetails .= fgets ($fp, 4096); $moredetails .= fgets ($fp, 4096); } elseif($control == "disable" && $networkAdd == "") { fputs ($fp, "no router ".$protocolType."\n"); $moredetails .= fgets ($fp, 4096); } } Quote Link to comment https://forums.phpfreaks.com/topic/167592-how-to-make-a-page-to-complete-the-updating/#findComment-885733 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.