Jump to content

o3d

Members
  • Posts

    138
  • Joined

  • Last visited

    Never

Everything posted by o3d

  1. I assume it is bacause php 5 has stricter (more propper) class handling
  2. mysql is the system database, and one of the system tables in that database is 'user'. Just try the query "select * from user" to see if the problem still exists.
  3. Try this link: http://www.unixgeeks.org/security/newbie/unix/cron-1.html
  4. Check this out for linux: http://www.unixgeeks.org/security/newbie/unix/cron-1.html I just don't trust task scheduler, so i wrote a service to control and execute my php scripts.
  5. Does any one have a better idea to protect PHP files so that you can distribute a 'release' without the customer being able to read the source files. There are tools on the internet which costs money, BUT your are dependant on their software and if its not open source, its not trustworthy. What I've done so far is writing an ISAPI DLL in borland cpp and installed it under iis6. Basically you call this isappi dll and it decrypts the encrypted php files and executes them respectively. It is thread safe (as is php). There are other methods available on the net that you use to encrypt your pages, BUT the decryption algorithm is found in your main php file and duh, if you can read the main file, you can easily decrypt all other files, so that is a bad idea. Any other ideas? Possibly to write a PHP extension perhaps but I have not been able to get that working on borland cpp.
  6. When you join two tables, you join them on specific columns. This will remove unwanted rows (except if jou left join). eg. TABLE1 c1 c2 1 one 2 two 3 three TABLE2 c1 c2 c3 1 this 1 2 that 2 3 this 1 4 this 1 So we want to see from table2 all the fields that has a relationship to table1 on table2's c3 and table1's c1. The join should look something like select table2.c1, table2.c2, table1.c3 from table2 join table1 on table2.c3 = table1.c1 Should return: c1 c2 c3 1 this one 2 that two 3 this one 4 this one I hope this helps!
  7. You could send a mysql timestamp to the mysql db. INSERT INTO table (date1) values ('NOW()') If you require a custom timestamp which is not NOW-dependant, then you will have to use php's Date function and formulate the correct datetime setting according to the physical sever's datetime settings. e.g yyyy-mm-dd or yyyy-dd-mm (both of these will have a different impact on the mysql db).
  8. This problem occurs because there is an error processing the PHP script, and the "Friendly HTTP error messages" are enabled in Internet Explorer which suppresses the error details. Try to turn off the "Friendly HTTP error messages" by choosing tools->internet options->advanced. Then the full error messages will be displayed, as well as the line number of the error. FROM http://www.idautomation.com/kb/http500error3.html
  9. This query should do the trick. select username, count(*) as posts from table group by username order by posts desc
  10. That would work fine for that server but say you migrate your code to another server with a different date-time format? The NOW() function is not dependant on your computer's datetime settings.
  11. Is the site hosted on a windows or unix box? Secondly, your table sizes does have a big impact when inserting data and updating the index for each insert. Processing power and memory play a big role here, but personally i have noted on a windows (2000 server) that mysql is not that resource intensive. Make sure your indexes are properly created and created on the correct fields which are used mostly in "where", "in" and "order" by clauses. Hope this helps.
  12. I tried this and it worked. I believe that because the original index.php included header.php, it keeps index.php's folder as the "root". INDEX.PHP ****************************** <?PHP echo "<BR>INDEX.PHP<BR>"; include("includes/header.php"); ?> HEADER.PHP ****************************** <?PHP echo "<BR>HEADER.PHP<BR>"; include("admin/menu.php"); ?> MENU.PHP ****************************** <?PHP echo "<BR>MENU.PHP<BR>"; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.