razta
Members-
Posts
45 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
razta's Achievements
Member (2/5)
0
Reputation
-
Hey thanks for the help and all, but is there any need to be patronising?
-
Sorry, I was calculating the amount of entries, should have made that clearer. I think I will just let the table grow and see how it goes, if it becomes unmanageable then I will just delete it and start fresh and then look for a solution. Thank you very much for your thoughts and insight.
-
Thanks, I think this may be a viable solution. I don't know much about how much space or processing power mysql needs to store or query data. But if I store every query; alpha = 26 numeric = 10 Total = 36 (not including special chars and converting all to lowercase) 36 to the power of 36 = 1.06387359 × 10^56 That's one massive table, does it really not matter that it could possibly get that big?
-
Hi, I have a search engine on my PHP application and I want to store the top 50 searches. Now, If I store all query's then the table will get huge. If I limit the amount of query's to 50 and then count the recurring searches then any new query's that weren't in the original 50 won't be stored. Any ideas on how I might solve this problem? Thank you in advance. autonumber Search Count 1 wine 5 2 eggs 1 3 bacon 7
-
Fantastic! Thank you very much. I had something like this in mind but wasn't sure quite how to organise it. Thanks again.
-
Hello! I am building a web application and I'm not sure what the most efficient way of storing my data is. I have some experience with SQL however it seems obviously not enough. My table looks as follows: SELECT * FROM data; +----------+---------------------------+----------+------------------+------------------+ | id | name | tree | old_versions | latest_version | +----------+---------------------------+----------+------------------+------------------+ | 1 | MYSQL | CS | 1,1.1,1.2,1.3 | 1.5 | | 2 | PHP | 5.3 | 5.3.1,5.3.2 | 5.3.3 | | 3 | PHP | 5.2 | 5.2.1, 5.2.2 | 5.2.3 | | 4 | ASP | | | | +----------+---------------------------+----------+------------------+------------------+ Now what I want to do is add the release date to the 'old versions' and 'latest_version'. What's the best way to structure my database to do this? The data being output would be something like: LATEST: PHP 5.3 (released: 01/01/2010) PHP 5.3.1 (released: 01/01/2009) PHP 5.3.0 (released: 01/01/2008) Any help is much appreciated. Thank you.
-
Something so simple yet fundamental. Thank you very much for your help!
-
Hello, I am trying to match a regex and extract the data from the matched string that I want. I want to extract the Apache version only from the Apache website. So I am using the following raw sting to do the match: <li><a href="#apache22">2.2.15</a> (released 2010-03-06)</li> And the data I want from the above raw string is just the '2.2.15'. Here is the code related to this problem: // Match regex in grabbed HTML source preg_match('/<li><a\shref="#apache22">(\d\.\d\.\d?\d)<\/a>\s\(released\s\d\d\d\d-\d\d-\d\d\)<\/li>/', $grabPage, $regex_version); echo $regex_version[0]; I expected the above to output '2.2.15' instead it output '<li><a href="#apache22">2.2.15</a> (released 2010-03-06)</li>'. Any help appreciated. Thanks in advance.
-
Finally got it working! It was a problem with file/folder permissions in the end, just had to chmod 777 the files/folders that the web app needed access to. A tip for anyone doing the same: Output the cron job results to a file for debugging, i.e. "* * * * * yourcommand > output.txt" Thank you all for your help!
-
Hello all, Still having problems trying to get this to work. I created a user called 'cron' and give it root privs and a blank password. PHP under the user 'nodoby' creates the cron file and then tries to add it to the user cron's crontab. echo $scriptOutput = shell_exec('sudo crontab -u cron ' . $cronFile); The cron file is being made and with the correct formatting however it is not being added to the user cron's crontab. Any ideas? Thanks again!
-
Thanks for the reply. I will try a couple of your options and see if I can get something working. I will leave this topic unsolved for now as I may have further questions. Thanks again!
-
@abazoskib no joy with shell_exec() @thorpe Yes I do. Its a development machine I have on my network. Any idea what permissions Apache should have? Wouldn't giving it more permissions be a security issue? Thanks for your replys!
-
Hello all, I have a PHP script which makes a cron file from user input. When i try to run the cron job via system() the job doesn't run, I suspect it has something to do with permissions. Any ideas on how I would go about getting this to work? Here is the system() call: echo $scriptOutput = system('crontab ' . $cronFile, $retval); Thank you in advance for your help.
-
Thanks for the replys. I will have a look into buffering and see if that fixes my problem. Another quick question I have is would it be possible to send a command to a shell and then disconnect it from PHP? When I currently run a command my PHP page continualy loads until the command has finished, is there a way jut to send the command and not have PHP continuesly loading? Thanks again!