[PHP-DB] Re: PostgreSQL connection
take a look at your postgresql.conf config optimize request and test your requests "Joe Nilson Zegarra Galvez" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, i have a question, i have a php file with all my class to > connect into a postgresql db and i'm using the pg_connect in this form: > > pg_connect("192.168.1.100","","","",$dbase); > > but when i have 8 or 10 users inserting data the db response is very > slow, is problem in the pg_connect?, all ppl use the same file_class.php > to connect to the db. > > The SErver is a Compaq Proliant with two Xeon 2.20Ghz Processors, 1Gb > Memory, 20Gb SCSI HD, 1Gb Ethernet and Redhat Linux with apache 2.0.47, > php 4.2.2 and PostgreSQL 7.2.2 > > Thankx for your answers > > Regards > > > Nilson > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Maximum execution time of 30 seconds exceeded
http://ca2.php.net/manual/fr/function.set-time-limit.php thats it... Stephane Tessier - dev team leader Above Security "Michael Cortes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I am using the Konqueror browser and browing to http://localhost/my.php Howerver, the script I wrote, doing various queries and lookups, inserts, etc.. takes a while to complete. That is fine with me. I'll wait. However, the server and/or browser will not wait. I believe the server is the one which will not wait because I have one "echo" line at the beginning of the script which put a title "Udate Students" athe the top center of the page and that writes then there is a pause while the queries are run and then I get the following error in my browser Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/student_info/ps2follett.php on line 139 Can anyone help? -- Michael Cortes Fort LeBoeuf School District 34 East Ninth Street PO Box 810 Waterford PA 16441-0810 814.796.4795 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: adding integer to field in query
is the field null ??? - make sure it has zero as a default value John Dillon wrote: How do you add a number to a field within the query, ie without having to extract? Eg $query="UPDATE Choice SET visits=(visits+1) WHERE ID='$thisID'"; is the above "visits=(visits+1)" legal, cos it doesn't work at the moment? Thanks, John http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: mount command with php in through the web
check out webmin http://www.webmin.com this allows you to administer thewhole server over the web ;-) Suman Aluru wrote: Hi All, is there any way i can run mount command with php script in the web , bcz. mount command run only for super user as apache user is there any way to run. plz. help me in this regard. Thank You, Suman -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: PHP Oci8 segmntation fault
Hi, Thanks for the help. I will try this, althought i compiled php with-oracle and Oracle functions work ok with php even in command line. Now, only i have problem with calling oracle stored procedures that return resultset in cursor. I knew how to do it in oci functions, but i dont know how to make it in php+oracle functions. Anybody can help me about it? Radovan "Lang Sharpe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Radovan > > Here are some suggestions > > Make sure $ORACLE_HOME is set in your environment. There may be other > environment variables that the environment needs as well that are set for > the webserver process, but not when you run the command line version. > > PHP 4.3.2 has a bug in it that causes php to crash with oracle support. Try > adding > > #undef HAVE_OCI8_SHARED_MODE > > near the top of ext/oci8/oci8.c > > If your getting a core dump, then you can compile php with --enable-debug as > a configure option. run the script again and use gdb to get a backtrace. > There are instructions for doing this are at > http://bugs.php.net/bugs-generating-backtrace.php > This probably wont solve your problem, but is fun to do anyway. > > Lang > > > Radovan Radic wrote: > > > Hello > > > > I have php 4.3.2 installed as apache 2.0.45 module on RH Linux (7.3) with > > oci8 support. > > Things work fine when php scripts are accessed via web, but when i try to > > start them from command line using > > /usr/local/php4.3.2/bin/php test.php i get an error > > Segmentation fault. > > test.php has only 4-5 lines, for connecting to oracle, and printing data > > from one table, using same class as pages on the web. > > > > Anyone can help? > > > > Thanks, > > Radovan > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] changing properties of an image dynamicly
Hi, how can I change the size-properties of an image that I take from a database dynamicly to a new format. The original picture can be different in size and should become a new fixed size. Also interessting for me is when I have s list of pictures with different original size and I will reduze the size to display all the pictures of the list but if there are more pictures the picutures are smaller than the list have less entries. This are two seperate questions. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Transferring MySQL data.
This is probably a stupid question, but I'm pretty new at this! Having built test MySQL databases for my website on my home machine, is it possible to transfer the data straight to a web hosting company's server or do I need to rebuild the databases again from scratch? Thanks for any input, Hugh Dickinson
[PHP-DB] AGONIZING Mysql Select DB issue.
Here's the stats: Two servers: Server 1, Mysql 4.0.12, PHP 4.3.2, apache 1.3.27 Server 2, Mysql 4.0.14, PHP 4.3.2, apache 1.3.27 My HTTP is setup on Server 2 (and server 1 as well) I'm setting up a mirror on Server 2 and it connects to the DB on server 1. Privs are setup that user has DB access to server 1 from 2 and all that. I've been working on this for over 2 hours so I am sorry for being very clear. My connection string in PHP connects to server 1's DB and then I have a mysql_select_db() command to select the database. My debugging code shows that I'm selecting the right DB (let's call it db1) and it returns true as if it selected fine. However, whenever I do a query I get an error like "Table 'db2.mytable' doesn't exist" (Notice db2 not db1) (there are like 30 databases on here I'm just using these two as an example). It's latching onto the wrong database! Now I get this error if I enable "Select_Priv" in the User table, if I turn that off and rely only on the privs in the 'db' table I get "select command denied to user: '[EMAIL PROTECTED]' for table 'mytable'" because it's attempting to do a select on db2 not 1. I don't know why. The ONLY way I have been able to work around this issue is before I call the SQL query I have to add db1.mytable to every call to the table. I.e. Adding "db1" to the beginnign. Then it works around the call to the wrong database. This cannot happen all the time. The application is very extensive and the code is shared between sites so I can't just do this. Does anyone have any clue why even though I'm calling mysql_select_db("db1") it still tries to gather data from "db2"? This only happens when I'm connecting from Server 2 to server 1 it does not happen any other time. Incidentally it doesn't happen when I'm connecting from server 2 to another server running mySQL 3.23.54 there is no problem at all. I'm thinking it's a permissions system or something funky with MySQL 4 but I don't know for sure. Any ideas? -- Thomas Deliduka IT Manager - Xenocast Street Smart Media Solutions http://www.xenocast.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Transferring MySQL data.
Hugh, Nothing is a stupid question. you can transfer databases by doing a Machine# mysqldump -a -c -p insert_db_name_here > backup.sql on your home machine, and then doing a Machine_prod# mysqladmin -p create database_name Machine_prod# mysql -p database_name < backup.sql after you have transferred the backup file to your production box. If you need anything else, let me know --James Hughbanks Mikro-Data Engineering Dept. [EMAIL PROTECTED] 1-866-457-6287 http://www.mikro-data.net On Friday, Aug 15, 2003, at 17:28 America/New_York, Hugh Dickinson wrote: This is probably a stupid question, but I'm pretty new at this! Having built test MySQL databases for my website on my home machine, is it possible to transfer the data straight to a web hosting company's server or do I need to rebuild the databases again from scratch? Thanks for any input, Hugh Dickinson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] AGONIZING Mysql Select DB issue.
If you are doing this: $dbh = mysql_connect("db1", blah blah blah); $dbh2 = mysql_connect("db2", blah blah blah); Then $r = mysql_query("select * from mytable"); will use the db2 connection, because it is the most recent. However, if you do this: $r = mysql_query("select * from mytable", $dbh); it will use the first connection, as specified in the handle that is passed back by mysql_connect. mysql_query uses the most recent connection by default; you can override this action by specifying which DB handle to use for a given query. Replace $dbh with $dbh2 to select from tables on the second database. Peter On Fri, 15 Aug 2003, Thomas Deliduka wrote: > Here's the stats: > > Two servers: > > Server 1, Mysql 4.0.12, PHP 4.3.2, apache 1.3.27 > Server 2, Mysql 4.0.14, PHP 4.3.2, apache 1.3.27 --- Peter Beckman Internet Guy [EMAIL PROTECTED] http://www.purplecow.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php