Re: [PHP] newbie pls help
This might help as well: http://www.php.net/manual/en/installation.php Jordan S. Jones Mrs. Geeta Thanu wrote: Hi all, I want to install apache and php in a redhat box version 8 and want apache to load php. So how i shld proceed. Just downloading the rpms of both and installing will help or I have to down load the source and compile it. Pls help Thank u Geetha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie pls help
Hi, Defaults installations of RH 8 usually have both apache and php. You can upgrade by rpm -Uvh rpmname.rpm but what you should really be doing is heading off to php.net and reading their installation guide. and googling for php newby articles. Mrs. Geeta Thanu wrote: Hi all, I want to install apache and php in a redhat box version 8 and want apache to load php. So how i shld proceed. Just downloading the rpms of both and installing will help or I have to down load the source and compile it. Pls help Thank u Geetha -- 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
[PHP] newbie pls help
Hi all, I want to install apache and php in a redhat box version 8 and want apache to load php. So how i shld proceed. Just downloading the rpms of both and installing will help or I have to down load the source and compile it. Pls help Thank u Geetha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to refine this:
> [1] http://us2.php.net/manual/en/control-structures.do.while.php > Thanks! Didn't see that page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to refine this:
On Wed, 2004-02-04 at 00:32, John Taylor-Johnston wrote: > I cannot declare $temp = $mydata->district; outside while ($mydata so ... ? > I'm missing something in my logic. That's why I asked. > It wouldn't make sense to declare this twice: > while ($mydata = mysql_fetch_object($myquery)) You could set the flag to null outside the loop, then check at the top of your loop to see if the flag and district differ. If so set the flag, echo what you need, and move on. The first time the loop runs the flag will differ and you will set it to the first vale of district as well as echo your district header, afterwords things will continue as expected. If you do not want to print out the district info the first time the loop runs then you can set $mydata outside the loop, initialize the flag variable, then use a do..while[1] loop to process the rest of your data. -Adam [1] http://us2.php.net/manual/en/control-structures.do.while.php -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to refine this:
Just my two cents :) $temp = ""; echo "\n"; while ($mydata = mysql_fetch_object($myquery)) { if ($temp != $mydata->district) { $temp = $mydata->district; echo "$mydata->district\n"; } echo "$mydata->city $mydata->place $mydata->meetingtime\n"; } echo "\n"; Hope it helps. __ 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
Re: [PHP] Need to refine this:
Jason, > You're tired so you want others to do your work? No ... > Maintain a 'flag' which stores 'previous' value of $mydata-district. If 'flag' > and $mydata-district differ print $mydata-district and update 'flag'. I cannot declare $temp = $mydata->district; outside while ($mydata so ... ? I'm missing something in my logic. That's why I asked. It wouldn't make sense to declare this twice: while ($mydata = mysql_fetch_object($myquery)) $temp = ""; echo "\n"; while ($mydata = mysql_fetch_object($myquery)) { $temp = $mydata->district; while ($temp <> $mydata->region) { echo "$mydata->district\n"; } echo "$mydata->city $mydata->place $mydata->meetingtime\n"; } echo "\n"; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sendmail wrapper
On 02/02/2004 06:18 PM, Federico Petronio wrote: Hi all... I have a chrooted Apache/PHP on Solaris 8 working fine except for one PHP function, mail(). I read that in Unix environments there is not possible to make PHP use a remote SMTP and it needs to find a sendmail executable un the path. Since including Postfix in the chrooted env. does not look very nice, I try to use a wapper (local_FS->remote_SMTP), but I am not happy with the one I found. It does not handle well the CC, nor the BCC so I change it a little, but still have issues (for explample if the SMTP does not responds, it don't try angain and the mail is lost). Do you know some sendmail wrapper to recomend? You may want to try this class for composing and sending e-mail messages. It comes with sub-classes specialized in deliverying messages with sendmail or compatible, qmail and SMTP. If you do not want to use the class directly, it comes with wrapper functions that emulate the mail() function. http://www.phpclasses.org/mimemessage For SMTP delivery, you also need this: http://www.phpclasses.org/smtpclass -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ MetaL - XML based meta-programming language http://www.meta-language.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What should the permissions on a PHP file be?
Pooya Eslami wrote: I need to know what is the most secure and reliable way to put permissions on a .php file. I usually put it as rw-r-r, is this good or is there a better way of arranging the permissions? Depends on your environment. I usually have mine set up as rw-rw (directories as rwxrwx---) with the owner the same as what my webserver runs as (apache), and group writable so that multiple people can edit them. Even if you're the only one who is going to edit the files, and you're the owner of the files and you're set up rw-r--r--, you may run into problems if php/Apache needs to write to the file (unless Apache is running as you). Well, I want to have the most security for my .php file because it stores passwords. Besides if there is no permissions set for the 'world' how can someone's browser use the .php file? shouldn't it atleast have a read or execute (I'm not sure, please comment on this) persmission? No, it's the webserver which is serving up the file; the client doesn't come into play for permissions. Technically, the file only needs to be r with the owner of the file as same as the what the web server is running as. However, you won't be able to write to it (unless you're root). My suggestion would be, if you're going to be the only one editing the file 1) Make the owner of the file you 2) Make the group of the file the same as your webserver 3) Set the permissions to 640 (rw-r-) 4) Place it in a directory outside of the webserver's document root 5) Make yourself the owner of the directory, and group the same as the webserver. 6) Set permissions on the directory as 750 (rwxr-x---) -- 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
Re: [PHP] Need to refine this:
On Wednesday 04 February 2004 12:56, John Taylor-Johnston wrote: Please use a meaningful subject. > I need to refine this. I'm tired ... long day. You're tired so you want others to do your work? > I would like to echo $mydata->district only once unless it changes. Maintain a 'flag' which stores 'previous' value of $mydata-district. If 'flag' and $mydata-district differ print $mydata-district and update 'flag'. -- 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-general -- /* People never lie so much as after a hunt, during a war, or before an election. -- Otto Von Bismarck */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: authentication comparing to /etc/passwd
Found this too: You are not authorised to enter the site \n"; exit; } else { if (!($conn=ora_logon("[EMAIL PROTECTED]",$PHP_AUTH_PW))) { Header("WWW-authenticate: basic realm=\"$SID\""); Header("HTTP/1.0 401 Unauthorized"); $title="Login Instructions"; echo " You are not authorised to enter the site \n"; exit; } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: authentication comparing to /etc/passwd
if($PHP_AUTH_USER != "user1") || ($PHP_AUTH_PW != "password") ... or somehting like that. I can't find it in the manual, but it is there someplace. Adam Williams wrote: > Hi, is there a PHP function or some sort of way to have a user enter their > username and password in a form, and compare the username and password and > see if the username exists and the password is correct? > > basically I want to have a page where a person enters their username and > password and if correct to use the header function to send them to the a > page. -- John Taylor-Johnston - "If it's not Open Source, it's Murphy's Law or broken." ' ' ' Collège de Sherbrooke ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/ - Université de Sherbrooke http://compcanlit.ca/ 819-569-2064 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: What should the permissions on a PHP file be?
rw-r-r should do it. Permissions really only become an issue using Perl. PHP is very accomodating that way. Pooya Eslami wrote: > I need to know what is the most secure and reliable way to put permissions > on a .php file. > I usually put it as rw-r-r, is this good or is there a better way of > arranging the permissions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need to refine this:
Hi, I need to refine this. I'm tired ... long day. I would like to echo $mydata->district only once unless it changes. echo "\n"; while ($mydata = mysql_fetch_object($glquery)) { #- if $mydata->district is different, then echo "$mydata->district\n"; echo "$mydata->city $mydata->place $mydata->meetingtime\n"; } echo "\n"; Clarity anyone :) Thanks, J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What should the permissions on a PHP file be?
> > I need to know what is the most secure and reliable way to put permissions > > on a .php file. > > I usually put it as rw-r-r, is this good or is there a better way of > > arranging the permissions? > > > > Depends on your environment. I usually have mine set up as rw-rw > (directories as rwxrwx---) with the owner the same as what my webserver > runs as (apache), and group writable so that multiple people can edit > them. Even if you're the only one who is going to edit the files, and > you're the owner of the files and you're set up rw-r--r--, you may run > into problems if php/Apache needs to write to the file (unless Apache is > running as you). Well, I want to have the most security for my .php file because it stores passwords. Besides if there is no permissions set for the 'world' how can someone's browser use the .php file? shouldn't it atleast have a read or execute (I'm not sure, please comment on this) persmission? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Document generation from XML
> Hi Russell, > > If you're documenting PHP software, you might consider using > phpDocumentor. Your manual would be in DocBook, and phpDocumentor > would both transform to HTML/PDF/CHM, and link to the auto-parsed API > docs straight from the source. Kind of handy for people who'd rather > code than figure out where things have changed :) > > Greg > -- > phpDocumentor > http://www.phpdoc.org > What do u mean the manual would be in Docbook, how do i get it in docbook ? I would like to fill the generated docs with more info than is already there, including diagrams, flow charts , object framework diagrams. I also have trouble with the headers of my scripts, here is an example of one /** * @author Dan Rossi * @version $Id: index.php,v 1.00 2003/05/21 * Shotlist Data Entry Interface * This script handles the data entry of new shotlist tapes * it also handles the editing and updating of current shotlist entries. */ Althought the description will only get parsed if there is an include above and the header gets generated with the include statement, how can i fix this ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What should the permissions on a PHP file be?
Pooya Eslami wrote: I need to know what is the most secure and reliable way to put permissions on a .php file. I usually put it as rw-r-r, is this good or is there a better way of arranging the permissions? Depends on your environment. I usually have mine set up as rw-rw (directories as rwxrwx---) with the owner the same as what my webserver runs as (apache), and group writable so that multiple people can edit them. Even if you're the only one who is going to edit the files, and you're the owner of the files and you're set up rw-r--r--, you may run into problems if php/Apache needs to write to the file (unless Apache is running as you). -- 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
[PHP] Re: Document generation from XML
Hi Russell, If you're documenting PHP software, you might consider using phpDocumentor. Your manual would be in DocBook, and phpDocumentor would both transform to HTML/PDF/CHM, and link to the auto-parsed API docs straight from the source. Kind of handy for people who'd rather code than figure out where things have changed :) Greg -- phpDocumentor http://www.phpdoc.org Russell Seymour wrote: Good evening list, I apologise profusely if after reading anyone thinks that is OT, but I relally need some pointers with a project I am working on. I have searched the Internet for information on XML document generation but there is too much information that I cannot decide which way to go. Thanks lots in advance. I am currently writing a web based application using PHP that created reports on the fly from a multitude of data sources. In the beginning only one output format was required, HTML and then PDF was a requirement. More and more formats are now required by my users and rather than create a new output script for each different format I am thinking about outputting the final report as XML and then putting that through 'something' to render in the format that I require. However I am unclear as to the best way to do this as there seems to be many different ways. I have looked at using Apache FOP and DocBook, but they all spawn off in different directions and bringing in other things such as Jade. This post maybe slightly OT, but if nayone has any pointers on how I amy go about doing this I would be very very grateful. Thanks very much. Russell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What should the permissions on a PHP file be?
I need to know what is the most secure and reliable way to put permissions on a .php file. I usually put it as rw-r-r, is this good or is there a better way of arranging the permissions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Document generation from XML
Ray, I can create the XML of the document that I want to generate using the built in XML functions in PHP. THe thing I then want to do is be able to do is then use that XML to create documents in multiple formats, e.g. PDF. I think that I can use DocBook or Apache FO to do this, but I am not sure which one to use or how to go about doing it. Basically I want to be abel to speciy an output format and run the XML through a transformation to get that format. Does that make any more sense? Russell - Original Message - From: "Ray Hunter" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Tuesday, February 03, 2004 8:56 PM Subject: Re: [PHP] Document generation from XML > On Tue, 2004-02-03 at 13:50, Russell Seymour wrote: > > In the beginning only one output format was required, HTML and then PDF was > > a requirement. More and more formats are now required by my users and > > rather than create a new output script for each different format I am > > thinking about outputting the final report as XML and then putting that > > through 'something' to render in the format that I require. > > > > However I am unclear as to the best way to do this as there seems to be many > > different ways. I have looked at using Apache FOP and DocBook, but they all > > spawn off in different directions and bringing in other things such as Jade. > > You can create xml with various extensions in php. You can use sax or > dom to do that or create your own strings that contain xml syntax. I > have done both. What are you really trying to do? Create an xml file > from various data sources? Or create an xml file from another xml file? > > -- > Ray "Ray Hunter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 2004-02-03 at 13:50, Russell Seymour wrote: > > In the beginning only one output format was required, HTML and then PDF was > > a requirement. More and more formats are now required by my users and > > rather than create a new output script for each different format I am > > thinking about outputting the final report as XML and then putting that > > through 'something' to render in the format that I require. > > > > However I am unclear as to the best way to do this as there seems to be many > > different ways. I have looked at using Apache FOP and DocBook, but they all > > spawn off in different directions and bringing in other things such as Jade. > > You can create xml with various extensions in php. You can use sax or > dom to do that or create your own strings that contain xml syntax. I > have done both. What are you really trying to do? Create an xml file > from various data sources? Or create an xml file from another xml file? > > -- > Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR DB::isError acting strange
I'm having some problems with the DB::isError function identifying a non-object as an error object (or so it seems). I'm using postgreSQL 7.3.x. The relevant code is below: /***[ my code start ]***/ $sql_queries = array(); $sql_queries[0] = 'BEGIN'; $sql_queries[1] = "INSERT INTO domain (name,table_name) VALUES('$domainname','$tablename')"; $sql_queries[2] = 'CREATE TABLE ' . $tablename . '_account () INHERITS (domain_account_template)'; $sql_queries[3] = 'CREATE TABLE ' . $tablename . '_alias () INHERITS (domain_alias_template)'; $sql_queries[4] = 'CREATE TABLE ' . $tablename . '_option () INHERITS (domain_account_template)'; $sql_queries[5] = 'END'; // go though and execute all the queries (it fails on the // first one foreach($sql_queries as $query) { // show me which query is executing echo $query . ""; $result = $db->query($query); // this tells me that $result is an integer == 1 and // so is DB_OK, which I believe the code above is returning echo getType($result) . ": " . $result . ": " . DB_OK . ""; //this test tells me that it is NOT an object if(is_object($result)) { echo "its an object."; } else {echo "its NOT an object"; } //this always ends up as true, because it executes the code //in this block if(DB::isError($result)); { //at this point, I get a fatal error saying that I'm //attempting to call a member function on a non-object $error = $result->getMessage() . $result->getDebugInfo(); $db->query('ABORT'); die($error); } } /[ my code end ]***/ now, when I looked at the DB::isError code, it looked like so: /** * Tell whether a result code from a DB method is an error * * @param int $value result code * * @return bool whether $value is an error * * @access public */ function isError($value) { return (is_object($value) && (get_class($value) == 'db_error' || is_subclass_of($value, 'db_error'))); } So, it seems, that although I've already found (in my code) that the variable in question is NOT an object, isError STILL finds that it is not only an object, but is an object of class db_error! I'm really confused. Clearly I'm missing something here. Does anyone have any pointers for me? -davidc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP code encryption
I and another person am now maintaining Turck MMCache, another release will be made shortly but until then the current release should work fine. There is also a web based encoder for Turck MMCache at http://phpcoder.sourceforge.net The great thing about MMCache is it is open source and usually considerably faster than the other free/commercial encoders. It matches and exceeds Zend's own products in many cases. Jason Adrian Teasdale wrote: Here are some for you to try: www.sourceguardian.com www.zend.com www.ioncube.com There is also one within mmCache (http://turck-mmcache.sourceforge.net/). Just read the forum about the current status of this open source project as the founder has gone to work for Zend and will no longer be maintaining the project himself (although others might). Ade -Original Message- From: Hamid Hossain [mailto:[EMAIL PROTECTED] Sent: 03 February 2004 16:04 To: [EMAIL PROTECTED] Subject: [PHP] PHP code encryption Hi, I am working in a project for a customer of my company, I am using PHP and I want to prevent my customer from touching my code. The problem that I have to install the application in the customer computer. So, I am looking for a way to encrypt my PHP code. I heard that there is a way but I don't have details. How to do this? Is it legal to be used in a commercial purposes? Is it free? Should I install somthing in the customer's pc to decrypt my code? Could I have some not encrypted pages (eg: config.php) ? Thanks, Hamid Hossain _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FreeBSD to Linux -- PHP Issues
Hi, I myself had reserverations about moving to a FreeBSD host, but have had an excellient experience with the guys at www.hub.org. Quick support, access to my httpd.conf and php.ini files, ssh and a whole lot more. Both the guys there who i have spoken too are real cool too (chris and marc) and have been recomending their host to pals, if you really want freeBSD, check them out (and tell them i sent ya) they even offer PostGres databases other than mySql. Before i get flamed, let me confirm: I DO NOT OWN THAT SITE, I DO NOT GET $$ BY REFERRING CLIENTS OR ADDED FREE HOSTING ETC AND IF SHIT HAPPENS...SORT IT OUT,DO NOT MAIL ME. I just host with them. That said, best of luck. Cheers, -Ryan On 2/4/2004 12:52:35 AM, Tim Thorburn ([EMAIL PROTECTED]) wrote: > I've moved sites between 3 or 4 different hosting providers until I found > one that didn't > sell out the week after we signed up, and was actually fast > enough along with decent tech support. Never had any troubles with PHP as > > long as the version was somewhat similar. Started with Sun Solaris, went > > to RedHat Linux, then Debian, now on FreeBSD - all works well ;) > > Though, now that I think of it, there was one situation where a client > chose the hosting company - I have a set password restricted area that I > use for most sites - it > wouldn't work with the client chosen host ... after > 5 or 6 emails back and forth I finally got the host to make the one minor > change in their php.ini file ... but it was a pain. > > If you can, I'd > suggest asking to see the result from phpinfo(); and > compare the config settings between your current host and the target host - > > just for any inconsistencies you can look forward to later on ;) > > At 05:39 PM 2/3/2004, John Nichel wrote: > >Daryl Meese wrote: > > > >>Hello all, > >>I am considering changing hosting providers and moving from FreeBSD to > >>Linux. > >>My question is are there any PHP related issue -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FreeBSD to Linux -- PHP Issues
I've moved sites between 3 or 4 different hosting providers until I found one that didn't sell out the week after we signed up, and was actually fast enough along with decent tech support. Never had any troubles with PHP as long as the version was somewhat similar. Started with Sun Solaris, went to RedHat Linux, then Debian, now on FreeBSD - all works well ;) Though, now that I think of it, there was one situation where a client chose the hosting company - I have a set password restricted area that I use for most sites - it wouldn't work with the client chosen host ... after 5 or 6 emails back and forth I finally got the host to make the one minor change in their php.ini file ... but it was a pain. If you can, I'd suggest asking to see the result from phpinfo(); and compare the config settings between your current host and the target host - just for any inconsistencies you can look forward to later on ;) At 05:39 PM 2/3/2004, John Nichel wrote: Daryl Meese wrote: Hello all, I am considering changing hosting providers and moving from FreeBSD to Linux. My question is are there any PHP related issues to moving (functions that don't work on Linux but do on FreeBSD, etc)? I doubt there are but have to cover the bases. Nope, no issues that I'm aware of (shouldn't be). Functions working and not working will depend on a) the functions you're currently using, b) version of php on the different hosts, and c) if the new host has the options compiled in that you're currently using. Also, if you got any suggestions for hosts with solid dedicated server plans I would appreciate replies of the list. Thanks, Daryl Meese I've had good experiences with JTLNet (http://www.jtlnet.com) -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] authentication comparing to /etc/passwd
Hi, is there a PHP function or some sort of way to have a user enter their username and password in a form, and compare the username and password and see if the username exists and the password is correct? basically I want to have a page where a person enters their username and password and if correct to use the header function to send them to the a page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular expressions
replacement is evaluated... therefore: function check_this_out($arg) { return "$arg"; } $myString = 'hello'; $pattern = '/(.*)/e'; $replacement = "check_this_out('\\1' . ' $myString')"; echo preg_replace($pattern, $replacement, 'test says:'); [EMAIL PROTECTED] wrote: Thank you very much Jochem and John. It works like a charm now, and I was beginning to grow weary after experimenting with result sets for almost 10 hours now. How would you - by the way - concatenate text to the replacement string? ;-Pete On Tue, 3 Feb 2004 14:15:00 -0500, [EMAIL PROTECTED] (John W. Holmes) wrote: From: "Jochem Maas" <[EMAIL PROTECTED]> alternatively (actually this looks like the easier way to do it!) use preg_replace(), with the 'e' modifier tagged onto the end of the replacement expression: the 'e' modifier causes the expression to be evaluated as PHP. http://nl2.php.net/manual/en/function.preg-replace.php http://nl2.php.net/manual/en/pcre.pattern.modifiers.php something like: $pattern = '/\[link="([[:graph:]]+)"]/'; $replacement = "/check_this_out('\1')/e"; $output = preg_replace($pattern, $replacement, $output); Good idea, except the "e" modifier goes in the pattern, not the replacement. And you don't need delimiters in the replacement. $pattern = '/\[link="([[:graph:]]+)"]/e'; $replacement = "check_this_out('\1')"; $output = preg_replace($pattern, $replacement, $output); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FreeBSD to Linux -- PHP Issues
Daryl Meese wrote: Hello all, I am considering changing hosting providers and moving from FreeBSD to Linux. My question is are there any PHP related issues to moving (functions that don't work on Linux but do on FreeBSD, etc)? I doubt there are but have to cover the bases. Nope, no issues that I'm aware of (shouldn't be). Functions working and not working will depend on a) the functions you're currently using, b) version of php on the different hosts, and c) if the new host has the options compiled in that you're currently using. Also, if you got any suggestions for hosts with solid dedicated server plans I would appreciate replies of the list. Thanks, Daryl Meese I've had good experiences with JTLNet (http://www.jtlnet.com) -- 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
RE: [PHP] New lines
[snip] This is where the var's $list and $additional_letters are filled. The file is called hangman.php. I want to open this file, put the words into a html file so that someone can change them and write them back. That's it. [/snip] is it out of the question to store the values in ther own separate files. so : BUITENSPEL STAAN IEMAND BUITENSPEL ZETTEN BLOED AAN DE PAAL WILLEN ELKAAR DE BAL TOESPELEN DE BAL IS ROND DE BAL TERUGSPELEN OP HET VERKEERDE BEEN ZETTEN IN EIGEN DOEL SCHIETEN VOOR OPEN DOEL SCOREN VOOR OPEN DOEL MISSEN GELE KAART KRIJTLIJNEN TREKKEN EEN SCHOT VOOR OPEN DOEL VLIEGENDE KIEP EEN VOORZET GEVEN AAN DE ZIJLIJN STAAN AFFLUITEN BOBO EEN-TWEETJE NATRAPPEN PANIEKVOETBAL PATATGENERATIE TACKELEN is in one file and : -.,;!?%&0123456789 is in another file, then php opens those 2 files to get the values for the variables. I would think that would be a lot easier than trying to edit the php file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FreeBSD to Linux -- PHP Issues
Hello all, I am considering changing hosting providers and moving from FreeBSD to Linux. My question is are there any PHP related issues to moving (functions that don't work on Linux but do on FreeBSD, etc)? I doubt there are but have to cover the bases. Also, if you got any suggestions for hosts with solid dedicated server plans I would appreciate replies of the list. Thanks, Daryl Meese -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: include_once() isnt!
Rob wrote: Ive programmed with C/C++ for years and have recently started to dabble in PHP. Ive written a multi-part script for a friend and Ive run into a problem. Ive got 14 include files 3 of which are basic components that may or may not be used by other components. One is an authorisation class, another is a Dbase clas (For MySQL) and another is a file system component. Now heres the problem. My authorisation component uses the DBase component. Some of my other components use the DBase component only some of the time and the Auth and DBase components some of the time and the Auth component some of the time. SO... In the Auth component ive included (via include_once()) the DB component, because it needs it. NOW... in other modules Ive included (via include_once()) the auth, DB, and gallery components. Heres where the problem lies. Each component is in a separate file, and when I run the script, I get an arror saying I cant re-define the classes. Which makes me believe that the include_once() function is trying to include the other components even though they are already included. So, does that mean that include_once() only works right when it is used in the same file? It wont recognise that an include was already included in another include? Have I confused you yet? I am. I have two things you can check. First, make sure that *all* if these includes are using include_once() and not include(). Second. check the paths you're using. If you're including the same file but with a different path (an extra / or . maybe) it could be thinking that they are different. -- paperCrane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New lines
Guys, guys, No quarrel please! The website of mr. Wong works fine. The first time it take a long time to open and I falsly thought the site didn't work. But on the other site i know what html is and no the list i want has nothing to do with html! The code I use is not mine, it is a hangman game wich I want to write a admin page for So here's some code: # list of words (phrases) to guess below, separated by new line $list = "BUITENSPEL STAAN IEMAND BUITENSPEL ZETTEN BLOED AAN DE PAAL WILLEN ELKAAR DE BAL TOESPELEN DE BAL IS ROND DE BAL TERUGSPELEN OP HET VERKEERDE BEEN ZETTEN IN EIGEN DOEL SCHIETEN VOOR OPEN DOEL SCOREN VOOR OPEN DOEL MISSEN GELE KAART KRIJTLIJNEN TREKKEN EEN SCHOT VOOR OPEN DOEL VLIEGENDE KIEP EEN VOORZET GEVEN AAN DE ZIJLIJN STAAN AFFLUITEN BOBO EEN-TWEETJE NATRAPPEN PANIEKVOETBAL PATATGENERATIE TACKELEN"; $additional_letters = " -.,;!?%&0123456789";# extra characters given in words; '?' not work ** This is where the var's $list and $additional_letters are filled. The file is called hangman.php. I want to open this file, put the words into a html file so that someone can change them and write them back. That's it. Nico > -Oorspronkelijk bericht- > Van: John Nichel [mailto:[EMAIL PROTECTED] > Verzonden: dinsdag 3 februari 2004 21:57 > Aan: [EMAIL PROTECTED] > Onderwerp: Re: [PHP] New lines > > > John W. Holmes wrote: > > > From: "John Nichel" <[EMAIL PROTECTED]> > > > >>If all the OP wants to do is echo out the file, then why not just use > >>the file() function. Then each line is loaded up into an array element, > >> and you've saved yourself a bit of cpu. And your example above > >>doesn't address the OP's claim that it is not handling new lines. > > > > > > file_get_contents() would be the fastest. And once the OP learns the > > difference between TEXT and HTML, he'll realize he just needs to use the > > nl2br() function. :) > > > > ---John Holmes... > > > > Yeah, Jason suggested that (nl2br), and was told by the OP that he was > wrong, so the realization may take more time than expected. ;) > > -- > 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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include_once() isnt!
Ive programmed with C/C++ for years and have recently started to dabble in PHP. Ive written a multi-part script for a friend and Ive run into a problem. Ive got 14 include files 3 of which are basic components that may or may not be used by other components. One is an authorisation class, another is a Dbase clas (For MySQL) and another is a file system component. Now heres the problem. My authorisation component uses the DBase component. Some of my other components use the DBase component only some of the time and the Auth and DBase components some of the time and the Auth component some of the time. SO... In the Auth component ive included (via include_once()) the DB component, because it needs it. NOW... in other modules Ive included (via include_once()) the auth, DB, and gallery components. Heres where the problem lies. Each component is in a separate file, and when I run the script, I get an arror saying I cant re-define the classes. Which makes me believe that the include_once() function is trying to include the other components even though they are already included. So, does that mean that include_once() only works right when it is used in the same file? It wont recognise that an include was already included in another include? Have I confused you yet? I am. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Document generation from XML
I'm working with another (very unusual) webserver on our intranet. When I wanted to do graphs recently I settled on an XML output from my other server, and a PHP routine on apache that produces the graph. The other server references the PHP which outputs a .png sending enough information to that routine to request XML from the first server. Our applications are not heavily used, but this works well, and I will probably use it to create other forms of output as well. Olwen Williams [EMAIL PROTECTED] -Original Message- From: Cesar Cordovez [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 04, 2004 10:02 AM To: Russell Seymour Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Document generation from XML I had exactly the same problem some time ago... My solution was very similiar of what you are trying to do, but my "internal" format is not XML but a group of arrays (faster processing). Then using some OOP I created the diferent "output formats" for my reports, therefore I have a microsoft excel object, a pdf object, a html, an xml object, etc. (you get the idea). Russell Seymour wrote: > Good evening list, > > I apologise profusely if after reading anyone thinks that is OT, but I > relally need some pointers with a project I am working on. I have searched > the Internet for information on XML document generation but there is too > much information that I cannot decide which way to go. Thanks lots in > advance. > > I am currently writing a web based application using PHP that created > reports on the fly from a multitude of data sources. > CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Safe Air Ltd immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Safe Air. _ For more information on the Safe Air Group, visit us online at http://www.safeair.co.nz/ _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular expressions
Thank you very much Jochem and John. It works like a charm now, and I was beginning to grow weary after experimenting with result sets for almost 10 hours now. How would you - by the way - concatenate text to the replacement string? ;-Pete On Tue, 3 Feb 2004 14:15:00 -0500, [EMAIL PROTECTED] (John W. Holmes) wrote: >From: "Jochem Maas" <[EMAIL PROTECTED]> > >> alternatively (actually this looks like the easier way to do it!) use >> preg_replace(), with the 'e' modifier tagged onto the end of the >> replacement expression: the 'e' modifier causes the expression to be >> evaluated as PHP. >> >> http://nl2.php.net/manual/en/function.preg-replace.php >> http://nl2.php.net/manual/en/pcre.pattern.modifiers.php >> >> something like: >> >> $pattern = '/\[link="([[:graph:]]+)"]/'; >> $replacement = "/check_this_out('\1')/e"; >> $output = preg_replace($pattern, $replacement, $output); > >Good idea, except the "e" modifier goes in the pattern, not the replacement. >And you don't need delimiters in the replacement. > >$pattern = '/\[link="([[:graph:]]+)"]/e'; >$replacement = "check_this_out('\1')"; >$output = preg_replace($pattern, $replacement, $output); > >---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Document generation from XML
I had exactly the same problem some time ago... My solution was very similiar of what you are trying to do, but my "internal" format is not XML but a group of arrays (faster processing). Then using some OOP I created the diferent "output formats" for my reports, therefore I have a microsoft excel object, a pdf object, a html, an xml object, etc. (you get the idea). Russell Seymour wrote: Good evening list, I apologise profusely if after reading anyone thinks that is OT, but I relally need some pointers with a project I am working on. I have searched the Internet for information on XML document generation but there is too much information that I cannot decide which way to go. Thanks lots in advance. I am currently writing a web based application using PHP that created reports on the fly from a multitude of data sources. In the beginning only one output format was required, HTML and then PDF was a requirement. More and more formats are now required by my users and rather than create a new output script for each different format I am thinking about outputting the final report as XML and then putting that through 'something' to render in the format that I require. However I am unclear as to the best way to do this as there seems to be many different ways. I have looked at using Apache FOP and DocBook, but they all spawn off in different directions and bringing in other things such as Jade. This post maybe slightly OT, but if nayone has any pointers on how I amy go about doing this I would be very very grateful. Thanks very much. Russell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New lines
A LOT of this is pure speculation though, which is why I sent the one I did. Since with it he can patch whatever data he gets from $line into his code wherever he needs it, whether he flat file is pure text or some HTML or if the output is going to be a drop-down list (nl2br wouldn't work in this case, right?) or just a straight display of the stuff line by line (nl2br in this case) but as with I have found with my own stuff, my bosses like to change the UI halfway through, so the less code I have to go back and fiddle with while developing is worth the extra CPU cycles. 2 * 2G processor and 1G of ram means cpu cycles I won't miss... Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Document generation from XML
On Tue, 2004-02-03 at 13:50, Russell Seymour wrote: > In the beginning only one output format was required, HTML and then PDF was > a requirement. More and more formats are now required by my users and > rather than create a new output script for each different format I am > thinking about outputting the final report as XML and then putting that > through 'something' to render in the format that I require. > > However I am unclear as to the best way to do this as there seems to be many > different ways. I have looked at using Apache FOP and DocBook, but they all > spawn off in different directions and bringing in other things such as Jade. You can create xml with various extensions in php. You can use sax or dom to do that or create your own strings that contain xml syntax. I have done both. What are you really trying to do? Create an xml file from various data sources? Or create an xml file from another xml file? -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New lines
John W. Holmes wrote: From: "John Nichel" <[EMAIL PROTECTED]> If all the OP wants to do is echo out the file, then why not just use the file() function. Then each line is loaded up into an array element, and you've saved yourself a bit of cpu. And your example above doesn't address the OP's claim that it is not handling new lines. file_get_contents() would be the fastest. And once the OP learns the difference between TEXT and HTML, he'll realize he just needs to use the nl2br() function. :) ---John Holmes... Yeah, Jason suggested that (nl2br), and was told by the OP that he was wrong, so the realization may take more time than expected. ;) -- 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
[PHP] Document generation from XML
Good evening list, I apologise profusely if after reading anyone thinks that is OT, but I relally need some pointers with a project I am working on. I have searched the Internet for information on XML document generation but there is too much information that I cannot decide which way to go. Thanks lots in advance. I am currently writing a web based application using PHP that created reports on the fly from a multitude of data sources. In the beginning only one output format was required, HTML and then PDF was a requirement. More and more formats are now required by my users and rather than create a new output script for each different format I am thinking about outputting the final report as XML and then putting that through 'something' to render in the format that I require. However I am unclear as to the best way to do this as there seems to be many different ways. I have looked at using Apache FOP and DocBook, but they all spawn off in different directions and bringing in other things such as Jade. This post maybe slightly OT, but if nayone has any pointers on how I amy go about doing this I would be very very grateful. Thanks very much. Russell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New lines
From: "John Nichel" <[EMAIL PROTECTED]> > If all the OP wants to do is echo out the file, then why not just use > the file() function. Then each line is loaded up into an array element, > and you've saved yourself a bit of cpu. And your example above > doesn't address the OP's claim that it is not handling new lines. file_get_contents() would be the fastest. And once the OP learns the difference between TEXT and HTML, he'll realize he just needs to use the nl2br() function. :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New lines
Robert Sossomon wrote: There was a wong answer and then there is the right answer: $fp = fopen($file,"r"); while (!feof($fp)) { $line = fgets($fp, 4096); //gets one line at a time echo $line; // Or whatever else you want to do } fclose($fp); HTH. Robert If all the OP wants to do is echo out the file, then why not just use the file() function. Then each line is loaded up into an array element, and you've saved yourself a bit of cpu. And your example above doesn't address the OP's claim that it is not handling new lines. Course, without seeing his code, or having him explain the issue a bit better, all we're doing is spitting in the wind. -- 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
Re: [PHP] New lines
On Wednesday 04 February 2004 03:26, Robert Sossomon wrote: > There was a wong answer I assume that was a weak attempt at a cheap joke, or else you couldn't spell, or you need a new keyboard, or something. > and then there is the right answer: Whether that is the right answer depends on why the OP thought fread() didn't "cope with new lines". -- 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-general -- /* 86. What do you mean that wasn't a copy? --Top 100 things you don't want the sysadmin to say */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Printer Friendly pages
Thanks., alex > -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 03, 2004 1:27 PM > To: Alex Hogan; PHP General list > Subject: Re: [PHP] Printer Friendly pages > > From: "Alex Hogan" <[EMAIL PROTECTED]> > > > I have a printer friendly page and I want to get rid of the referring > url > at > > the bottom of the page. How can I do this? I can't seem to find any > > reference to this in the archives. > > This is controlled by the browser; there's no way for PHP to change it. > > ---John Holmes... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. **
Re: [PHP] Sessions vs. MySQL records?
On Tue, 2004-02-03 at 11:05, Brian Dunning wrote: > I have an application where I want users to only be allowed 5 searches > per day unless they create an account. > > There may not be a simple answer to this, but in general, would it be > preferred to do this with 24-hour session variables, or by writing a > MySQL record for each visitor with the date and their IP address and > tracking their usage count? This is one of those tricky problems with web applications. If you rely on sessions then they can just delete the cookie and start over. If you use IP address than people can either disconnect and reconnect. Or even worse if someone gets an IP from their isp someone else already used on your site then they won't be able to do even one search. Lastly, If you have them create a 'basic' account so you can track it they can just create as many accounts as they want. Armed with that knowledge I would suggest the following: First of all, forget IP addresses. They are not reliable enough to assume that multiple requests from the same IP are the same person, especially if you are targeting business customers. Using a non-authenticated session is an easy way to solve your problem, however it will be *dead* simple to get around - switch browsers or delete your cookies. If your searches are relevant to each other (the second search uses session information from the first search, etc.) then this may be more useful since the only way around this is to destroy the session, effectively starting over. Lastly, using basic user accounts (just a username, password, and e-mail) would be your best solution. Granted someone can create 50 yahoo accounts and sign up 50 times. However, the cost to them of creating those accounts, maintaining 50 accounts on your site, and having to log-out and back in every 5 searches may be enough to convince them to pay you instead. Good Luck, Adam P.S. Should you find a 'magic' bullet to the web authentication problem please let all of us know! -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New lines
There was a wong answer and then there is the right answer: $fp = fopen($file,"r"); while (!feof($fp)) { $line = fgets($fp, 4096); //gets one line at a time echo $line; // Or whatever else you want to do } fclose($fp); HTH. Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printer Friendly pages
From: "Alex Hogan" <[EMAIL PROTECTED]> > I have a printer friendly page and I want to get rid of the referring url at > the bottom of the page. How can I do this? I can't seem to find any > reference to this in the archives. This is controlled by the browser; there's no way for PHP to change it. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Printer Friendly pages
I think what you're talking about is a function of the explorer browser. The user would have to remove it him/herself. - jon -Original Message- From: Alex Hogan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 03, 2004 8:12 AM To: PHP General list Subject: [PHP] Printer Friendly pages Hi All, I have a printer friendly page and I want to get rid of the referring url at the bottom of the page. How can I do this? I can't seem to find any reference to this in the archives. alex hogan ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. ** --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular expressions
From: "Jochem Maas" <[EMAIL PROTECTED]> > alternatively (actually this looks like the easier way to do it!) use > preg_replace(), with the 'e' modifier tagged onto the end of the > replacement expression: the 'e' modifier causes the expression to be > evaluated as PHP. > > http://nl2.php.net/manual/en/function.preg-replace.php > http://nl2.php.net/manual/en/pcre.pattern.modifiers.php > > something like: > > $pattern = '/\[link="([[:graph:]]+)"]/'; > $replacement = "/check_this_out('\1')/e"; > $output = preg_replace($pattern, $replacement, $output); Good idea, except the "e" modifier goes in the pattern, not the replacement. And you don't need delimiters in the replacement. $pattern = '/\[link="([[:graph:]]+)"]/e'; $replacement = "check_this_out('\1')"; $output = preg_replace($pattern, $replacement, $output); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session (maybe cookies)
Matt Matijevich wrote: Take a look at the manual for sessions session_start() has to be the first thing called It doesn't have to be the first thing called. It only has to be called BEFORE any output is sent to the browser IF you are using cookie based. -- 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
Re: [PHP] Problem setting include_path for virtual servers
On Tue, 2004-02-03 at 12:46, Pablo Gosse wrote: > However when I call the following file under either domain: > > echo get_include_path(); > ?> > > I get this: > > .:/usr/local/lib/php Are you sure you have the correct Options set for the directories that those files are under? Try setting: AllowOverride All for those directories in you apache config file. See the following for more information: Apache 2.x: http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride Apache 1.x: http://httpd.apache.org/docs/mod/core.html#allowoverride -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem setting include_path for virtual servers
Pablo Gosse wrote: Hi folks. I have two virtual servers running under Apache. I want each to have a different include_path so I've set the following in each conf file: For Domain 1: php_value include_path ".:/u0/vservers/domain1.mydomain.ca/html" For Domain 2 php_value include_path ".:/u0/vservers/ domain2.mydomain.ca/html" However when I call the following file under either domain: I get this: .:/usr/local/lib/php which is obviously not right, and I know for certain that the daemon has been restarted. Can anyone tell me why this might be happening, or what I need to do to get the different include paths to be recognized? Cheers and TIA, Pablo Maybe your 'IfModule' isn't getting excuted. Try putting the php_value line in each without the wrapper. Or, you can try putting it in a .htaccess in the document root of the virtual. -- 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
Re: [PHP] Session (maybe cookies)
http://www.w3.org/TR/html4/loose.dtd";> Untitled Document Take a look at the manual for sessions session_start() has to be the first thing called http://www.w3.org/TR/html4/loose.dtd";> Untitled Document -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session (maybe cookies)
On Tue, 2004-02-03 at 13:44, Rolf van de Krol wrote: > I tried to start a session by this code: > "http://www.w3.org/TR/html4/loose.dtd";> > > > Untitled Document > > > > > echo(session_id()); > ?> > > The session_start() function call needs to be at the top of the page, before you send any html to the browser. -- Adam Bregenzer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New lines
Nico Berg wrote: He, Jason thank's. BTW, the site www.gremlins.biz doesn't work, maybe learn something about webdeamons before making websites... His site works for me. Maybe you shouloh, nevermind. Gr, Nico PS wrong guess! If you were a bit more clear about your issue, and if you posted some code, maybe he wouldn't have to guess. -- 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
[PHP] Session (maybe cookies)
Hi all, I tried to start a session by this code: http://www.w3.org/TR/html4/loose.dtd";> Untitled Document When I execute it I got the following error: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at e:\rolf\sites\thinkquest\sessiontest.php:9) in e:\rolf\sites\thinkquest\sessiontest.php on line 9 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at e:\rolf\sites\thinkquest\sessiontest.php:9) in e:\rolf\sites\thinkquest\sessiontest.php on line 9 e183565b226d52b334b792e4b367221c These are the headers which my browser sended: GET http://localhost/sessiontest.php HTTP/1.0 Accept: */* Accept-Language: ie-ee,nl;q=0.7,is;q=0.3 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Host: localhost Proxy-Connection: Keep-Alive And these are the headers which Apache returned: HTTP/1.1 200 OK Date: Tue, 03 Feb 2004 18:38:40 GMT Server: Apache/1.3.28 (Win32) PHP/4.3.3 X-Powered-By: PHP/4.3.3 Connection: close Content-Type: text/html Does anybody know why these errors occurs?? Waiting for answer, Rolf van de Krol -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mcrypt don't work.
Have you tried to check if PHP has been compiled with mcrypt? try this on a page Look for mcrypt directives, if not there you need to download it and compile it like so. http://mcrypt.sourceforge.net Get both the libmcrypt and mcrypt compressed archives from command prompt on linux... cd /path/to/libmcrypt.xx.tar.gz gzip -dfrv libmcrypt.xx.tar.gz tar -xvf libmcrypt.xx.tar cd libmcrypt.xx/ ./config --disable-posix-threads make make install now do the same for mcrypt cd /path/to/mcrypt.xx.tar.gz gzip -dfrv mcrypt.xx.tar.gz tar -xvf mcrypt.xx.tar cd mcrypt.xx/ ./config --disable-posix-threads make make install now you need to compile php for mcrypt support cd /path/to/php-4.xx ./configure --with-mcrypt=/path/to/libmcrypt/ make make install simple, now if your using apache on windows you need to get the windows executables from mcrypt.sourceforge.net Also if mcrypt is already installed simple do a find find / | grep libmcrypt from a command prompt to find the libraries, if you cannot find it them install it, or just re-compile php to include support. Hope this helps, it took me awhile to figure it out too. Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?
My lord, this rocks! Our pages load at least twice as fast now, and bandwidth will likely be reduced by at least a factor of 2. I would strongly recommend utilizing zlib compression functions to anyone looking to speed page delivery & reduce bandwidth! --Noah "Rush" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Ammar Ibrahim" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > if this works for you, could you please post your story in the group. this > > is very interesting if you could save 50% of your bandwidth just by > turning > > the zlib flag :) > > if you check amount of data that gets transfered from > http://www.moj-posao.net/ (once that images are cached, which is usually > imediately after the first page is loaded) you will see that amount > transfered is is in region of 10k, while the html source of the page is > about 50k. You do the math :) It is also has a great effect on page loading > time for dial-up users. > > rush > -- > http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?
Hey all. No such luck re: just using ini_set() to compress pages Rush's link is HIGHLY useful -- thanks Rush! http://www.phpbuilder.com/columns/argerich20010125.php3?page=2 Works without a hitch in IE 5+ and NN 4.7+ with PHP 4.2.3 --Noah "Ammar Ibrahim" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > if this works for you, could you please post your story in the group. this > is very interesting if you could save 50% of your bandwidth just by turning > the zlib flag :) > > good Luck, > Ammar > > "Cf High" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hey all. > > > > Having a good problem -- our hockey report site has jumped from 10 > > gigs/month to 30+ gigs/month & growing. > > > > We're getting killed in bandwidth fees at the moment; barring switching to > > another host, will utilizing ZLIB compression significantly reduce > > bandwidth? > > > > Also, in terms of ZLIB settings, I've ini_set() zlib compression to ON. > > > > Additionally, do I need to ob_start() (& flush) page output? > > > > I am uncertain how to implement the following: > > > > example.php > > > > > session_start(); > > > > ini_set("zlib.output_compression","ON"); > > ini_set("zlib.output_compression_level",4); > > > > ob_start(); > > > > $page_contents = fopen(** read file contents to variable **); > > > > ob_end_flush(); > > ?> > > > > Thanks for any advice, > > > > --Noah > > > > -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mcrypt don't work.
Francesco, mcrypt_ functions rely on a PHP extension, your syntax look ok, PHP is telling you that it could not load the required extension (module). the following page from the PHP manual tells more about what you need in order to use mcrypt_ functions: http://nl2.php.net/manual/en/ref.mcrypt.php I also noticed that you are trying to use the IDEA encryption algorithm; afaik this is only free for use non-commercial use... although you may not care ;-) [EMAIL PROTECTED] wrote: Hi all, i've problem with mcrypt_cfb function. This is the code: $string = "A simple text string"; $key = "My key"; line 55: $encrypted = mcrypt_cfb(MCRYPT_IDEA, $key, $string, MCRYPT_ENCRYPT); $key = "My key"; line 59: $string = mcrypt_cfb(MCRYPT_IDEA, $key, $encrypted, MCRYPT_DECRYPT); I've alway this error message: Warning: mcrypt_cfb(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/critto.php on line 55 stringa cifrata= Warning: mcrypt_cfb(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/critto.php on line 59 stringa decifrata= and I don't know where is the problem.. Is the sintax correct? I see mcrypt function in PHP manual at www.php.net but I don't find the problem. Can you explain me how use mcrypt function? All helps are precious. Thanks in advance. Frank [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem setting include_path for virtual servers
Hi folks. I have two virtual servers running under Apache. I want each to have a different include_path so I've set the following in each conf file: For Domain 1: php_value include_path ".:/u0/vservers/domain1.mydomain.ca/html" For Domain 2 php_value include_path ".:/u0/vservers/ domain2.mydomain.ca/html" However when I call the following file under either domain: I get this: .:/usr/local/lib/php which is obviously not right, and I know for certain that the daemon has been restarted. Can anyone tell me why this might be happening, or what I need to do to get the different include paths to be recognized? Cheers and TIA, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POSSIBLE TO SETUP PHP USING PROXY AS DEFAULT?
The problem is that i'm using a windows for that, the anomizer i use to connect to different proxys waits on 127.0.0.1/localhost, so i can't redirect the whole outbound traffic on port 80 for that Hi, There is a topic called transparent proxying. Don't have any links in my bookmarks but if you visit either the squid proxy websites or the iptables website you will find it. (this is usually done with this combination but can be done with other proxy/firewall combos as well). Basically what happens is that at the network layer all outbound port 80 traffic is redirected by iptables to the proxy server (which will have to run on a different port). Most ISPs in asia resort to this tactic. all the best Jack Bauer wrote: >Hi, > >i'm looking for a method to setup php to use >a proxy for all http/ftp connections. >i know it's possible to write a script >that can do this, but i need to setup php >itself for that (php.ini or something like this) > >i tried different tools for that to tunnel all >connection but i didn't found anything that >works for me > > >regards > > > -- 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
Re: [PHP] Regular expressions
Pete, you can probably do what you want with preg_replace_callback: http://nl2.php.net/manual/en/function.preg-replace-callback.php only the function call will be set up slightly differently; namely you don't pass the callback reference directly, instead the callback function that is called recieves an array with all the matches in - which you can then use to spit something back out. --- alternatively (actually this looks like the easier way to do it!) use preg_replace(), with the 'e' modifier tagged onto the end of the replacement expression: the 'e' modifier causes the expression to be evaluated as PHP. http://nl2.php.net/manual/en/function.preg-replace.php http://nl2.php.net/manual/en/pcre.pattern.modifiers.php something like: $pattern = '/\[link="([[:graph:]]+)"]/'; $replacement = "/check_this_out('\1')/e"; $output = preg_replace($pattern, $replacement, $output); [EMAIL PROTECTED] wrote: Hi there, I have serious probems resolving regular expressions. I wish to replace a substring with a given pattern with results of a function with a backreference used as argument. SAMPLE: function check_this_out($somevalue) { $url_array = ''; $i=0; $query = "SELECT SomeRow FROM SomeTable WHERE SomeRowID='$somevalue';"; $result = mysql_query($query) or die (mysql_error().$query); $someow = mysql_fetch_array($result); var_dump($somerow); return ($query); } $output = 'aliquyam erat, sed diam voluptua. [link="21"]This is a test[/link]'; echo ($output); echo (''); $output = ereg_replace('\[link="([[:graph:]]+)"]',check_this_out('\1'), $output); echo (''); var_dump ($output); $output2 = 'aliquyam erat, sed diam voluptua. [link="21"]This is another test[/link]'; echo ($output); echo (''); $output2 = ereg_replace('/\[link="([[:graph:]]+)"]/',check_this_out('\1'), $output); echo (''); var_dump ($output2); The problem is, that although the $query string in this example will echo as "SELECT SomeRow FROM SomeTable WHERE SomeRowID='21';", where $somevalue has been replaced by '21' as a result by the regular expressions, it will eventually render as "SELECT SomeRow FROM SomeTable WHERE SomeRowID='\1';" when mysql is called, return the row with SomeRowID='\1', which incidently is not the row I want... I tried type casting to no avail. Has anybody experienced similar problems or know how to get around this? My php version is somewhere between 4.3.4 and 4.3.5... a 4.3.5-dev... Best Regards Peter Normann ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regular expressions
Hi there, I have serious probems resolving regular expressions. I wish to replace a substring with a given pattern with results of a function with a backreference used as argument. SAMPLE: function check_this_out($somevalue) { $url_array = ''; $i=0; $query = "SELECT SomeRow FROM SomeTable WHERE SomeRowID='$somevalue';"; $result = mysql_query($query) or die (mysql_error().$query); $someow = mysql_fetch_array($result); var_dump($somerow); return ($query); } $output = 'aliquyam erat, sed diam voluptua. [link="21"]This is a test[/link]'; echo ($output); echo (''); $output = ereg_replace('\[link="([[:graph:]]+)"]',check_this_out('\1'), $output); echo (''); var_dump ($output); $output2 = 'aliquyam erat, sed diam voluptua. [link="21"]This is another test[/link]'; echo ($output); echo (''); $output2 = ereg_replace('/\[link="([[:graph:]]+)"]/',check_this_out('\1'), $output); echo (''); var_dump ($output2); The problem is, that although the $query string in this example will echo as "SELECT SomeRow FROM SomeTable WHERE SomeRowID='21';", where $somevalue has been replaced by '21' as a result by the regular expressions, it will eventually render as "SELECT SomeRow FROM SomeTable WHERE SomeRowID='\1';" when mysql is called, return the row with SomeRowID='\1', which incidently is not the row I want... I tried type casting to no avail. Has anybody experienced similar problems or know how to get around this? My php version is somewhere between 4.3.4 and 4.3.5... a 4.3.5-dev... Best Regards Peter Normann ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POSSIBLE TO SETUP PHP USING PROXY AS DEFAULT?
Hi, There is a topic called transparent proxying. Don't have any links in my bookmarks but if you visit either the squid proxy websites or the iptables website you will find it. (this is usually done with this combination but can be done with other proxy/firewall combos as well). Basically what happens is that at the network layer all outbound port 80 traffic is redirected by iptables to the proxy server (which will have to run on a different port). Most ISPs in asia resort to this tactic. all the best Jack Bauer wrote: Hi, i'm looking for a method to setup php to use a proxy for all http/ftp connections. i know it's possible to write a script that can do this, but i need to setup php itself for that (php.ini or something like this) i tried different tools for that to tunnel all connection but i didn't found anything that works for me regards -- 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
[PHP] Re: starting a session
"Angelo Zanetti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > is there ever a certain situation where you would have something at the top > of your page before session_start();? If so why would it be before > session_start();? I have a situation where I'm saving an object in session. If I don't include that class file before starting the session, it adds another property to the object called (something like) UnDefined_Object. Everything else works fine, but just to get rid of that, I always include the class file before starting the session. -- Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Telnet Deamon?
hi, Theoretically possible but practically very difficult. The telnet protocol is a lot more complex than it looks at first glance. Even to login you need to do a lot of negotiation. Dev wrote: Hello all, I currently have a generic socket daemon running and doing what it should but I am wondering if there is a way to have a php script act as a telnet daemon? Thanks to you all in advance! -- 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
[PHP] POSSIBLE TO SETUP PHP USING PROXY AS DEFAULT?
Hi, i'm looking for a method to setup php to use a proxy for all http/ftp connections. i know it's possible to write a script that can do this, but i need to setup php itself for that (php.ini or something like this) i tried different tools for that to tunnel all connection but i didn't found anything that works for me regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions vs. MySQL records?
Hi, By sessions i assume you mean cookies (session information can be stored in other places such as a mysql database). If you do store the information in a cookie, your visitors can easily delete the cooky and get past your protection mechanism. Having said that opting for a mysql table that stores IP information isn't good enough either. Most dialup and ADSL users have dynamic IPs. So they may also get past your restrictions. Your best best would be to have a password protected website and limit the number of searchs per user based on userid. all the best. Brian Dunning wrote: I have an application where I want users to only be allowed 5 searches per day unless they create an account. There may not be a simple answer to this, but in general, would it be preferred to do this with 24-hour session variables, or by writing a MySQL record for each visitor with the date and their IP address and tracking their usage count? Thanks in advance for any thoughts. - Brian -- 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
[PHP] mcrypt don't work.
Hi all, i've problem with mcrypt_cfb function. This is the code: $string = "A simple text string"; $key = "My key"; line 55: $encrypted = mcrypt_cfb(MCRYPT_IDEA, $key, $string, MCRYPT_ENCRYPT); $key = "My key"; line 59: $string = mcrypt_cfb(MCRYPT_IDEA, $key, $encrypted, MCRYPT_DECRYPT); I've alway this error message: Warning: mcrypt_cfb(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/critto.php on line 55 stringa cifrata= Warning: mcrypt_cfb(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/critto.php on line 59 stringa decifrata= and I don't know where is the problem.. Is the sintax correct? I see mcrypt function in PHP manual at www.php.net but I don't find the problem. Can you explain me how use mcrypt function? All helps are precious. Thanks in advance. Frank [EMAIL PROTECTED]
Re: [PHP] Re: Issue with 'W' in the date() function?
I really have to stop replying to myself :) Anyway i think that i have the solution... function timestamp2YearWeek ($time) { if (date('z', $time) > 360 && date('W', $time) == 1) { return sprintf('%d%02d', date('Y', $time)+1, date('W', $time)); }else{ return sprintf('%d%02d', date('Y', $time), date('W', $time)); } } William Bailey wrote: Ok. Its been a long day and my brain is starting to shut down so... How would i work out which year the 'W' relates to? I have a unix timestamp value and want to end up with the correct 'YW' value. William Bailey wrote: Hi Mike, Because week 1 is defined as the first week with four or more days in the new year. Therefore, working backwards, the 29th-31st are also in week 1 in 2004. Thanks, So now i will just have to check the year and then work out from that what the correct year should be. (i need to get a YW value). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions vs. MySQL records?
On Wednesday 04 February 2004 00:05, Brian Dunning wrote: > I have an application where I want users to only be allowed 5 searches > per day unless they create an account. Unless you require that a user logs in before they can perform a search then there is no meaningful way to track how many searches they have performed. > There may not be a simple answer to this, but in general, would it be > preferred to do this with 24-hour session variables, or by writing a > MySQL record for each visitor with the date and their IP address and > tracking their usage count? Never use an IP address as a unique identifier unless you're in a closed network environment under your control. -- 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-general -- /* Good news. Ten weeks from Friday will be a pretty good day. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Issue with 'W' in the date() function?
On Wednesday 04 February 2004 00:16, William Bailey wrote: > Ok. Its been a long day and my brain is starting to shut down so... > > How would i work out which year the 'W' relates to? > > I have a unix timestamp value and want to end up with the correct 'YW' > value. Would it have anything to do with the 'Y'? -- 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-general -- /* "My father? My father left when I was quite young. Well actually, he was asked to leave. He had trouble metabolizing alcohol." -- George Carlin */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Comparing multiple Mysql tables to find duplicates
On Wednesday 04 February 2004 00:09, Chris Bruce wrote: > I have modified your line { $email_list .= "'{$row['email']}',"; }, > with { $email_list .= str_replace("'", "\'", "'{$r[email]}',"); }, but > now it escapes all the single quotes. Is there a php function that > escapes single quotes in Mysql queries? Yes, surprisingly enough it's called mysql_escape_string(). > If not, do you know the best > way to escape *only* single quotes in the email address string and not > the single quotes surrounding the string? > > Example (output of $email_list) > '[EMAIL PROTECTED]','[EMAIL PROTECTED]'that.com','etc... > Need to escape the [EMAIL PROTECTED]'that.com I don't understand why you want to escape the single-quote. You shouldn't be allowing such entries anyway because quotes are not valid characters for domain names thus it's an invalid email address. -- 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-general -- /* Trust everybody, but cut the cards. -- Finlay Peter Dunne, "Mr. Dooley's Philosophy" */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Comparing multiple Mysql tables to find duplicates
From: Chris Bruce > Is there a php function that escapes single quotes > in Mysql queries? addslashes() mysql_escape_string() mysql_real_escape_string() ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Issue with 'W' in the date() function?
Ok. Its been a long day and my brain is starting to shut down so... How would i work out which year the 'W' relates to? I have a unix timestamp value and want to end up with the correct 'YW' value. William Bailey wrote: Hi Mike, Because week 1 is defined as the first week with four or more days in the new year. Therefore, working backwards, the 29th-31st are also in week 1 in 2004. Thanks, So now i will just have to check the year and then work out from that what the correct year should be. (i need to get a YW value). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP code encryption
Here are some for you to try: www.sourceguardian.com www.zend.com www.ioncube.com There is also one within mmCache (http://turck-mmcache.sourceforge.net/). Just read the forum about the current status of this open source project as the founder has gone to work for Zend and will no longer be maintaining the project himself (although others might). Ade > -Original Message- > From: Hamid Hossain [mailto:[EMAIL PROTECTED] > Sent: 03 February 2004 16:04 > To: [EMAIL PROTECTED] > Subject: [PHP] PHP code encryption > > > Hi, > > I am working in a project for a customer of my company, I am > using PHP and I > want to prevent my customer from touching my code. > > The problem that I have to install the application in the > customer computer. > So, I am looking for a way to encrypt my PHP code. > > I heard that there is a way but I don't have details. How to > do this? Is it > legal to be used in a commercial purposes? Is it free? Should > I install > somthing in the customer's pc to decrypt my code? Could I > have some not > encrypted pages (eg: config.php) ? > > Thanks, > Hamid Hossain > > _ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Comparing multiple Mysql tables to find duplicates
HI John, I have this working with the exception of when there is a ' in an email address that I want to remove. I have modified your line { $email_list .= "'{$row['email']}',"; }, with { $email_list .= str_replace("'", "\'", "'{$r[email]}',"); }, but now it escapes all the single quotes. Is there a php function that escapes single quotes in Mysql queries? If not, do you know the best way to escape *only* single quotes in the email address string and not the single quotes surrounding the string? Example (output of $email_list) '[EMAIL PROTECTED]','[EMAIL PROTECTED]'that.com','etc... Need to escape the [EMAIL PROTECTED]'that.com Thanks. -- Chris Bruce [EMAIL PROTECTED] Idextrus E-Business Architects http://www.idextrus.com 3282 Wilmar Cres. Mississauga, ON L5L4B2 CA 905.828.9189 This e-mail and its contents are privileged, confidential and subject to copyright. If you are not the intended recipient, please delete this e-mail immediately. Any unauthorized use or disclosure of the information herein is prohibited. On Jan 30, 2004, at 12:54 PM, John W. Holmes wrote: From: "Chris Bruce" <[EMAIL PROTECTED]> Mysql 3.23.54. My first thought was to load the output from the tables into an array and they use a foreach and in_array to create a list of dups, but I wanted to see if there was an easier way. Ah, in that case, my other query won't work. :) This should: $query = "SELECT list1.email FROM master_list, list1 WHERE master_list.email = list1.email"; $result = mysql_query($query) or die(mysql_error()); while($r = mysql_fetch_assoc($result)) { $email_list .= "'{$row['email']}',"; } $email_list = substr($email_list,0,-1); //remove last comma $query = "DELETE FROM list1 WHERE email IN ($email_list)"; $result = mysql_query($query) or die(mysql_error()); ?> Repeat for other tables. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Printer Friendly pages
Hi All, I have a printer friendly page and I want to get rid of the referring url at the bottom of the page. How can I do this? I can't seem to find any reference to this in the archives. alex hogan ** The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. **
[PHP] Sessions vs. MySQL records?
I have an application where I want users to only be allowed 5 searches per day unless they create an account. There may not be a simple answer to this, but in general, would it be preferred to do this with 24-hour session variables, or by writing a MySQL record for each visitor with the date and their IP address and tracking their usage count? Thanks in advance for any thoughts. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Issue with 'W' in the date() function?
Hi Mike, Because week 1 is defined as the first week with four or more days in the new year. Therefore, working backwards, the 29th-31st are also in week 1 in 2004. Thanks, So now i will just have to check the year and then work out from that what the correct year should be. (i need to get a YW value). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Thumbnail Page
PETCOL typed this on 02/02/2004 03:47 PM: I think I'm having a "Bad Hair Day" I have a table in my database with all my thumbnail filenames in it. My query pull that out, now I want to display the images in a table, I can get it to go down the page row by row, but I want it to say do five columns of different images and then go down the page with different images? Maybe even have Next and Previous at the bottom would be nice. Anyone got a suggestion, other than a good night sleep ;-) Col I won't tell you how to specifically do it, as that's the fun of programming...but I'll give you a few tips. Let's say you have 20 rocks. You want five columns of images, so you would have 4 rows by 5 images. Essentially, you want a table that looks like so: x x x x x x x x x x x x x x x x x x x x First you would build your recordset. Then you would open up a table and begin your first row. How many rocks would you have to count, before you ended your row and started a new row? So, you would need a method of counting where you were in your recordset to know when to close the table row and when to open up a new one. 1 2 3 4 5 6 7 8 9 10 ... -Robby -- #--- # Robby Russell, | Sr. Administrator / Lead Programmer # Command Prompt, Inc. | http://www.commandprompt.com # [EMAIL PROTECTED] | Telephone: (503) 667.4564 #--- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP code encryption
Hi, I am working in a project for a customer of my company, I am using PHP and I want to prevent my customer from touching my code. The problem that I have to install the application in the customer computer. So, I am looking for a way to encrypt my PHP code. I heard that there is a way but I don't have details. How to do this? Is it legal to be used in a commercial purposes? Is it free? Should I install somthing in the customer's pc to decrypt my code? Could I have some not encrypted pages (eg: config.php) ? Thanks, Hamid Hossain _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] starting a session
From: "Angelo Zanetti" <[EMAIL PROTECTED]> > is there ever a certain situation where you would have something at the top > of your page before session_start();? If so why would it be before > session_start();? Sure, there could be. It just wouldn't be able to output anything unless you were using output buffering. You may want to include library files, connect to database, etc, before you start the session. Depends upon the programmer. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Issue with 'W' in the date() function?
William Bailey wrote: Hi all, Can somebody please explain this for me... [EMAIL PROTECTED]:/usr/home/wb [11]-> php $time = strtotime('now -5 weeks'); printf("\n\n%s is in week %d of the year %d\n\n", date('Y-m-d', $time), date('W', $time), date('Y', $time)); ?> ^D 2003-12-30 is in week 1 of the year 2003 [EMAIL PROTECTED]:/usr/home/wb [12]-> Why does it return 1 as the week of the year for that date? Because week 1 is defined as the first week with four or more days in the new year. Therefore, working backwards, the 29th-31st are also in week 1 in 2004. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Telnet Deamon?
Hello all, I currently have a generic socket daemon running and doing what it should but I am wondering if there is a way to have a php script act as a telnet daemon? Thanks to you all in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New lines
On Tuesday 03 February 2004 22:50, Nico Berg wrote: > BTW, the site www.gremlins.biz doesn't work, maybe learn something about > webdeamons before making websites... Works for me ... maybe you have the wrong browser. > PS wrong guess! Well, I'm no mind-reader. If you're not going to post any code then consider this thread dead. -- 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-general -- /* Why do we drive on parkways and park on driveways? -- Why Why Why n30 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New lines
He, Jason thank's. BTW, the site www.gremlins.biz doesn't work, maybe learn something about webdeamons before making websites... Gr, Nico PS wrong guess! > -Oorspronkelijk bericht- > Van: Jason Wong [mailto:[EMAIL PROTECTED] > Verzonden: dinsdag 3 februari 2004 15:16 > Aan: [EMAIL PROTECTED] > Onderwerp: Re: [PHP] New lines > > > On Tuesday 03 February 2004 21:26, Nico Berg wrote: > > fread gives back "FIRST SECOND AND THIRD FOURTH" > > How did you ascertain that? > > > How can i get the list as is? > > Taking a wild guess I would say you need to familiarise yourself > with HTML > before using PHP. In the meantime you could have a look at nl2br(). > > -- > 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-general > -- > /* > Artificial intelligence has the same relation to intelligence as > artificial flowers have to flowers. > -- David Parnas > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Issue with 'W' in the date() function?
Hi all, Can somebody please explain this for me... [EMAIL PROTECTED]:/usr/home/wb [11]-> php $time = strtotime('now -5 weeks'); printf("\n\n%s is in week %d of the year %d\n\n", date('Y-m-d', $time), date('W', $time), date('Y', $time)); ?> ^D 2003-12-30 is in week 1 of the year 2003 [EMAIL PROTECTED]:/usr/home/wb [12]-> Why does it return 1 as the week of the year for that date? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 3 Feb 2004 14:16:27 -0000 Issue 2568
php-general Digest 3 Feb 2004 14:16:27 - Issue 2568 Topics (messages 176645 through 176677): Re: auto forms from mysql database 176645 by: Justin Patrin Question about dates 176646 by: Renan G. Galang 176647 by: John Nichel 176650 by: John W. Holmes Re: [Stats] PHP Net List: January 2004 176648 by: John Nichel 176660 by: Raditha Dissanayake Retrieve specific data from MySQL 176649 by: Matt Hedges 176651 by: John Nichel 176652 by: Jochem Maas 176653 by: Matt Hedges 176654 by: John Nichel 176655 by: Jochem Maas 176658 by: Matt Hedges SQL Query Not Kosher? 176656 by: Mr. Austin 176657 by: Mr. Austin 176670 by: Marek Kilimajer Re: looking for a way to manually free memory in the middle of a script 176659 by: kumar mcmillan Selling PHP Code? PHP Careers? 176661 by: Galen starting a session 176662 by: Angelo Zanetti 176672 by: memoimyself.yahoo.com.br Re: Zlib Compression || Implementation || Bandwidth Savings? 176663 by: rush 176668 by: Ammar Ibrahim 176674 by: rush PHP and DataSet from C# (VB) 176664 by: Sichta Daniel 176665 by: Stuart 17 by: Stuart Re: PHP timeout 176667 by: Mario Re: Adding one month to a given date 176669 by: Ammar Ibrahim my changes in php.ini are not recognized 176671 by: Burckhardt Übersohn New lines 176673 by: Nico Berg 176677 by: Jason Wong R: [PHP] SQL Query Not Kosher? 176675 by: Alessandro Vitale Problems with exec 176676 by: Jason Freeman Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Justin French wrote: On Tuesday, February 3, 2004, at 12:19 PM, Justin Patrin wrote: Sounds like you want to look into some of the PEAR projects. DB_DataObject knows about field types and can do required fields and such. DB_DataObject_FormBuilder can give you a form to edit fields which can be customized in *any* way you want it to be. It includes facilities for hiding fields as well as *many* others. I'm also working on DB_DataObject_FormBuilder_Frontend which will give you a whole frontend to choose tables and view / edit fields from any table. http://pear.php.net/package/DB_DataObject http://pear.php.net/package/DB_DataObject_FormBuilder They DO sound like what I want, and I've been looking at the above already, but I don't want the overhead or requirements of Pear. This will end up as a distro, and adding pear to the equation is far from desirable. Thanks anyway! Justin French What overhead and requirements? It doesn't take that much to load PEAR (mod_php will hold 'compiled' versions in memory, too) and I don't see the requirements as much either. A few hundred K of files (not all of which will be loaded at any given time) for a good framework, unified error handling, and lots of functionality that you don't have to re-invent is well worth it. -- paperCrane --- End Message --- --- Begin Message --- I just need a confirmation, when the getdate() function is invoked inside a PHP script, the date returned will be the server hosting the pages' date and not the client requesting the page, right? or am i wrong in my assumption? Thanks guys. --- End Message --- --- Begin Message --- Renan G. Galang wrote: I just need a confirmation, when the getdate() function is invoked inside a PHP script, the date returned will be the server hosting the pages' date and not the client requesting the page, right? or am i wrong in my assumption? Thanks guys. Correct. -- By-Tor.com It's all about the Rush http://www.by-tor.com --- End Message --- --- Begin Message --- Renan G. Galang wrote: I just need a confirmation, when the getdate() function is invoked inside a PHP script, the date returned will be the server hosting the pages' date and not the client requesting the page, right? or am i wrong in my assumption? Thanks guys. Yes, you are not wrong in your assumption. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com --- End Message --- --- Begin Message --- Bill Doerrfeld wrote: Top 20 Contributors by Number of Posts -- Richard Davey 80 John Nichel 75 John W. Holmes 73 Jason Wong 68 Chris Shiflett 66 Ryan A
Re: [PHP] New lines
On Tuesday 03 February 2004 21:26, Nico Berg wrote: > fread gives back "FIRST SECOND AND THIRD FOURTH" How did you ascertain that? > How can i get the list as is? Taking a wild guess I would say you need to familiarise yourself with HTML before using PHP. In the meantime you could have a look at nl2br(). -- 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-general -- /* Artificial intelligence has the same relation to intelligence as artificial flowers have to flowers. -- David Parnas */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems with exec
Hi there I'm having a bit of trouble with executing system commands. My script reads as follows. The problem is that when I run this script the page does not load and apache crashes. Does anyone know a way around this problem?? Thanks
[PHP] R: [PHP] SQL Query Not Kosher?
try removing curly braces as follows: $query = mysql_query("UPDATE stories SET status='approved' WHERE story_id={$id}"); | | | \/ $query = mysql_query("UPDATE stories SET status='approved' WHERE story_id=$id"); or $query = mysql_query("UPDATE stories SET status='approved' WHERE story_id=${id}"); this applies if story_id is of type int in mysql table definition, or you should enclose it among '' if is of type char, varchar or similar. cheers alessandro -Messaggio originale- Da: Mr. Austin [mailto:[EMAIL PROTECTED] Inviato: martedì 3 febbraio 2004 5.35 A: [EMAIL PROTECTED] Oggetto: [PHP] SQL Query Not Kosher? Hi all: I am trying to get this to work, but always get the same error: that the resource in mysql_affected_rows() is not valid. Anyone see why this would be? All variables have been tested for accuracy. $query = mysql_query("UPDATE stories SET status='approved' WHERE story_id={$id}"); if(mysql_affected_rows($query) == 1) { print("Your approval of \"$title\" was successful. If this user entered an email address, they have been sent a notice of its approval and publication on the site."); } else { print("The approval of \"$title\" was not successful. Please check with the site administrator for assistance."); } The above SQL statement works perfectly with phpMyAdmin (and, oddly enough, works with the above script, yet the Warning is produced and the 'not successful' message is displayed) Any thoughts are appreciated! Mr. Austin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?
"Ammar Ibrahim" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > if this works for you, could you please post your story in the group. this > is very interesting if you could save 50% of your bandwidth just by turning > the zlib flag :) if you check amount of data that gets transfered from http://www.moj-posao.net/ (once that images are cached, which is usually imediately after the first page is loaded) you will see that amount transfered is is in region of 10k, while the html source of the page is about 50k. You do the math :) It is also has a great effect on page loading time for dial-up users. rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New lines
Hi all, I have a list of words (sense): FIRST SECOND AND THIRD FOURTH etc fread gives back "FIRST SECOND AND THIRD FOURTH" How can i get the list as is? Nico -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] starting a session
Hello Angelo, On 3 Feb 2004 at 9:36, Angelo Zanetti wrote: > is there ever a certain situation where you would have something at the top > of your page before session_start();? If so why would it be before > session_start();? The closest thing to a "certain situation" that I can think of is when want to set session variables only if certain conditions are met (e.g. only if the password submitted by a user matches the one in the database). In this case, for obvious reasons, you'll need PHP code before the session_start() statement. Does this help at all? Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] my changes in php.ini are not recognized
I am just starting in php (but 10 years experience in developping, last 5 years in JAVA). I have installed on a Windows 2000 PC: Apache 2.0 as localhost-server, MySQL 4.0.17 and PHP 4.3.4-Win32. All parts seem to work properly. My first steps into php also looked quite well. Next level: sending HTML-forms and then reading the POSTed vars on another page, also was running fine. B*U*T, when defining some $_SESSION vars, their values were NOT available on another page in the same session. (I was using session-start properly). When testing and experimenting with phpinfo, ini_get(), and similars, I found this: The php.ini file is C:\WINNT\php.ini, also found by get_cfg_var("cfg_file_path"). When I do some changes in the ini, maybe for session_save.path (which was "/tmp" and I change to "C:\PHP\sessiondata"), and I stop and start the apache again (sometimes I stoped and restarted Windows), then the ini_get("session.save_path") delivers again "/tmp". The same happens with other ini-variables: (very important is, to get error-messages, but I cannot change the specific vars in the ini, better: I can change, but it has no effect). I was looking, if there are other "ini"s in my system, but NO. And... and...and ...:two days work without result. The question, I see, is: from where does Apache+PHP take the values for the ini-Params, because from my php.ini obviously NOT. Thank you in advance for reading (and laughing ?) about my silly problem. Maybe, you have an idea, what is to do ? Buri (say simply "Buri" instead of Burckhardt) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL Query Not Kosher?
The argument to mysql_affected_rows must be mysql CONNECTION identifier (from mysql_connect), not RESULT identifier (from mysql_query). Removing the argument will work for you. Mr. Austin wrote: Hi all: I am trying to get this to work, but always get the same error: that the resource in mysql_affected_rows() is not valid. Anyone see why this would be? All variables have been tested for accuracy. $query = mysql_query("UPDATE stories SET status='approved' WHERE story_id={$id}"); if(mysql_affected_rows($query) == 1) { print("Your approval of \"$title\" was successful. If this user entered an email address, they have been sent a notice of its approval and publication on the site."); } else { print("The approval of \"$title\" was not successful. Please check with the site administrator for assistance."); } The above SQL statement works perfectly with phpMyAdmin (and, oddly enough, works with the above script, yet the Warning is produced and the 'not successful' message is displayed) Any thoughts are appreciated! Mr. Austin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Adding one month to a given date
Use mysql's Date Functions. works like magic :) Good Luck, Ammar "Merlin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi there, > > I am trying to add one month to a given date. Somehow I am lost > inbetween mktime, date and unix timestamps ;-( > > Can anybody give me a hint on that? > > The date format I do have is: 2003-10-19 > > Guess this does not work: > $ptm = '2003-10-19'; > $ptm = 1 + mktime('YmdHis',$ptm); > > Thanx for any help, > > Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?
if this works for you, could you please post your story in the group. this is very interesting if you could save 50% of your bandwidth just by turning the zlib flag :) good Luck, Ammar "Cf High" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey all. > > Having a good problem -- our hockey report site has jumped from 10 > gigs/month to 30+ gigs/month & growing. > > We're getting killed in bandwidth fees at the moment; barring switching to > another host, will utilizing ZLIB compression significantly reduce > bandwidth? > > Also, in terms of ZLIB settings, I've ini_set() zlib compression to ON. > > Additionally, do I need to ob_start() (& flush) page output? > > I am uncertain how to implement the following: > > example.php > > session_start(); > > ini_set("zlib.output_compression","ON"); > ini_set("zlib.output_compression_level",4); > > ob_start(); > > $page_contents = fopen(** read file contents to variable **); > > ob_end_flush(); > ?> > > Thanks for any advice, > > --Noah > > -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP timeout
Hi all just a note that the problem was with the php 4.3.2 version finally and nothing to do with permissions. So if anyonwe has a similar problem, install a different version (the 4.3.4 is working fine here) Mario - Original Message - From: "Mario" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 30, 2004 3:28 PM Subject: Re: [PHP] PHP timeout > it looks like it has nothing to do with MySQL and just with php > > I'm running a simple script like > $x=23; > > echo $x; > > and it displays the number 23 properly, but the page keeps loading like > there is something else to load too. > > - Original Message - > From: "Raditha Dissanayake" <[EMAIL PROTECTED]> > To: "Mario" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Friday, January 30, 2004 1:33 PM > Subject: Re: [PHP] PHP timeout > > > > Hi, > > > > Make sure the mysql service is started and make sure that there isn't > > anything else competing for the same port (3306) beyond that i am afraid > > i cannot help as i am not a windows expert. > > > > > > Mario wrote: > > > > >both php and mysql is on the same machine. > > > > > >even running the following timesout: > > > > > > > >if (!($mylink = @mysql_pconnect("localhost","*","**"))) > > > > > >print "Problem connecting to the database server\n"; > > > > > >exit(); > > > > > >} > > > > > >mysql_select_db("xxx") or die ("Problem connecting to the > > >databaseDescription:" . mysql_error()); > > > > > >?> > > > > > > > > > > > > > > > > > -- > > 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 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php