pamelasplayroom Posted June 30, 2008 Share Posted June 30, 2008 hi all. i have a new apache2triad install, only used in localhost mode with no intention of setting it up as a internet connected web server with dns and such, purely so that i can learn more about the server side of things, and more about the config of apache, sql, and php etc, and develop scripts and test them away from my remote server. all is well as far as i can see and everything works apart from php mail not relaying on the server, but at the moment this is not a big issue. i know this has been asked before, and i have tried the solutions that apply to phpmyadmin and php.ini. what is giving me a headache is not being able to load my sql database using phpmyadmin. i have exported the sqldb on the live server, and have it on my local pc. i have increased the file upload size to cope with the db (5.7mb) and i have tried changing max_execution_time = 600, but it still bombs at 300seconds. if i import a small db, everything seems fine and the import is a success. also, the import works just fine on the remote server. so something must be slowing down the import script, or not be configured correctly. the error i get is this Fatal error: Maximum execution time of 300 seconds exceeded in C:\apache2triad\htdocs\phpmyadmin\libraries\string .lib.php on line 91 the db file im trying to import has some extra bits at the top of the file that are not in the file generated locally, and need to be removed before the local server will accept the file otherwise i get a #1065 - Query was empty error. .... this is the header from the remote server -- phpMyAdmin SQL Dump -- version 2.11.6 -- phpMyAdmin | MySQL Database Administration Tool | www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 29, 2008 at 09:28 PM -- Server version: 4.1.22 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: and the header from the local server -- phpMyAdmin SQL Dump -- version 2.7.0-pl2 -- phpMyAdmin | MySQL Database Administration Tool | www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 30, 2008 at 03:27 AM -- Server version: 5.0.18 -- PHP Version: 5.1.2 -- -- Database: by looking at the data contained in the tables i know that the db file is being processed correctly, but not to the end as it times out before it can finish. anyone got any idea what i need to do to get myphpadmin to process the whole db file without having to split it into little bits, as i will be loading and dumping lots of db files of around the same size and it will be a pain to have to split them or try to convert the sqldb files to delimited text files. many thanks. Link to comment https://forums.phpfreaks.com/topic/112679-execution-time-exceeded-problem/ Share on other sites More sharing options...
br0ken Posted June 30, 2008 Share Posted June 30, 2008 This is just guesswork but I know MySQL has it's own timeout limit, although it's honesty that doesn't look like what's causing your problem here. Have you tried going into the string.lib.php folder in your phpmyAdmin and using the php set_time_limit() function? <?php set_time_limit(999); ?> It might just work! Link to comment https://forums.phpfreaks.com/topic/112679-execution-time-exceeded-problem/#findComment-578667 Share on other sites More sharing options...
trq Posted June 30, 2008 Share Posted June 30, 2008 Why not simply bypass phpmyadmin and import the file directly using the mysql client? mysql -p -h hostname dbname < file.sql Link to comment https://forums.phpfreaks.com/topic/112679-execution-time-exceeded-problem/#findComment-578670 Share on other sites More sharing options...
pamelasplayroom Posted July 1, 2008 Author Share Posted July 1, 2008 thanks br0ken. i tried that and it made no difference. still got the same error. well done thorpe. that seems to have worked a treat. totally forgot that i could open a command window to access the mysql client. i would still like to know why phpmyadmin wont process the db file, and just seems to get hung up when it gets to the 'Return substring from string' part of string.lib.php the db is from phpbb and it always times out in the search_wordlist table just after record 9000. i have checked the file and the data is fine. as i said in the op, i want to learn, and this isnt working the way it should and i want to know why, and how to fix it. if i didnt have access to the command window, and was accessing the db over the net, i would have a big problem. not going to mark this as fixed till i find out why its not working, and then i will let you all know. so, any ideas??? if you need more info on the install just ask. thanks again thorpe. im off to read up on all the options for the mysql client now . Link to comment https://forums.phpfreaks.com/topic/112679-execution-time-exceeded-problem/#findComment-578707 Share on other sites More sharing options...
br0ken Posted July 1, 2008 Share Posted July 1, 2008 if i didnt have access to the command window, and was accessing the db over the net, i would have a big problem. This isn't neccessarily true as you could write a PHP script to load in the file, parse each query and run it. That's what I do as I write my own backup script (the server I use won't allow MySQL Dumps for some reaon). Link to comment https://forums.phpfreaks.com/topic/112679-execution-time-exceeded-problem/#findComment-578710 Share on other sites More sharing options...
pamelasplayroom Posted July 1, 2008 Author Share Posted July 1, 2008 thats true, theres always more than one way to de-fur a feline. with my current level of php & sql i feel that it may take me a while to get such a script to work right, from scratch. but i think that it will be something that i will have a crack at, now that you have mentioned the idea. best way to learn is by doing. thanks br0ken. Link to comment https://forums.phpfreaks.com/topic/112679-execution-time-exceeded-problem/#findComment-578721 Share on other sites More sharing options...
br0ken Posted July 1, 2008 Share Posted July 1, 2008 best way to learn is by doing. You're right there my friend. If you get stuck I'd be happy to provide you with my code, if it's gonna help you. Link to comment https://forums.phpfreaks.com/topic/112679-execution-time-exceeded-problem/#findComment-578730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.