[PHP-DB] Cannot load module php_mysql.dl!!
Jonathan, this appears to be an FAQ. LOts of people have the same problem, here's my commentary from a couple of weeks ago- Regards: Colin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I spent some time experimenting with this to get it working, and came to some interesting conclusions, which the docs don't always help you with. Here's what I found- * The libmySQL.dll (note capitalisation) that comes with the mysql install will NOT work with Apache/PHP, at least with the versions I have. Only the libmysql.dll shipped with the PHP install works. I don't know what the reason is, it could be a version mismatch or maybe mysql and PHP are built using different compilers, but it's a problem. * I think if the lib shipped with mysql is first in your search path (but see below), it prevents the PHP-shipped one being seen, and prevents the module loading. * Some apps install elements in the path using shell variables, i.e.- PATH Entry Resolves To - %SystemRoot%\system32 C:\WINDOWS\system32 %ProgramFiles%\PHP C:\Program Files\PHP It looks like Apache and/or PHP have a problem with this, and fail to load DLLs if their path is specified using a variable. If you list the path directories explicitly, i.e.- C:\WINDOWS\system32;C:\Program Files\PHP it works ok. I can now keep my libmysql.dll file in the PHP install directory, rather than putting a copy in WINDOWS\system32. Nett of all this, is (for me), to get a working system I have: 1) In Apache httpd.conf: # # PHP 5 Support. # LoadModule php5_module C:/Program Files/PHP/php5apache2.dll AddType application/x-httpd-php .php 2) System PATH: C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\MySQL\bin;C:\Program Files\PHP 3) In C:\WINDOWS\php.ini: extension_dir = C:\Program Files\PHP\ext extension=php_mysql.dll 4) In C:\Program Files\PHP: The libmysql.dll supplied with the PHP install. Overall this is more than a bit obscure and error-prone. My initial impression is that Apache 2 is still fairly green, for instance on my machine after a couple of basic edits of the httpd.conf file I now find the server will crash if I use the Stop or Restart functions of the Apache Service Monitor. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] neebee: on table designs.
small tables are easier to maintain and grow and quicker to search. need more info about the data to really help. probably 1 main clients table with basic info and then 1 or more smaller tables that hold certain specifics bastien From: phpnews [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] neebee: on table designs. Date: Wed, 17 Nov 2004 07:05:27 - Hi All, I have 5000+ individual clients, each clients may have 100+ records. Each client can modify to their own records. In the order of maintenance, robustness, scalability then performance, which of the following do you think is best. i)1 big table with 50+ records ii)5000+ small tables with 100+ records (1 table for each client)? At first I thought (i) but then for robustness a colleague pointed out that on (ii) if clients screw up their own table it will not affect anyone else! any comments/suggestions are very much appreciated tony -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mysql db dump with php
I tried this but to no avail. What I surmise is that one of the following is holding this up from being an option. 1) I'm on a shared server so I will have to specify the location of the file to save in order to get to it afterwards. I tried specifying the path and the file name in the examples below but didn't get the resulting file as I expected. 2) Its possible that the web server does not have the command available as the mysql server is on another box, thus I won't be able to execute it. I am not familiar with mysql, so I'm not sure if this could be the case, is it possible to have the drivers and not the supporting utilities installed? 3) Somehow shell execution is not enabled (exec()). I do not think this is the case as I am not thrown an error. It would be possible though I would think that the php script process doesn't have access to execute that process maybe? Any suggestions or another method? Thanks a ton! Nate [EMAIL PROTECTED] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 12:11 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] mysql db dump with php On Wednesday 17 November 2004 13:51, Nate Nielsen wrote: i need a script that will connect to a db with a username and password, and then export to the screen scripts to both recreate the database structure (the create table commands) and then create insert statements to populate that information into the database. then of course, i need to run those scripts on the other server to create the db and populate it. From the command line of the system holding source database: mysqldump --opt -u username -p password nameofdatabase nameofdatabase.sql Now take the created file nameofdatabase.sql and place onto the system holding destination database. Then from the command line of the system holding destination database: mysql -u username -p password nameofdatabase.sql If you don't have direct access to the command line use php's program execution functions. if you can hook me up i'll paypal you $20 bucks to buy you and yours a few pints of your favorite ale on me. Donate it to your local Red Cross/Red Crescent or equivalent. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* Logoff in progress... */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mysql db dump with php
Nate, Don't know if this is the case or not, but the destination database has to already exist on the upload server. dave Nate Nielsen [EMAIL PROTECTED] 11/17/2004 10:08 AM To: [EMAIL PROTECTED] cc: Subject: RE: [PHP-DB] mysql db dump with php I tried this but to no avail. What I surmise is that one of the following is holding this up from being an option. 1) I'm on a shared server so I will have to specify the location of the file to save in order to get to it afterwards. I tried specifying the path and the file name in the examples below but didn't get the resulting file as I expected. 2) Its possible that the web server does not have the command available as the mysql server is on another box, thus I won't be able to execute it. I am not familiar with mysql, so I'm not sure if this could be the case, is it possible to have the drivers and not the supporting utilities installed? 3) Somehow shell execution is not enabled (exec()). I do not think this is the case as I am not thrown an error. It would be possible though I would think that the php script process doesn't have access to execute that process maybe? Any suggestions or another method? Thanks a ton! Nate [EMAIL PROTECTED] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 12:11 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] mysql db dump with php On Wednesday 17 November 2004 13:51, Nate Nielsen wrote: i need a script that will connect to a db with a username and password, and then export to the screen scripts to both recreate the database structure (the create table commands) and then create insert statements to populate that information into the database. then of course, i need to run those scripts on the other server to create the db and populate it. From the command line of the system holding source database: mysqldump --opt -u username -p password nameofdatabase nameofdatabase.sql Now take the created file nameofdatabase.sql and place onto the system holding destination database. Then from the command line of the system holding destination database: mysql -u username -p password nameofdatabase.sql If you don't have direct access to the command line use php's program execution functions. if you can hook me up i'll paypal you $20 bucks to buy you and yours a few pints of your favorite ale on me. Donate it to your local Red Cross/Red Crescent or equivalent. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* Logoff in progress... */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: neebee: on table designs.
Phpnews wrote: Hi All, I have 5000+ individual clients, each clients may have 100+ records. Each client can modify to their own records. In the order of maintenance, robustness, scalability then performance, which of the following do you think is best. i)1 big table with 50+ records ii)5000+ small tables with 100+ records (1 table for each client)? At first I thought (i) but then for robustness a colleague pointed out that on (ii) if clients screw up their own table it will not affect anyone else! any comments/suggestions are very much appreciated tony 1 table with clients 1 table with records -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: neebee: on table designs.
Thanks you all, Nate Nielsen I would say just from a basic normalization standpoint that you should definitely not do the 5000+ tables option. That would be an absolute mess to maintain. Surely you wouldn't want to join 5000 tables to search all of your clients either. yes that was a very good point. Thanks Sebastian Mendel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Phpnews wrote: Hi All, I have 5000+ individual clients, each clients may have 100+ records. Each client can modify to their own records. In the order of maintenance, robustness, scalability then performance, which of the following do you think is best. i)1 big table with 50+ records ii)5000+ small tables with 100+ records (1 table for each client)? At first I thought (i) but then for robustness a colleague pointed out that on (ii) if clients screw up their own table it will not affect anyone else! any comments/suggestions are very much appreciated tony 1 table with clients 1 table with records -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetimewww.sf.net/projects/phptimesheet -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] mysql db dump with php
if you have access to phpmyadmin, use that to dump the table and then re-import the created files in the server bastien From: Nate Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql db dump with php Date: Wed, 17 Nov 2004 10:08:43 -0600 I tried this but to no avail. What I surmise is that one of the following is holding this up from being an option. 1) I'm on a shared server so I will have to specify the location of the file to save in order to get to it afterwards. I tried specifying the path and the file name in the examples below but didn't get the resulting file as I expected. 2) Its possible that the web server does not have the command available as the mysql server is on another box, thus I won't be able to execute it. I am not familiar with mysql, so I'm not sure if this could be the case, is it possible to have the drivers and not the supporting utilities installed? 3) Somehow shell execution is not enabled (exec()). I do not think this is the case as I am not thrown an error. It would be possible though I would think that the php script process doesn't have access to execute that process maybe? Any suggestions or another method? Thanks a ton! Nate [EMAIL PROTECTED] -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 17, 2004 12:11 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] mysql db dump with php On Wednesday 17 November 2004 13:51, Nate Nielsen wrote: i need a script that will connect to a db with a username and password, and then export to the screen scripts to both recreate the database structure (the create table commands) and then create insert statements to populate that information into the database. then of course, i need to run those scripts on the other server to create the db and populate it. From the command line of the system holding source database: mysqldump --opt -u username -p password nameofdatabase nameofdatabase.sql Now take the created file nameofdatabase.sql and place onto the system holding destination database. Then from the command line of the system holding destination database: mysql -u username -p password nameofdatabase.sql If you don't have direct access to the command line use php's program execution functions. if you can hook me up i'll paypal you $20 bucks to buy you and yours a few pints of your favorite ale on me. Donate it to your local Red Cross/Red Crescent or equivalent. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* Logoff in progress... */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] PHP on an Windows intranet with MSOffice-like templates
yes, its possible. use www.fpdf.org to create the pdfs for you (gets around the word COM interface) and allows for database storage of template letters as text, simpler to maintain and change. FPDF will have some examples that will make this easy for you. Another option is to use straight html and php to create the letters, though multiple page letters become more problematical in terms of print control(headers and footers), which is weak in some browsers. bastien From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP on an Windows intranet with MSOffice-like templates Date: Tue, 16 Nov 2004 16:33:52 -0600 I don't even know if this is possible, or if I'll have to go the route of .NET development to get this sort of functionality (I'm sure it's possible if I jump through enough hoops). But here's what I'm trying to accomplish... - users are all on a local intranet with access to a shared drive (no prob) - users navigate a PHP-MySQL application to select records from a database (no prob) - users are able to click a link which will launch some sort of document (they have Office, but if something like PDF is available on a Windows platform, great) where a document template is fetched and updated with information from the selected record.(This is the part I don't understand how to do). An example... user wants to be able to print one of a variety of letters to physically mail to a customer, customized with the customer's account info. (You know: Dear [first name] [last name], ... Your account [account_id] ... is 30 days past due... etc ) This way, management can update the template and not have me re-work the code to have it work... Is such a thing possible on a windows PHP platform? Can someone point me to somewhere I can learn more about it? Thanks much, -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] validate/sanitize data
I need to add textarea input into a mysql database. The input can be anything you would find in normal paragraph text - [:alnum:][:punct:][:space:]. In this case it is likely that the input could also include special accent characters (grave, acute, tilde, etc. - ex. é). Is addslashes enough to reduce security/sql error issues (provided !get_magic_quotes_gpc())? Or should I try to strip or test for -- = . This input, due to its size, is obviously not going to be used in a WHERE clause. Todd Trent VP Hogfish Design 2550 26th Street West Bradenton, FL 34205 Tel: 941-749-0144 url: www.hogfishdesign.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] validate/sanitize data
see htmlentities function in the manual http://ca3.php.net/manual/en/function.htmlentities.php bastien From: Todd Trent [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] validate/sanitize data Date: Wed, 17 Nov 2004 15:06:55 -0500 I need to add textarea input into a mysql database. The input can be anything you would find in normal paragraph text - [:alnum:][:punct:][:space:]. In this case it is likely that the input could also include special accent characters (grave, acute, tilde, etc. - ex. é). Is addslashes enough to reduce security/sql error issues (provided !get_magic_quotes_gpc())? Or should I try to strip or test for -- = . This input, due to its size, is obviously not going to be used in a WHERE clause. Todd Trent VP Hogfish Design 2550 26th Street West Bradenton, FL 34205 Tel: 941-749-0144 url: www.hogfishdesign.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] validate/sanitize data
Todd Trent wrote: I need to add textarea input into a mysql database. The input can be anything you would find in normal paragraph text - [:alnum:][:punct:][:space:]. In this case it is likely that the input could also include special accent characters (grave, acute, tilde, etc. - ex. ). Is addslashes enough to reduce security/sql error issues (provided !get_magic_quotes_gpc())? Or should I try to strip or test for -- = . This input, due to its size, is obviously not going to be used in a WHERE clause. Use mysql_escape_string()/mysql_real_escape_string() instead of addslashes() and you'll be fine for inserting the data into the database. If you do not want any code within the text evaluated when you display it, run it through htmlentities()/htmlspecialchars() before displaying it (not before it's put in the database, though). http://us2.php.net/mysql_escape_string http://us2.php.net/htmlentities -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] validate/sanitize data
http://us2.php.net/mysql_escape_string http://us2.php.net/htmlentities thanks guys, great help. Todd Trent VP Hogfish Design 2550 26th Street West Bradenton, FL 34205 Tel: 941-749-0144 url: www.hogfishdesign.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP on an Windows intranet with MSOffice-like templates
You're welcome... Best regards, Ricardo Oliveira ---Original Message--- From: [EMAIL PROTECTED] Date: 11/17/04 00:02:48 To: Ricardo J. S. Oliveira Subject: Re: [PHP-DB] PHP on an Windows intranet with MSOffice-like templates You're my hero. Thanks! -P Quoting "Ricardo J. S. Oliveira" [EMAIL PROTECTED]: Why don't you try to define some templates but instead of using Office documents, use PDF ones, try using fpdf, a free php class to generate pdf's Regards, Ricardo Oliveira ---Original Message--- From: [EMAIL PROTECTED] Date: 11/16/04 23:24:24 To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP on an Windows intranet with MSOffice-like templates I don't even know if this is possible, or if I'll have to go the route of NET development to get this sort of functionality (I'm sure it's possible if I jump through enough hoops). But here's what I'm trying to accomplish... - users are all on a local intranet with access to a shared drive (no prob) - users navigate a PHP-MySQL application to select records from a database (no prob) - users are able to click a link which will launch some sort of document (they have Office, but if something like PDF is available on a Windows platform, great) where a document template is fetched and updated with information from the selected record.(This is the part I don't understand how to do). An example... user wants to be able to print one of a variety of letters to physically mail to a customer, customized with the customer's account info. (You know:Dear [first name] [last name], ... Your account [account_id] ... is 30 days past due... etc ) This way, management can update the template and not have me re-work the code to have it work... Is such a thing possible on a windows PHP platform?Can someone point me to somewhere I can learn more about it? Thanks much, -P -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: oci8 cannot connect after restarting DB
Hi This is because you are using persistent connections, which are left dangling and do not restart after the database restarts. Apparently you can hack your tnsnames.ora or oci8 extension. See http://bugs.php.net/bug.php?id=15390 and http://bugs.php.net/bug.php?id=30808 Regards, John Michael Caplan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Every evening, for whatever reason, our Oracle db (9.2.0) is restated. After it is restarted, I am unable to build a connection with Oracle from PHP untill Apache is restarted. Whenever I do an ociplogon() or ocilogon() following an Oracle DB restart, it fails but I am unable to get a description of the error. Restarting Apache fixes the problem. Has anyone else experianced the same issue? It appears to me that this is a php oci8 bug. (shouldn't a new connection be built if a persistant connection fails, and if not using persistant connections, shouldn't this be a non issue?) Thanks, Michael -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php