RE: [PHP] Namespaces in PHP
--- Robert Cummings <[EMAIL PROTECTED]> wrote: > On Mon, 2004-03-29 at 18:42, Justin Palmer wrote: > > Hi, > > > > I just don't see it as a "namespace ideology", it is just how objects > > work. I know that he knows that it is encapsulation. My point being > > that it should not really be called that because it has nothing really > > to do with namespaces. Which is what my original post/question was > > about. I also think that people should use correct terminology so > that > > people that are newer to programming start off right. I guess that > this > > is just a personal preference. > > > > Sorry for the confusion and any offence taken by anyone. > > In you original post you state: > > On Mon, 2004-03-29 at 17:01, Justin Palmer wrote: > > Hi, > > > > I did not think that PHP supported namespaces? I would love to see it > > if it is possible. What sparked my interest was this post: > > > > http://news.php.net/article.php?group=php.general&article=181728 > > > > I gave you a response on topic with this question. I explicitly declare > in my original response, at the beginning nonetheless, that PHP does not > have namespaces, then I went on to explain what was meant in the link > you had quoted. Since you didn't seem to understand, I thought using > less technical language, and simplistic examples would help. It appears > however, you weren't really interested in the answer, rather you were > interested in splitting hairs with respect to the definition of > "namespace". My humble apologies for wasting your time. > Pay attention people: 'Rob' = greatest PHP programmer on planet. IMHO So bask in the 'excellent' and 'free' knowledge he gives. Frank __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Local sysadmin DFW needed
Hi folks, Sorry for the inturruption. I'm looking for a part time sysadmin in the DFW area. If anyone wants to pick up some hours drop me your resume. Here is what I need, someone who can do: Redhat, PHP, Mysql, Perl, sendmail, creating and maintaining users and permissions, virtual hosts, samba, round robin or hot backup server setup, dns, running backups to our dlt drive, and maintaining raid on compaq (4U) servers. SSL certs and online payment processing tool experience helpful! also creating and printing forms via php/fpdf would be useful. we are colocating soon and need someone hands on for the transition. Our group is: one programmer, one designer(me), one boss. So let me know or pass on the good word to friends, pay is $20 an hour (contract) max 5 to 10 hours a week. This could translate into something more permanent and more hours. We are a good group and friendly we are also deadline oriented/success driven. Thanks, Frank __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Googlebot
That's not very helpful. I am also curious about this. Anyone have a more thought provoking answer? Frank --- Raditha Dissanayake <[EMAIL PROTECTED]> wrote: > If you read the pages on google you will know the answer. > > Hartley, Matt wrote: > > >Is Googlebot (or any other bot) able to follow links that are > php? > > > >e.g. > >Contact Us > > width="110" height="111" > >border="0"> > > > >Is there a way to invite bots to your site? > > > >Thanks > >Matt > > > > > > > > > -- > Raditha Dissanayake. > > http://www.radinks.com/sftp/ | > http://www.raditha.com/megaupload > Lean and mean Secure FTP applet with | Mega Upload - PHP file > uploader > Graphical User Inteface. Just 150 KB | with progress bar. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] random question generation
I am building an application that has course material and one of the requirments is that questions related to course material pop up randomly in relation to the question bank and to time. So if there are 15 pages in a section and four questions need to populate somewhere after page 1 before the end of the section what would you guys use to do this. The questions and answers will be in a database. Also a question on page 4 can't be asked on page 1. The questions will not pop up like a javascript event but lay seeded between the pages it will either happen based on randomization or not. Anybody been down this road before? Frank __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Timer and submit button
I am trying to create a timer tha would prevent someone from clicking submit until the timer reaches zero. THe reason is to keep an individual on a page for a certain amount of time. Does anyone know the best way to do this? PHP? Javascript? Any examples? Frank __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question about video (PHP unrealted)
I know this is bad but this is the only listserver/newgroup thingy I use because I am php challenged. Any how, I want to embed windows media player in my php pages (which I have done successfully), but I need help: I was wondering which is the best format for demand downloading of video files (not streaming) that work with media player. Also, I have my sample video created in a quicktime .mov format also and avi format and an mp4 format. How can I get this converted to a asf or wmv format? Any tips? Any free software that can convert files? Thanks and sorry for the off topic distraction. Frank __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Posting variable in url
I have a redirect that if conditions are right it will pass the user to a new page via $_POST. so for instance the redirect looks like this: header("Location: more_registration.php?username=".$_POST["username"]."&email=".$_POST["email"]); the url will look like this: http://ftudor/test/more_registration.php?username=1234&[EMAIL PROTECTED] the form componement on the new page looks like this: I am posting variables in the url and on this next page more form stuff awaits the user. If a user submits incorrect stuff in the form is posts to itself. The url holds the same variables that were pass through the redirect. My concern is that if a variable got altered in the URL by misstake or on purpose it would post to the refreshed page and screw everything up. Anyone run into something like this? Frank __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] revised query problem (sorry)
$query="SELECT payment FROM payment WHERE payment.dln='".$_POST["dln"]."' = users.dln='".$_POST["dln"]."' and payment.payment='".$_POST["payment"]."'"; Will this work? Frank __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Possible query problem
Yestery day I got help from several of you on my function. I tried to get complicated today and so here it is. I am working on a peice of code where if a condition of a database entery is 0 then it will take you to one page if it is one it will take you to another page. Here is the function: $payment1 = $_POST["payment"]; function payment(){ global $payment1; if ($payment1 == "0"){ header ('Location: http://ftudor/test/test_page.html'); } elseif ($payment1 == "1") { header ('Location: http://ftudor/test/test_page2.html'); } } payment(); It works (thanks to many) but I have another problem. Basically the user will have to supply a username and password, then the sql statement will go through something like this: $query="SELECT payment FROM payment WHERE dln='".$_POST["dln"]."' = payment.dln='".$_POST["dln"]."' and users.password='".$_POST["password"]."'"; then it should return a 0 or a 1 and that will go into the function and route a user to the right page. Since I don't have a payment processing tool in place I have to hfake a condition. The page just cycles into itself and keeps promting for username and password over and over. Do you think it's my sql? Frank __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: function help simple redirect
Shit! payment(); WORKS! Thank for teach me how to do a function guys!!! Frank --- Frank Tudor <[EMAIL PROTECTED]> wrote: > Oh?!?! > > Sweet! thanks... let me try that and get back to the group > > :) > > > --- Pablo Gosse <[EMAIL PROTECTED]> wrote: > > On Monday, October 27, 2003 11:26 AM, Frank Tudor wrote: > > > > > This one worked (kinda) > > > I have no more errors but it doesn't do the redirect > > (hmmm)?? > > > > > $payment = "1"; > > > > > > function payment(){ > > > global $payment; > > > if ($payment == "0"){ > > > header ('Location: http://ftudor/test/test_page.html'); > > > > > > } > > > elseif ($payment == "1") { > > > header ('Location: http://ftudor/test/test_page2.html'); > > > > > > } > > > } > > > ?> > > > > You need to add payment(); to your php code. > > > > The function is defined, but it's not going to do anything > > until you > > call it. > > > > Cheers, > > Pablo > > > __ > Do you Yahoo!? > Exclusive Video Premiere - Britney Spears > http://launch.yahoo.com/promos/britneyspears/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: function help simple redirect
Oh?!?! Sweet! thanks... let me try that and get back to the group :) --- Pablo Gosse <[EMAIL PROTECTED]> wrote: > On Monday, October 27, 2003 11:26 AM, Frank Tudor wrote: > > > This one worked (kinda) > > I have no more errors but it doesn't do the redirect > (hmmm)?? > > > $payment = "1"; > > > > function payment(){ > > global $payment; > > if ($payment == "0"){ > > header ('Location: http://ftudor/test/test_page.html'); > > > > } > > elseif ($payment == "1") { > > header ('Location: http://ftudor/test/test_page2.html'); > > > > } > > } > > ?> > > You need to add payment(); to your php code. > > The function is defined, but it's not going to do anything > until you > call it. > > Cheers, > Pablo __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: function help simple redirect
I get my ugly purple test page :) Frank --- Chris Shiflett <[EMAIL PROTECTED]> wrote: > --- Frank Tudor <[EMAIL PROTECTED]> wrote: > > I am putting in the $payment="1"; so it will automatically > go to > > test_page2.html but it just sits there. > [snip] > > header ('Location: http://ftudor/test/test_page2.html'); > > What happens when you type it into your browser manually? > > http://ftudor/test/test_page2.html > > That might be your problem now. > > Chris > > = > My Blog > http://shiflett.org/ > HTTP Developer's Handbook > http://httphandbook.org/ > RAMP Training Courses > http://www.nyphp.org/ramp __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: function help simple redirect
This one worked (kinda) I have no more errors but it doesn't do the redirect (hmmm)?? So now here is what it looks like: I am putting in the $payment="1"; so it will automatically go to test_page2.html but it just sits there. Is there a headers thing already going on blocking this? I know don't need the quotes around the "1" because it's a number vaule and not a string. Can anyone think of any other reason why it might not work? Frank http://ftudor/test/test_page.html'); } elseif ($payment == "1") { header ('Location: http://ftudor/test/test_page2.html'); } } ?> __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: function help redirect help
I made the changes but I am getting: Parse error: parse error, unexpected T_ELSEIF I did take the second global statement out after I cut and pasted your code and modified the urls so now here is what it looks like (the whole thing). Frank http://ftudor/test/test_page.html'); } elseif ($payment == '1') { header ('Location: http://ftudor/test/test_page2.html'); } ?> __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: function help simple redirect
Sorry I'm getting this error message Parse error: parse error, unexpected T_ELSEIF __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: function help redirect help
Here is what Ihave I am getting a elseif parse error. Is there something I'm leaving out? Frank code --- $payment = "1"; function payment(){ global $payment; if ($payment == "0"); header ("location:test_page.html"); } global $payment; elseif ($payment == "1") { header ("location:test_page2.html"); } __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: function help redirect help
$payment = "1"; function payment(){ global $payment; if ($payment == "0"); header ("location:test_page.html"); } global $payment; elseif ($payment == "1") { header ("location:test_page2.html"); } __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] function problem (simple redirect)
I'm trying to make this function work, but I'm not good at functions. I have created a variable for testing payment equal to 1 or 0 to see what would happen based on whatever the condition is in my database (the sql stuff is not here because i have to figure this thing out first). I get a t_string error or t_varialbe but I don't know what to do to fix it. Frank code -- $payment = 1; echo $payment; function $payment{ if ($payment == "0"); header ("location:test_page.html"); }else{ ($payment == "1"); header ("location:test_page2.html"); } __ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] .htaccess question protect my php test environment
I have to apologies about this posting in advance so please don't flame me too bad for being off topic. Question: I want to create an .htaccess file to protect my files I did the passwrd -c /directory/file frank the set a password and then confirmed the password I created a .htaccess file with vi and put this in it. AuthName "restricted stuff" AuthType Basic AuthUserFile /var/password/frank require valid-user then in the redhat http server utitily under server settings I went tot he virtual directory section and created a new virtual dir called virtual 0 and check marked the box at the bottom for .htaccess protection. I restart the server and then go to another computer and put in the URL and no password box comes up. :( __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Handling
Interjinn looks great but my development box is a windows me machine with easyphp (globals turned off) How am I supposes to get this stuff to work. I actually just unzipped it to my www dir and it has been sitting there the whole day. and I still have my vailidation (form handling) problem. I would really be interested in quickforms or interjinn or something easy that can get this form under control. Any other suggestions? Besides a brain transplant... :) Frank --- Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2003-10-17 at 23:14, John Nichel wrote: > > > > I had InterJinn Simonize my car this morning. :) > > Hmm, that's an odd word to use... I hope your car enjoyed its > simonizing. But don't let it get carried away :) > > Cheers, > Rob > -- > .. > | InterJinn Application Framework - http://www.interjinn.com | > :: > | An application and templating framework for PHP. Boasting | > | a powerful, scalable system for accessing system services | > | such as forms, properties, sessions, and caches. InterJinn | > | also provides an extremely flexible architecture for | > | creating re-usable components quickly and easily. | > `' > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error Handling
I have found some great code that handles errors through PHP_SELF However I have radio buttons and drop down selections that I cannot do a $_POST (the POST only works on my text fields). Does someone have some sample code that can check for errors on a drop down selection or radio buttons and then post the selection back to the form if the form is not complet? Thanks, Frank __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session question
How do you make a session time out? and how do you make a session end if a person leaves your site? Frank __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pulling variables from a URL(thanks)
Thanks eveyone for all the info. I got it working! :) Frank --- Gabriel Peugnet <[EMAIL PROTECTED]> wrote: > Every body have already gave you the answers. > Just one more thing: > > the method you are useing is GET because you are passing > variables in the > URL so use of $_POST doesn't work. > > the only line you need is > $username = $_GET['username']; > > after this you can do any thing with $username. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Pulling variables from a URL
I have a URL including variables... It looks like this: http://registration.php?username=11&[EMAIL PROTECTED] But I can't pullit into the next page's form Here is what is in the form and other things I have tried: $username = $_HTTP_POST_VARS['username']; echo $_GET['$username']; echo $_POST['$username']; This page sumbits with PHP_SELF if that helps with this puzzle. Can someone tell me what I'm doing wrong? Also I do have an include file that looks for session information but Ihave disabled it to see if I can pass variables. Frank __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] variables passed through URL
If I have have set a url to be displayed like this: www.mysite.com/some_page.php?value=this and wanted to tag on another value what would I seperate the dtwo with/ Also since it is now displayed in the url and I need the value in some area on my form. How would I populate the value in a form tag? Thanks, __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] PHP Apache (GLOBALS) question
Also, On the phpinfo.php MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient ARE MISSING. When I run a phpinfo.php page I get all my config info with my php.ini file put in the etc dir i get no mention of the above mysql information with the php.ini file removed or renamed and then running a phpinfo page I get MYSQL information in my config file. So what can I do because the php.ini file just shows config info I don't think I can modify it to see mysql can I? doesn't that have to reply on the rpm install? or when the php libary was built? Frank --- Frank Tudor <[EMAIL PROTECTED]> wrote: > Thanks for the response. > > Ok with php.ini in the ect directory I get a > > Call to undefined function: mysql_connect() > > Without the php.ini file all my functions fail, because > Mandrake > linux has all the latest and greatest apache php and mysql > stuff. so during that build (which doesn't use the php.ini > and > frankly I'm not sure where the php stuff is defined in > apache), > because before the php.ini files ended up in the etc directory > I > had to modify it from the php.ini-dist from the common lib > directory. > > does this help? > > Frank > --- John Nichel <[EMAIL PROTECTED]> wrote: > > Frank Tudor wrote: > > > Yes to the php-mysql rpm, > > > > > > But listen I think it was the way it built the initial > > appach > > > php mysql configurations I don't think the php.ini > refects > > an > > > accurate setup of my php mysql setup. > > > > > > Frank > > > > Let's get away from the php.ini for a moment. Being that > you > > did > > everything from RPM, the ini file doesn't come into play > here > > (you > > basically have a default setup, with default settings). The > > stock > > php.ini file will do just fine. > > > > What is the output of this code on your box. > > > > if ([EMAIL PROTECTED]("your_host", "your_username", > > "your_password")){ > > echo ( mysql_error() ); > > } else { > > echo ( "Connection exists" ); > > } > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > __ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design > software > http://sitebuilder.yahoo.com > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Apache (GLOBALS) question
Thanks for the response. Ok with php.ini in the ect directory I get a Call to undefined function: mysql_connect() Without the php.ini file all my functions fail, because Mandrake linux has all the latest and greatest apache php and mysql stuff. so during that build (which doesn't use the php.ini and frankly I'm not sure where the php stuff is defined in apache), because before the php.ini files ended up in the etc directory I had to modify it from the php.ini-dist from the common lib directory. does this help? Frank --- John Nichel <[EMAIL PROTECTED]> wrote: > Frank Tudor wrote: > > Yes to the php-mysql rpm, > > > > But listen I think it was the way it built the initial > appach > > php mysql configurations I don't think the php.ini refects > an > > accurate setup of my php mysql setup. > > > > Frank > > Let's get away from the php.ini for a moment. Being that you > did > everything from RPM, the ini file doesn't come into play here > (you > basically have a default setup, with default settings). The > stock > php.ini file will do just fine. > > What is the output of this code on your box. > > if ([EMAIL PROTECTED]("your_host", "your_username", > "your_password")){ > echo ( mysql_error() ); > } else { > echo ( "Connection exists" ); > } > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Apache (GLOBALS) question
I did set my php.ini file in the etc dir and it worked fine. But there was no mysql listed when I did a phpinfo.php page. So more specifically, when I ude my php.ini file i have globals on but mysql_connect failures When I don't use php.ini files I get globals set to off and mysql access in ref. to .htaccess when I put and .htaccess in a dir and make and enable httpd.conf to use htaccess it errors in the http_perl.conf and if I try to edit my vhost config file with the php_value "register_globals" "1" or php_flag "register_globals" "on" it failes when i restart my web seerver in the httpd-perl.conf file Frank --- John Nichel <[EMAIL PROTECTED]> wrote: > Frank Tudor wrote: > > >>It worked like a charmbut guess what. I can't create a > >>connection string to my database. Now I have to find a > >>solution > >>to get this website to work with globals on and mysql. > > Register globals has nothing to do with making a connection to > MySQL. > Post your code for the connection please. > > >>I have tried adding an .htacess with the php globals > override > >>thing > >> > >> > >>php_value "register_globals" "1" > >> > >>Ok this didn't work. > >> > >>So I found the Mysql-PHP RPM on my mandrake cd (of course > >>enabling my php.ini file) and it didn't work. > >> > >>I'm getting closer to a solution but I am stuck. Why won't > >>the > >>htaccess file work? I would like to use my php.ini file but > > What isn't working for .htaccess? Is Apache configured to > allow > .htaccess files the ability to override php variables? > > >>it > >>is not configured for mysql, how could I fix this? Is there > >>anything I can do for either of these two questions to get > my > >>globals on? > > Not that you should turn globals on, but if this is really > what you want > to do, enable it in your php.ini file, and restart your > webserver. > > >>I swear I will never use functions again if someone helps > me. > >> > >>:) > >> > >>Frank > -- > By-Tor.com > It's all about the Rush > http://www.by-tor.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Apache (GLOBALS) question
When I remane my php.ini file I get /var/lib/mysql/mysql.sock When I take the .old of the the end of my php.ini.old and put in my etc directory i don't see any mysql stuff listed. Frank --- Marek Kilimajer <[EMAIL PROTECTED]> wrote: > check your mysql.default_socket setting in php.ini > > Frank Tudor wrote: > > > I can run mysql from a command line. > > > > What I create a connection string using my php.ini file I > get > > > > failure. mysql_connect() errors > > > > My connection string code is very simple: > > > > > //list_db.php > > > > $link_id = mysql_connect("localhost", "username", > "password"); > > $result = mysql_list_dbs($link_id); > > $num_rows = mysql_num_rows($result); > > > > while($db_data = mysql_fetch_row($result)) { > > echo $db_data[0]. ""; > > $result2 = mysql_list_tables($db_data[0]); > > $num_rows2 = mysql_num_rows($result2); > > while($table_data = mysql_fetch_row($result2)) echo "--" . > > $table_data[0]. ""; > > echo "==> $num_rows2 table(s) in " . $db_data[0] . ""; > > } > > ?> > > Using this as a test and all my other connection strings > > residing on my include file or one the same page as my code > > fails. > > > > > > > > > > --- Jay Blanchard <[EMAIL PROTECTED]> > wrote: > > > >>[snip] > >>I have installed Mandrake Linux and it comes standard with > >>Apache PHP and MySQL. You can install all these rpms > through > >>the server selectionAnyway. > >> > >>In my test environment it is function city and of course > >>register globals were on. > >> > >>Now I have Taked my PHP.INI-DIST set the globals to on and > >>copied it to my /etc directory. > >> > >>It worked like a charmbut guess what. I can't create a > >>connection string to my database. Now I have to find a > >>solution > >>to get this website to work with globals on and mysql. > >> > >>I have tried adding an .htacess with the php globals > override > >>thing > >> > >> > >>php_value "register_globals" "1" > >> > >>Ok this didn't work. > >> > >>So I found the Mysql-PHP RPM on my mandrake cd (of course > >>enabling my php.ini file) and it didn't work. > >> > >>I'm getting closer to a solution but I am stuck. Why won't > >>the > >>htaccess file work? I would like to use my php.ini file but > >>it > >>is not configured for mysql, how could I fix this? Is there > >>anything I can do for either of these two questions to get > my > >>globals on? > >> > >>I swear I will never use functions again if someone helps > me. > >>[/snip] > >> > >>Actually this sounds like a bunch of mutually exclusive > >>things. > >> > >>1. Can you run MySQL from the command line? > >>2. Register_globlas has nothing to do with the connection > >>string to > >>MySQL > >>3. Can you show us your connection string code? > >> > > > > > > > > __ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design > software > > http://sitebuilder.yahoo.com > > > __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Apache (GLOBALS) question
I can run mysql from a command line. What I create a connection string using my php.ini file I get failure. mysql_connect() errors My connection string code is very simple: "; $result2 = mysql_list_tables($db_data[0]); $num_rows2 = mysql_num_rows($result2); while($table_data = mysql_fetch_row($result2)) echo "--" . $table_data[0]. ""; echo "==> $num_rows2 table(s) in " . $db_data[0] . ""; } ?> Using this as a test and all my other connection strings residing on my include file or one the same page as my code fails. --- Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > I have installed Mandrake Linux and it comes standard with > Apache PHP and MySQL. You can install all these rpms through > the server selectionAnyway. > > In my test environment it is function city and of course > register globals were on. > > Now I have Taked my PHP.INI-DIST set the globals to on and > copied it to my /etc directory. > > It worked like a charmbut guess what. I can't create a > connection string to my database. Now I have to find a > solution > to get this website to work with globals on and mysql. > > I have tried adding an .htacess with the php globals override > thing > > > php_value "register_globals" "1" > > Ok this didn't work. > > So I found the Mysql-PHP RPM on my mandrake cd (of course > enabling my php.ini file) and it didn't work. > > I'm getting closer to a solution but I am stuck. Why won't > the > htaccess file work? I would like to use my php.ini file but > it > is not configured for mysql, how could I fix this? Is there > anything I can do for either of these two questions to get my > globals on? > > I swear I will never use functions again if someone helps me. > [/snip] > > Actually this sounds like a bunch of mutually exclusive > things. > > 1. Can you run MySQL from the command line? > 2. Register_globlas has nothing to do with the connection > string to > MySQL > 3. Can you show us your connection string code? > __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Apache (GLOBALS) question
I'm forwarding this from the php-windows group. (I sent it to both with the hopes someone with information would see this). > I have installed Mandrake Linux and it comes standard with > Apache PHP and MySQL. You can install all these rpms through > the server selectionAnyway. > > In my test environment it is function city and of course > register globals were on. > > Now I have Taked my PHP.INI-DIST set the globals to on and > copied it to my /etc directory. > > It worked like a charmbut guess what. I can't create a > connection string to my database. Now I have to find a > solution > to get this website to work with globals on and mysql. > > I have tried adding an .htacess with the php globals override > thing > > > php_value "register_globals" "1" > > Ok this didn't work. > > So I found the Mysql-PHP RPM on my mandrake cd (of course > enabling my php.ini file) and it didn't work. > > I'm getting closer to a solution but I am stuck. Why won't > the > htaccess file work? I would like to use my php.ini file but > it > is not configured for mysql, how could I fix this? Is there > anything I can do for either of these two questions to get my > globals on? > > I swear I will never use functions again if someone helps me. > > :) > > Frank __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Apache (GLOBALS) question
I have installed Mandrake Linux and it comes standard with Apache PHP and MySQL. You can install all these rpms through the server selectionAnyway. In my test environment it is function city and of course register globals were on. Now I have Taked my PHP.INI-DIST set the globals to on and copied it to my /etc directory. It worked like a charmbut guess what. I can't create a connection string to my database. Now I have to find a solution to get this website to work with globals on and mysql. I have tried adding an .htacess with the php globals override thing php_value "register_globals" "1" Ok this didn't work. So I found the Mysql-PHP RPM on my mandrake cd (of course enabling my php.ini file) and it didn't work. I'm getting closer to a solution but I am stuck. Why won't the htaccess file work? I would like to use my php.ini file but it is not configured for mysql, how could I fix this? Is there anything I can do for either of these two questions to get my globals on? I swear I will never use functions again if someone helps me. :) Frank __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and MYSQL don't shake hands
Guys, I have moved from a foxserv(apache, php, mysql, all in one install tool) windows test environment to a Linux apache php mysql setup specifically mandrake linux production server. The problem I am having is that when I try to pass values to the database the php fails. I think I have singled it down to the connection string but I am not sure. basically, I have tested the sample code in the book 'beginning php' by (wrox). I have made no changes. I think that the dbhost is the problem. when I look at the phpinfo page it shows me not localhost but a 'name.com' so I try $dbhost = 'name.com'; and then i also try $dbhost = 'localhost'; and neither seem to work. Can anyone tell me what I'm doing wrong? Here is my sample code: My db connect include file:: My php sample code::: "; ?> My error is a white screen and this is simple code out of the book. Could it be my dbhost is incorrect. I checked my services and Mysql is running. Apache running and parsing other php pages that don't do a db connect so I'm pretty sure it's the db connect stuff. Thanks, Frank __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] globals on globals off (help
This is more for a linux group post but I know someone can provide enlightenment on this issue. I have the latest version of apache and php I have created my entire sie in a foxserv environment on windows but my production environment is on mandrake linux 9.1 The globals are set to off but i'll be damned if I know where I can set them to on. I found a php.ini-dist and a php.ini-recommended file but changing these files does nothing. can someone give me some give me a hand with this? Thanks, Frank __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php