Re: [PHP-DB] RE: [PHP-WIN] Re: Need Help in setting up a server
u can do one more thing, u need to get a public ip or a static ip from ur ISP, this will make sure that u have a constant ip on ur machine so that it can be accessed from anywhere.. Chaitanya On Wed, Jun 30, 2010 at 2:10 AM, Warren Vail war...@vailtech.net wrote: The IP you cited Is the IP provided by your router or modem, and not one others from out side can use to access your server. Now on the other side of that, if you go to the machine that has the WAMP installed and open a browser and point it to http://what.is.my.ip.com; you may see the public IP for that machine, which can be used for linking to your server, but is not guaranteed to stay with that machine depending on powering up and down of your systems, and your ISP's procedures for assigning IP's. Hope this helps, Warren Vail Vail Systems Technology -Original Message- From: nagendra prasad [mailto:nagendra802...@gmail.com] Sent: Tuesday, June 29, 2010 1:12 PM To: phpexpe...@yahoogroups.com; PHP DB; php mysql; php-wind...@lists.php.net Subject: [PHP-WIN] Re: Need Help in setting up a server Hi all, Thanks everyone. I just tried all of your suggestions and found that WAMP server is working by using the running WAMP server's system IP. I just typed 192.168.1.4 in the address bar and its working now. So, I came to a conclusion that if I have a static IP then I can access it from out side as well right. Correct me if I am wrong ?? So, if I am right is it possible to run a server from home ?? Best, Guru. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Need Simple PHP mysql search engine script
most of the users use this for the search engine.. http://www.sphider.eu/ Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'. On Sun, May 23, 2010 at 11:54 PM, nagendra prasad nagendra802...@gmail.comwrote: Hi All, I need a simple PHP mysql search engine script. I know their are lots of scripts available on the net, but I need a script which is tested by you or any experts. Please help me. Best, Guru.
Re: [PHP-DB] Need Help in error msg
it means the root user password which u are using is the wrong one.. Chaitanya On Tue, May 18, 2010 at 12:49 PM, nagendra prasad nagendra802...@gmail.comwrote: Hi All, I am getting this error while tried to run a downloaded script in WAMP: [1045] dbconn: mysql_connect: Access denied for user 'root'@'localhost' (using password: YES) Dose anyone know what exactly this means. Best, Guru.
Re: [PHP-DB] form help
yes i realize that so this the reason i asked for the ajax.. so can u help me with that Chaitanya On Sat, May 15, 2010 at 4:32 PM, lists-php replies-lists-b3z1-...@listmail.innovate.net wrote: PHP is server-side, so the only way (strictly within php) to get a second drop-down to change after a selection has been has been made on a first drop-down is to submit the page (back to the server). You can do what you're after with javascript/ajax, as you seem to realize, but not in a php-only context. - Richard Original Message Date: Saturday, May 15, 2010 03:54:29 PM +0530 From: Chaitanya Yanamadala dr.virus.in...@gmail.com To: php-db@lists.php.net, bang-ph...@yahoogroups.com Subject: [PHP-DB] form help hai i need to develop a form in which there are two drop down boxes. depending on the selection of the first drop down box the other box should be changed.. like that of ajax.. both the boxes get their options from the mysql database.. the code is available at http://pastebin.com/1cW10VHL the mysql database is here http://pastebin.com/5KrkRHku the code is named as employee.php if it is php extension then it is only showing till team option and the rest are not showing.. if i change the extension to html then it is showing all the values but my php code is nt working.. Regards Chaitanya End Original Message
Re: [PHP-DB] Major Cookie Problem
On 5/13/10, Barry Zimmerman barryzi...@googlemail.com wrote: Its only happening in safari with the cookie not being set. It must be my cookie string that is the problem. I just cannot find anything on the issue. My other major issue is the fact that the session is being set when the post has not even been declared, its just setting the session? Hai I think it is a problem with the safari And also check whether u r sending any html tags before ur sending the cookies. The other case could be with ur browser Goto preferences -security-accept cookies in d browser and check the button always and then exit browser Now check that Regarding ur second problem session starting before posting the vales it is might be coz of the old session that is existing whenu ran last time so do some thing like delete all cookies and sessions from the browser and try also make sure that u dont have a session start in the database connection php file -- Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] how to upgrade php in linux
I apologize guys for being rude.. i know that u guys are helping me out, but i was in a typical awkward position searching for the same things made me a little restless. coming to the point i have posted the question to the centos list as well as suggested by dan.. but still now i could not able to find an absolute solution for what i am searching for.. Chaitanya On Wed, May 5, 2010 at 7:38 PM, Dan Carl d...@bluestarshows.com wrote: On 5/5/2010 12:02 AM, Chaitanya Yanamadala wrote: hai dan thank you for your suggestion regarding the google thing.. thank god u said me that or else i could have never known that google will get me all the results. dude i just asked this question thinking that some one would help me find the solution not for fun. regarding the thing of compiling i require it to be done, I gave you a link to the Centos list archives so you could search there before posting to the Centos list. The reason I suggested using Google's site search function is that the list archives has no search function of its own. Not many people know you can use google to search only a particular site or branch of a site. I pointed it out is because after sending folks to the list archives the next question is, how do I search the archives. I see you're finally posting Centos questions to the Centos list not the PHP list. Good luck getting help with your attitude.
Re: [PHP-DB] how to upgrade php in linux
hai bavitra i have read the article from this site http://www.web-tech-india.com/articles/php/compiling_php_apache/ but actually the thing is it is not working for me.. it is giving me some error like this checking for gcc ---no checking for cc--no configure: error: no acceptable cc found in $PATH.. this tells me that the i am missing the cross compiler from my machine but i dont have an idea from where can i get this.. Chaitanya On Tue, May 4, 2010 at 8:45 PM, Bavithra R bavithr...@gmail.com wrote: i have downloaded the tar file from php.net but dont know how to complile the same for the linux. Hi Chaitanya As you have downloaded the tar file you need to extract it. Try this *Extraction: *tar -jxvf php-5.3.2.tar.bz2 where php-5.3.2.tar.bz2 is the filename you downloaded. Check to the file extension whether it is .bz2 If not use tar --help which provides the extraction options. Then you need to configure it.For that * configuration: * ./configure --prefix==/usr/local/php I hope this works.Try and see regards --Bavithra
Re: [PHP-DB] how to upgrade php in linux
hai dan thank you for your suggestion regarding the google thing.. thank god u said me that or else i could have never known that google will get me all the results. dude i just asked this question thinking that some one would help me find the solution not for fun. regarding the thing of compiling i require it to be done, hai kesavan thank you for the help i have done that search and i found the things but the thing is that it is an old version of the gcc that is still exisiting in the yum repository. i require one dependancy apr-1.3.3 for the compiling of httpd 2.3.5 which i have found out, but the thing is that it requires two more dependancies uname =2.6 and rpmlib=4.4.6 which are not available in the yum repo.. i better try to do this on my own.. thank you guys for your help Chaitanya On Wed, May 5, 2010 at 1:53 AM, Kesavan Rengarajan k...@trk7.com wrote: As someone else mentioned in the list, try the remi repository. If you still want to compile from source, then this is what you do to search for packages: yum search packagename So you would be doing: yum search gcc and then install the missing package before compiling php. You may have to install a few missing packages and it's not really a lot of fun :(. Also, I would like to let you know if you are going to be using Zend Framework, you better stick with the 5.2 series as I know that there are a few issues with 5.3 and ZF. There are a few other bugs that forced me to downgrade to 5.2. Sent from my iPhone On 05/05/2010, at 4:59 AM, Chaitanya Yanamadala dr.virus.in...@gmail.com wrote: hai bavitra i have read the article from this site http://www.web-tech-india.com/articles/php/compiling_php_apache/ but actually the thing is it is not working for me.. it is giving me some error like this checking for gcc ---no checking for cc--no configure: error: no acceptable cc found in $PATH.. this tells me that the i am missing the cross compiler from my machine but i dont have an idea from where can i get this.. Chaitanya On Tue, May 4, 2010 at 8:45 PM, Bavithra R bavithr...@gmail.com wrote: i have downloaded the tar file from php.net but dont know how to complile the same for the linux. Hi Chaitanya As you have downloaded the tar file you need to extract it. Try this *Extraction: *tar -jxvf php-5.3.2.tar.bz2 where php-5.3.2.tar.bz2 is the filename you downloaded. Check to the file extension whether it is .bz2 If not use tar --help which provides the extraction options. Then you need to configure it.For that * configuration: * ./configure --prefix==/usr/local/php I hope this works.Try and see regards --Bavithra
[PHP-DB] how to upgrade php in linux
Hai i have installed php in the cent os 5.4. the one which is installed is 5.1.6 now what i want to do is upgrade it to latest one 5.3.2, as i am new to linux environment it is quite hard for me to configure that, can any one guide me with this also one more thing is that i need to install zend framework in the same environment, any help would be greatly appreciate.. regards Chaitanya
Re: [PHP-DB] how to upgrade php in linux
hai david the rpm available is for this is the one which i am having that is the latest one. but i require to install the 5.3.2 for some more extenstions to be working. i have downloaded the tar file from php.net but dont know how to complile the same for the linux. i am pretty new to the linux.. so cannot able to figure out how to do the same.. Chaitanya On Mon, May 3, 2010 at 6:15 PM, David McGlone da...@dmcentral.net wrote: On Monday 03 May 2010 07:02:35 Chaitanya Yanamadala wrote: Hai i have installed php in the cent os 5.4. the one which is installed is 5.1.6 now what i want to do is upgrade it to latest one 5.3.2, as i am new to linux environment it is quite hard for me to configure that, can any one guide me with this also one more thing is that i need to install zend framework in the same environment, any help would be greatly appreciate.. I have no experience with CentOS but I'm pretty sure it would have a package manager similiar to apt-get, or yum. If CentOS uses RPM then you could go download php 5.3.2 off the web and then open a terminal and type: root (to login as root) password (enter root password) change the directory to where you saved the file: cd /path/to/where/the/file/is rpm -Uvh ( enter name of the package that you downloaded here and omit the parenthesis ) -- Blessings, David M. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] how to upgrade php in linux
hai kesavan the latest rpm is what i have installed already. but i require the php 5.3.2 to be installed so where can i get the rpm for that i hve used the yum search php which is giving me the 5.1 only.. Chaitanya On Mon, May 3, 2010 at 6:54 PM, Kesavan Rengarajan k...@trk7.com wrote: Add DAG and RPMForge repos (google for how to) and try to do a yum install.Compiling from source might not be the best option if you are new to Linux. Sent from my iPhone On 03/05/2010, at 10:57 PM, Chaitanya Yanamadala dr.virus.in...@gmail.com wrote: hai david the rpm available is for this is the one which i am having that is the latest one. but i require to install the 5.3.2 for some more extenstions to be working. i have downloaded the tar file from php.net but dont know how to complile the same for the linux. i am pretty new to the linux.. so cannot able to figure out how to do the same.. Chaitanya On Mon, May 3, 2010 at 6:15 PM, David McGlone da...@dmcentral.net wrote: On Monday 03 May 2010 07:02:35 Chaitanya Yanamadala wrote: Hai i have installed php in the cent os 5.4. the one which is installed is 5.1.6 now what i want to do is upgrade it to latest one 5.3.2, as i am new to linux environment it is quite hard for me to configure that, can any one guide me with this also one more thing is that i need to install zend framework in the same environment, any help would be greatly appreciate.. I have no experience with CentOS but I'm pretty sure it would have a package manager similiar to apt-get, or yum. If CentOS uses RPM then you could go download php 5.3.2 off the web and then open a terminal and type: root (to login as root) password (enter root password) change the directory to where you saved the file: cd /path/to/where/the/file/is rpm -Uvh ( enter name of the package that you downloaded here and omit the parenthesis ) -- Blessings, David M. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sharing happiness!!
Are promotional messages a part of the PHP-DB Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'. On Thu, Apr 22, 2010 at 3:18 AM, nagendra prasad nagendra802...@gmail.comwrote: Dear friend, I get good news. rictrade now has a big promotion. Every day the first 100 customers will be offered 50% discount for its all products. Besides, they accept payment via credit cards for customers’ convenience. It is very nice, isn’t it? Let’s have a look at www.rictrade.org -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Sharing happiness!!
So does that mean if i am able to send an email using ur email id then i can force send any message i like to the php-db list. even it has links. coz i have tried replying to a query with a link and it bounced back to me.. How far this one is safe. Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... The difference between 'involvement' and 'commitment' is like an eggs-and-ham breakfast: the chicken was 'involved' - the pig was 'committed'. On Thu, Apr 22, 2010 at 10:42 AM, Karl DeSaulniers k...@designdrumm.comwrote: Well what's weird is that the person who it says sent it is someone who helped me with a PHP problem. So that means the spammers are spoofing our email addresses to send their spam. Not to mention this spam email had all our email addresses in the to field. Anyone who got this email now has all the emails of the list or as many were in the To field. Not kool. Karl On Apr 21, 2010, at 11:56 PM, Chris wrote: Chaitanya Yanamadala wrote: Are promotional messages a part of the PHP-DB No, it's spam that got through the filters. Thankfully we don't get many of them. -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mySQL date query
what is the format of the date u are storing ? Chaitanya On Tue, Apr 13, 2010 at 11:50 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am trying to write a mySQL query on my stats table. I am trying to determine the number of records (users) during a 7 day period ending yesterday. I always to keep it current ... Yesterday will keep changing. In other words I want to know the number of users who accessed the web site during seven full days. This is the beginning of the query. The date column is date. SELECT count(`visits`) as users FROM `stats` WHERE `date` Thanks, Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mySQL date query
try this SELECT DATE_ADD('2008-01-02', INTERVAL -7 DAY); Chaitanya On Tue, Apr 13, 2010 at 12:01 PM, Ron Piggott ron.pigg...@actsministries.org wrote: It is in a 'date' column type -MM-DD what is the format of the date u are storing ? Chaitanya On Tue, Apr 13, 2010 at 11:50 AM, Ron Piggott ron.pigg...@actsministries.org wrote: I am trying to write a mySQL query on my stats table. I am trying to determine the number of records (users) during a 7 day period ending yesterday. I always to keep it current ... Yesterday will keep changing. In other words I want to know the number of users who accessed the web site during seven full days. This is the beginning of the query. The date column is date. SELECT count(`visits`) as users FROM `stats` WHERE `date` Thanks, Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mysql/php time out issue
have u checked max_execution_time Chaitanya On Fri, Apr 9, 2010 at 7:17 PM, Stephen Sunderlin stephen.sunder...@verizon.net wrote: I'm running php 5.1.6 with mysql 5.0.45 on CentOS 5.3 box trying to loop through a while statement to send about 3000 email using phpmailer. It's worked well in the past but after an upgrade it seems to be timing out now after 200-300 emails over 1 minute or two. I've added set_time_limit(30) within the while loop to reset the time out. I've added a sleep(1) statement to throttle the program (I've tried sending with and without these additions). I've altered several config files to see if it would send to completion to no avail: mysql.connect_timeout = -1 memory_limit = 100M max_input_time = 60 max_input_time = 600 max_input_time = 0 and the following mysql config: key_buffer = 256M max_allowed_packet = 50M table_cache = 1024 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 64 tmp_table_size = 40M join_buffer_size = 1M query_cache_limit = 12M query_cache_size= 32M query_cache_type = 1 max_connections = 60 thread_stack = 128K thread_concurrency = 4 Any where else I should be looking. Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] mysql/php time out issue
these are the entire core values of mine try making a replica of the required.. i am able to send for 3 mails. are u using an smtp sever to send mails.. allow_call_time_pass_referenceOnOn allow_url_fopenOnOn allow_url_includeOnOn always_populate_raw_post_dataOffOff arg_separator.input arg_separator.outputamp;amp; asp_tagsOffOff auto_append_file*no value**no value* auto_globals_jitOnOn auto_prepend_file*no value**no value* browscap C:\xampp\php\extras\browscap.iniC:\xampp\php\extras\browscap.ini default_charset*no value**no value* default_mimetypetext/htmltext/html define_syslog_variablesOffOff disable_classes*no value**no value* disable_functions*no value**no value* display_errorsOnOn display_startup_errorsOnOn doc_root*no value**no value* docref_ext*no value* *no value* docref_root*no value**no value* enable_dlOnOn error_append_string *no value**no value* error_log*no value**no value* error_prepend_string*no value**no value* error_reporting2251922519 exit_on_timeoutOffOff expose_php OnOn extension_dirC:\xampp\php\extC:\xampp\php\ext file_uploadsOnOn highlight.bg#FF#FF highlight.comment#FF8000#FF8000 highlight.default #BB#BB highlight.html#00#00 highlight.keyword#007700#007700 highlight.string#DD#DD html_errorsOnOn ignore_repeated_errorsOffOff ignore_repeated_sourceOffOff ignore_user_abortOffOff implicit_flushOffOff include_path.;C:\xampp\php\PEAR.;C:\xampp\php\PEAR log_errorsOffOff log_errors_max_len10241024 magic_quotes_gpcOnOn magic_quotes_runtimeOffOff magic_quotes_sybaseOffOff mail.add_x_headerOffOff mail.force_extra_parameters*no value**no value* mail.log*no value**no value* max_execution_time60006000 max_input_nesting_level6464 max_input_time600600 memory_limit128M128M open_basedir*no value**no value* output_buffering*no value**no value* output_handler*no value**no value* post_max_size128M128M precision1414 realpath_cache_size16K16K realpath_cache_ttl120120 register_argc_argvOnOn register_globalsOffOff register_long_arraysOffOff report_memleaksOnOn report_zend_debugOnOn request_order*no value**no value* safe_modeOffOff safe_mode_exec_dir*no value**no value* safe_mode_gidOffOff safe_mode_include_dir*no value**no value* sendmail_from*no value**no value* sendmail_path*no value**no value* serialize_precision100100 short_open_tagOn On smtp_port2525 sql.safe_modeOffOff track_errorsOffOff unserialize_callback_func*no value**no value* upload_max_filesize128M128M upload_tmp_dirC:\xampp\tmpC:\xampp\tmp user_dir*no value**no value* user_ini.cache_ttl300300 user_ini.filename.user.ini.user.ini variables_order GPCSGPCS xmlrpc_error_number00 xmlrpc_errorsOffOff y2k_complianceOnOn zend.enable_gcOnOn Chaitanya On Fri, Apr 9, 2010 at 8:20 PM, Stephen Sunderlin stephen.sunder...@verizon.net wrote: Set that to 6oo. Stopped after 125 loops in under a minute. _ Stephen Sunderlin 2162 Broadway, 4th Fl. New York, NY 10024 (212) 799-3753 -Original Message- From: Chaitanya Yanamadala dr.virus.in...@gmail.com Date: Fri, 09 Apr 2010 19:26:22 To: Stephen Sunderlinstephen.sunder...@verizon.net Cc: php-db@lists.php.net Subject: Re: [PHP-DB] mysql/php time out issue have u checked max_execution_time Chaitanya On Fri, Apr 9, 2010 at 7:17 PM, Stephen Sunderlin stephen.sunder...@verizon.net wrote: I'm running php 5.1.6 with mysql 5.0.45 on CentOS 5.3 box trying to loop through a while statement to send about 3000 email using phpmailer. It's worked well in the past but after an upgrade it seems to be timing out now after 200-300 emails over 1 minute or two. I've added set_time_limit(30) within the while loop to reset the time out. I've added a sleep(1) statement to throttle the program (I've tried sending with and without these additions). I've altered several config files to see if it would send to completion to no avail: mysql.connect_timeout = -1 memory_limit = 100M max_input_time = 60 max_input_time = 600 max_input_time = 0 and the following mysql config: key_buffer = 256M max_allowed_packet = 50M table_cache = 1024 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 64 tmp_table_size = 40M join_buffer_size = 1M query_cache_limit = 12M query_cache_size= 32M query_cache_type = 1 max_connections = 60 thread_stack = 128K thread_concurrency = 4 Any where else I should be looking. Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Online PHP-Mysql Meeting
Guys i think u can use either Google wave or EtherPad for this purpose. Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... I would love to change the world, but I can't get the source code. On Thu, Mar 18, 2010 at 4:16 PM, nagendra prasad nagendra802...@gmail.comwrote: Hi All, As we are discussing about how to roll out this meeting from past 3-4 days Taygun ALBAN has raised an important point about the meeting (Thanks Taygun for pointing out this). As we all know we don't live in the same country, so their will be some difference between each one's time zone. Taygun has pointed out that we all are from different time zone so how we are going to roll out this meeting? Guys please pitch in and think about this issue. We will have to come with some solution so that all of us can attend this meeting. Also, I think now its time to decide a date for the meeting. Please suggest a date as well. Best, Guru.
Re: [PHP-DB] 64-bit Linux -- Fatal ... undefined function mysql_connect()
hai andrew Can u try like changing the ini file like this.. under mysql change the to mysql.default_port 3306 3306 and also if this time too it is not getting connected to the socket try using the mysqli construct to connect to database.. this is for your reference http://php.net/manual/en/mysqli.connect.php Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... I would love to change the world, but I can't get the source code. On Tue, Mar 2, 2010 at 10:24 AM, andrew jarcho andrew.jar...@gmail.comwrote: Hello all, I'm running Fedora 12 (64-bit), Apache 2.2.14, PHP 5.3.1, MySQL 5.1.42, on a Dell laptop. I'm trying to access a local MySQL database using PHP. When I execute this code from the shell (as: php testcode.php) ?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); ? I get the message: Fatal error: Call to undefined function mysql_connect() The FAQ on the PHP site says: Unix users, at least the ones who know what they are doing, tend to always build PHP against their system's libmysqlclient library simply by adding the --with-mysql=/usr option when building PHP. But I'd like to avoid compiling PHP from source. I've had endless trouble getting non-rpm code to play nice with this 64-bit distro of Fedora. Also, I don't want to wind up with multiple copies of PHP (or MySQL, or Apache). A reply to an earlier poster read: == It sounds like the MySQL extension module isn't loading. Here are some things to confirm: - Ensure the module is declared in your php.ini file - If it exists in the php.ini, confirm the module is located and named as stated in the php.ini file. - If the module is named and located in the proper place, check your permissions on that extension. You want to make sure whatever is running your site can access the module. === I've tried obeying the above instructions, with no luck. I'm also confused by the lines in php.ini: ; Note: packaged extension modules are now loaded via the .ini files ; found in the directory /etc/php.d; these are loaded by default. As guides, I initially used the following two pages: http://forums.fedoraforum.org/showthread.php?t=94257 (Title: Every server setup imaginable) http://www.somacon.com/p109.php (Title: Resolving a Fatal error: Call to undefined function mysql_connect() in RedHat) and have been reading the PHP and MySQL documentation. As per the Fedora Forum thread, I have executed: yum install php httpd system-config-httpd mod_ssl as well as: yum install mysql-server mysql mysql-gui-tools and: yum install php-mysql I've also tried altering /etc/php.ini with extension_dir = /usr/lib64/php/modules/ which is where my mysql.so is found, and extension=mysql.so The output of my phpinfo() includes: mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version5.1.42 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE-I/usr/include/mysql MYSQL_LIBS -L/usr/lib64/mysql -lmysqlclient Directive Local Value Master Value mysql.allow_local_infileOnOn mysql.allow_persistent OnOn mysql.connect_timeout 6060 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket/var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistentUnlimited Unlimited mysql.trace_modeOff Off mysqli MysqlI Support enabled Client API library version 5.1.42 Active Persistent Links 0 Inactive Persistent Links 0 Active Links0 Client API header version 5.1.39 MYSQLI_SOCKET /var/lib/mysql/mysql.sock Directive Local ValueMaster Value mysqli.allow_local_infile On On mysqli.allow_persistentOn On mysqli.default_hostno value no value mysqli.default_port3306 3306 mysqli.default_pw
Re: [PHP-DB] Getting total quantities
Have you tried using it like this *select count(*) from products;* Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... On Mon, Feb 15, 2010 at 10:39 AM, Karl DeSaulniers k...@designdrumm.comwrote: Would it be? $q = SUM(ProductStock) FROM products; or $q = SELECT SUM(ProductStock) AS ProductStock FROM products; if I want to return $ProductStock as the value? Karl On Feb 14, 2010, at 10:55 PM, Karl DeSaulniers wrote: Hello List, I have a situation where I want to figure out the total number of products in my database. I want to read all the fields $ProductStock and add them together to get the TOTAL number of products, not just the number of rows in my database. Any pointers on the code to use for adding multiple rows field values? EG: Say I have three individual products and Product one has 10 and Product 2 has 20 and Product three has 5, and these values are set in the field $ProductStock, I want to get the result of 35 and not 3. Any help is appreciated. TIA Karl DeSaulniers Design Drumm http://designdrumm.com Karl DeSaulniers Design Drumm http://designdrumm.com
Re: [PHP-DB] Getting total quantities
*Hai Chris I already send him the right one. But my mail has been blocked by the php lists. so i send a personal mail for him... FYI SELECT SUM(ProductStock) FROM products; * if u want to give an other name for the row then use it as * ** SELECT SUM(ProductStock) as stock FROM products;* Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... On Mon, Feb 15, 2010 at 11:02 AM, Chris dmag...@gmail.com wrote: Karl DeSaulniers wrote: Would it be? $q = SUM(ProductStock) FROM products; or $q = SELECT SUM(ProductStock) AS ProductStock FROM products; if I want to return $ProductStock as the value? This one. The AS gives it an alias (or shortcut) to make it easier to find in mysql_fetch_array etc. -- Postgresql php tutorials
Re: [PHP-DB] Upload_File
hai farooq I think the issue is with the max_execution_time in the php.ini of the server. try modifying this to the maximum level. also for your code i have modified this a little bit.. *form enctype=multipart/form-data action=upload.php method=POST input type=hidden name=MAX_FILE_SIZE value= / Choose a file to upload: input name=uploaded type=file /br / input type=submit name=submit_x value=Upload File / /form ?php //Working for uploading the files of a particular type if(isset($_POST['submit_x'])) { function file_upload_error_message($error_code) { switch ($error_code) { case 0: return 'There is no error, the file uploaded with success...'; case 1: return 'The uploaded file exceeds the upload_max_filesize directive in php.ini'; case 2: return 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'; case 3: return 'The uploaded file was only partially uploaded'; case 4: return 'No file was uploaded'; case 6: return 'Missing a temporary folder'; case 7: return 'Failed to write file to disk'; case 8: return 'File upload stopped by extension'; default: return 'Unknown upload error'; } } $host=localhost; $user=root; $pass=admin; $db=develop; mysql_connect($host,$user,$pass) or die(mysql_error()); mysql_select_db($db) or die(mysql_error()); $query=select type_name from filetype; $result=mysql_query($query); ini_set(display_errors,1); //error_reporting(E_ALL); $target = upload/; $target = $target . basename( $_FILES['uploaded']['name']) ; $uploaded_type=strtolower(substr($_FILES['uploaded']['name'],strrpos($_FILES['uploaded']['name'],'.')+1)); print_r($_FILES['uploaded']); $error_code=$_FILES['uploaded']['error']; $error_message = file_upload_error_message($error_code); echo Name .$_FILES['uploaded']['name'].br; echo Type .$_FILES['uploaded']['type'].br; echo Error .$error_message.br; echo Size .$_FILES['uploaded']['size'].br; //echo brFileX .$uploaded_type; while($row = mysql_fetch_array($result)) { if($uploaded_type==$row['type_name']) { if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo The file . basename( $_FILES['uploaded']['name']). has been uploaded; break; } else { echo Sorry, there was a problem uploading your file.; } } } } ?* and this should be the table format * DROP TABLE IF EXISTS `filetype`; CREATE TABLE `filetype` ( `type_name` varchar(10) NOT NULL default '', PRIMARY KEY (`type_name`) ) TYPE=MyISAM; /*Data for the table `filetype` */ insert into `filetype`(`type_name`) values ('doc'),('gif'),('jpg'),('pdf'),('png');* Chaitanya A man can get discouraged many times but he is not a failure until he stops trying... On Wed, Feb 10, 2010 at 5:24 PM, Eric Lee pge...@gmail.com wrote: On Wed, Feb 10, 2010 at 7:35 PM, Gunawan Wibisono landavi...@gmail.com wrote: u should type the error here and attach the file not type in msgbox below what permision for upload folder? On Wed, Feb 10, 2010 at 6:16 PM, Bilal Ahmad engg.bilalma...@googlemail.com wrote: Hi I am trying to make a form to provide option to user to upload a file on a server.Here is the code for my upload.php. It checks all the conditions etc.. . This code works fine on localhost , and file is uploaded successfully. But when I use this script online on my server, it gives me error. couldn't figure out what is error. What I think is error in move_upload_file, but it isn't returning any error. File permissions on upload folder are 755. if((!empty($_FILES['uploaded_file'])) ($_FILES['uploaded_file']['error'] == 0)){ $ok = 0; $filename = basename($_FILES['uploaded_file']['name']); $ext = substr($filename, strrpos($filename, '.') + 1); if (($ext == jpg || gif || png) ($_FILES[uploaded_file][type] == image/jpeg || image/gif || image/png) ($_FILES[uploaded_file][size] 2097152) ){ $newname = 'upload/'.$filename; if (!file_exists($newname)) { if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname))) { $ok = 1; echo It's done! The file has been saved as: .$newname; } else { echo Error: A problem occurred during file upload!; //This one executes when ever i try to upload file on server. } } else { echo Error: File .$_FILES[uploaded_file][name]. already exists; } } else { echo Error: Only .jpg images under 2MB are accepted for upload; } } else {
Re: [PHP-DB] RE: Help for a beginner
why dont u install the xampp On Wed, Dec 23, 2009 at 8:38 PM, Adam Sonzogni asonzo...@setfocus.comwrote: Mr. Brookhouse, Thanks for the quick reply. I am guessing it is not relevant to my case because I am not using PERL. I cannot find anything that says PHP requires PERL so I suspect Iam ok in this regard. Thank You, Adam -Original Message- From: Edward Brookhouse [mailto:eb...@healthydirections.com] Sent: Wednesday, December 23, 2009 9:59 AM To: Adam Sonzogni; php-db@lists.php.net Subject: RE: Help for a beginner Just a guess, as I have not tried a full stack in windows, but in any unix if you are connecting php and mysql, you need something in the middle like DBD::mysql See if this helps: http://forums.mysql.com/read.php?51,189692,189856 -Original Message- From: Adam Sonzogni [mailto:asonzo...@setfocus.com] Sent: Wednesday, December 23, 2009 9:52 AM To: php-db@lists.php.net Subject: [PHP-DB] Help for a beginner Hi everyone, first thank you for ALL help and the understanding that I am new to PHP and MySQL. This is a long email and for that I apologize but I am trying to provide as much detail as possible. If this is the wrong list to ask for help, kindly direct me to the proper authority. I am trying to learn and I have built the following environment. Windows Server 2008 Standard 32bit service Pack 2 with IIS7 mysql-essential-5.1.41-win32 php-5.3.1-nts-Win32-VC9-x86.msi phpMyAdmin-3.2.4-english.zip I followed the steps as detailed below (I already had IIS7 and CGI installed) 1. Install CGI PHP http://www.trainsignaltraining.com/iis-7-install-fastcgi-php/2008-09-04/ 2. Install MySQL http://www.trainsignaltraining.com/install-mysql-on-iis7/2008-09-10/ 3. Install PHPMyAdmin http://www.trainsignaltraining.com/install-phpmyadmin-on-iis7-and-server-2008/2008-09-16/ After I completed the installations 1. If I navigate to the PHP directory and type php -info it spews a ton of data at me AND I created info.php which contains: ?php phpinfo(); ? When I browse this, it correctly produces a page with all the info about my PHP server. Although I do not understand much of it I believe this confirms PHP is working correctly with IIS 2. I open the MySQL CLI and perform the commands outlined in Step 23 at this page http://www.bicubica.com/apache-php-mysql/index.php This returns the expected results, confirming MySQL is working 3. PHP is configured to work with php_mysql.dll as per the steps in the trainsignal links above so I begin! I go to the phpmyadmin page, enter root and my password and after a long time I get a FastCGI error. I am not ready to believe it because, in classic MS form, it has several VERY different potential causes, and I have covered all of those. Plus the error code is 0x which is like saying nothing... I start thinking maybe it is not connecting to the mYSQL server right, the instructions re: pma and the password made no sense to me so I fiddle with that with no change. I write the mysql_test.php page in step 5 of http://www.bicubica.com/apache-php-mysql/index.php This fails with: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Because the PHP failed I try with ASP... % set conn=Server.CreateObject(ADODB.Connection) conn.ConnectionString=Driver={mySQL};Server=localhost;Database=test;User Id=root;Password=youwish conn.open Response.write(Connected) conn.close % This returns: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /test.asp, line 4 I believe I have established MySQL is working, but for some reason it appears that it cannot be reached This IS on the same server so firewall should not be an issue, PLUS I confirmed the installer did create a hole. I turn off the MS firewall to be safe, no change I try a repair of MySQL, I uninstall, reboot and reinstall with no change. NOTE: at several points I have tried iisreset and/or rebooting the system with no change. I start to research the matter and my mind is now unglued. I found something referencing using mcrypt with PHPMyAdmin to speed it up and wondered if maybe the long delay before the FastCGI error could be resolved so I tracked down the dll, put it in my ext directory and changed my php.ini to reflect this -- file found at http://files.edin.dk/php/win32/mcrypt/ I found quite a bit about using libmysql.dll but there was no such file in my install, I pulled down the .zip package and that also did not contain it, I eventually found it in a 5.2.x archive but that does not seem to have helped. I have tried enabling: only mysql, mysql AND mysqli, and only mysqli. None of this seems to have done