Re: [PHP] PHP Hosting
> Curt Zirzow wrote: > > * Thus wrote Ed Lazor: > > > >>Hey, does anyone have experience hosting PHP / MySQL apps on EV1servers.net, > >>ServerBeach.net, or CIhost.com? I'm looking for value, reliability, and > >>quality support. Any other recommendations are also greatly appreciated. http://www.spenix.com Very good prices, very good support. -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can someone explain this?
Forgive me if my math is askew, but doesn't the negative imply the number is signed? If I remember from my C++ days, a declaration of: unsigned int blah; Meant you could not store negative numbers in that variable. Hence, negatives would be signed. No? On Tue, 2004-06-08 at 12:52, René Fournier wrote: > $dec = -71788; > echo $dec."\n"; > > $hex = dechex($dec)."\n"; > $dec2 = hexdec($hex)."\n"; > > echo $dec2."\n"; > > -= PRODUCES: =- > > -71788 > 3961595508 > > > Is this something about signed versus unsigned integers? What I really > would like to do is convert that negative number (-71788), which I > suppose is unsigned to a signed integer (3961595508) without having to > convert it to hex, then back to decimal. > > Rene -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP graphing tool?
http://www.aditus.nu/jpgraph/ On Mon, 2004-05-10 at 16:10, Amanda Hemmerich wrote: > Is there a PHP tool or module out there that would be good for creating > line or bar graphs? I'm looking for something I can pass numbers to and > it will just graph those numbers. > > Any recommendations? > > Thanks! > Amanda -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] system command?
lol On Mon, 2004-05-10 at 11:16, Jay Blanchard wrote: > [snip] > I didn't sent off list > [/snip] > > I am in an relatively crappy mood this day, you may want to NOT refute > something I have said and in essence call me a liar. You'll get little > help that way. > > P.S. Stop top posting too. -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system command?
I believe when you add the -f flag, the tail command doesn't exit, it just keeps printing as data is appended to the log, did you try dropping the -f flag? On Mon, 2004-05-10 at 10:15, Jas wrote: > Anyone know what this wouldn't work? I have tried using a couple of > functions defined at http://us2.php.net/manual/en/ref.exec.php and none > seem to have the desired effect. > > $tailed = shell_exec('tail -f /path/to/log'); > //$tailed = exec('tail -f /path/to/log'); > //$tailed = system('tail -f /path/to/log'); > print = "$tailed"; > ?> > > Thanks in advance, > Jas -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: form submission logic
On Fri, 2004-05-07 at 13:47, Torsten Roehr wrote: > > This is more of a HTML than a PHP question, but anyway: > It doesn't matter where you put the buttons as long as they are INSIDE the > form-tag and have different names. > Actually you don't even have to have names for the buttons, for example: -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] LAMP
I've also heard the Perl Zealots claim the P could or does stand for Perl, but ignore there Jedi mind tricks. On Fri, 2004-05-07 at 11:00, Jay Blanchard wrote: > [snip] > Anyone know what LAMP stand for > [/snip] > > > All of us but you. > > Linux Apache MySQL PHP -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Web Hosting
Not sure about that particular host, but if your looking for one with good features, and high reliability, I would suggest Spenix. http://www.spenix.com I asked them a question about my hosting plan (not even a support request) at 9PM and was sent a response within 5 minutes. Very good support, I would definitely recommend them. On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for Sprint] wrote: > Some time ago I put up a web site on Domehost.com. Everything has been > working great and I had a couple questions for their Tech Support but > haven't received any feedback from them, they don't answer their phones. > Also, it is stated on their site that a company called Wintek Computing > took them over last year. I can't contact them either. Does anyone > know anything that may have happened here? I suspect I need to find > another web hosting company before my site just goes away. > > Stanley G. Martin > System Administrator > Sprint - EAS Business Intelligence > [EMAIL PROTECTED] -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PDF Page Pulling
I need to be able to pull a certain page out of a multi-page PDF, and then be able to save that single page to it's own PDF file. Anyone know how to do this with free tools? Thanks. -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: why won't mssql work?
Your php.ini is in-fact in your WINNT directory correct? On Mon, 2004-03-29 at 13:37, Edward Peloke wrote: > >First of all, the obvious: make sure extension_dir in php.ini is set to > >the correct extensions directory. > > Yep > > >>you need to place ntwdblib.dll in the WINDOWS/System32 > > Yep > > And as far as IIS, I am running apache. > > Thanks, > Eddie > > -Original Message- > From: Ben Ramsey [mailto:[EMAIL PROTECTED] > Sent: Monday, March 29, 2004 12:01 PM > To: [EMAIL PROTECTED]; Edward Peloke > Subject: [PHP] Re: why won't mssql work? > > > EP> I know I am missing a stupid step but I have php_mssql.dll in my > EP> php extensions folder and have uncommented the line in the ini > EP> file yet it still doesn't recognize the functions. Do I need to > EP> do something else? > > First of all, the obvious: make sure extension_dir in php.ini is set to > the correct extensions directory. Also, did you restart IIS after you > made the changes to php.ini? Evertime you change php.ini, you need to > restart IIS. > > Secondly, for MS SQL extensions to work, you need to place ntwdblib.dll > in the WINDOWS/System32 folder (the location could differ depending on > your platform) on the machine that is running PHP. > > Then, restart IIS. > > -- > Regards, > Ben Ramsey > http://benramsey.com > http://www.phpcommunity.org/wiki/People/BenRamsey > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] transactions
I believe you can use transactions with InnoDB tables on MySQL, if this is the case, a simple "BEGIN;" to begin your transaction, and a "COMMIT;" to save all the changes, plus a "ROLLBACK;" to undo your changes, should be sufficient. On Mon, 2004-03-29 at 13:12, Matthew Oatham wrote: > Hi, > > Is there an elegant way to recover from DB errors in MySQL using PHP, i.e. > transactions and rolling back - basically I have an insert statement then an update > statement. if the insert succeeds the update is run but if the update fails I want > to undo the insert! > > Any suggestions, I guess I could get the last inserted row id and perform an sql > delete but is there a more elegant way? > > Cheers > > Matt -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_fetch_array
It would be position 0 in the array, or in your query after the date format function you could put "AS blah" and then it would come out as blah. On Fri, 2004-03-26 at 13:50, Chris Mach wrote: > I have this query to select the date from my table... > > SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table > > How do I know what name mysql_fetch_array assigned to the date_format ? > -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question
Thats what I was pointing out, the fact that the is_string function won't work if he selects "ab9cd" out of a DB, because as I understand it, he's looking to check a string to see if it contains all letters a to z. On Thu, 2004-03-25 at 09:31, Roger Spears wrote: > Try > > $test = 22; > > The " denotes a string and without quotes it denotes a value.... > > > HTH, > Roger -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question
Actually this is not true. For example: $test = "22"; if(is_string($test)) echo "IS A STRING"; Will print "IS A STRING". On Thu, 2004-03-25 at 09:18, Guillouet Nicolas wrote: > is_string() > > > Le jeu 25/03/2004 à 15:08, Lourenzo Dias a écrit : > > Hey, there. > > I'm a new php student from Brazil, and sorry about my ignorance writing > > in English. > > I'd like to know if exists any function in php that identifies a string > > as a-z, like is_num() to the numbers. > > > > Thanks, > > > > Lourenzo -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Thank you, Microsoft! Now I need an alternate loginmethod
Well, there is a MD5 javascript app, if you put a onclick method on your submit button, to call the javascript, and md5 the password, you could use a GET request to pass the username and md5'd password into your login script. I'm not sure if there is an equivalent SHA javascript, but if there is, I would use that instead. On Thu, 2004-03-18 at 14:38, Chris de Vidal wrote: > Adam Voigt said: > > If I ran XP I might be able to do that. From reading the security > > release my MS, it sounds like some times the POST request gets b0rked, > > Yep. > > > if this is the case, I'm not sure there's much that can be done about > > it. > > ...except find an alternate login method, which is my question. I know > this isn't a problem on every site else there'd be far more uproar against > Microsoft for not pushing it out. Surely there must be another method > other than the code I showed this mailing list. > > I searched this group and someone suggested disabling Apache's keepalives > but I don't have root on this box so that option is out. > > At this point it's either disable passwords or find an alternate method; > we're angering customers (thank you Microsoft!). > > /dev/idal -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Thank you, Microsoft! Now I need an alternate loginmethod
> Have another look at the code. Try it on your server if you'd like. You > can replicate the problem with an XP box that's recently (this month) been > automatically updated. If I ran XP I might be able to do that. From reading the security release my MS, it sounds like some times the POST request gets b0rked, if this is the case, I'm not sure there's much that can be done about it. -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Thank you, Microsoft! Now I need an alternate login method
What exactly is breaking? If it's the header to redirect, you could just issue a meta refresh, or a javascript one. On Thu, 2004-03-18 at 12:38, Chris de Vidal wrote: > Microsoft broke IE 6.0 SP1 on XP in January, requiring this patch to be > able to log into our MySQL-authenticated website: > http://www.microsoft.com/downloads/details.aspx?FamilyId=254EB128-5053-48A7-8526-BD38215C74B2&displaylang=en > > Microsoft won't put out this patch into the regular XP updates (I guess > because many websites use an alternate method and it doesn't impact as > many people). You have to download it manually. > > Of course, this is generating many complaints and we even lost a few > customers; people believe we're requring them to install software just to > log in, when we're really just requiring they fix something Microsoft > broke. > > So I really need an alternate MySQL-authenticated method. Surely they exist? > > I have a login page on an SSL-enabled Apache server that (I don't admin). > > Here's my code (you can download a complete copy from > http://devidal.tv/~chris/mysql_auth.tar.bz2, including the SQL to create > the members table). > > login.php: > == > > > if ($_GET["login_failed"]) > { > ?> > > <!-- > alert ("Incorrect email address or password!"); > // --> > > } > ?> > > > > > > > > > === > > edit_agent.php: > === > require_once ("open_db.php"); > require_once ("check_login.php"); > > echo "You won't be able to see this unless you have a valid login."; > > require_once ("close_db.php"); > ?> > == > > check_login.php: > > require_once ("valid_email.php"); > $email = $_POST["email"]; > if (!valid_email ($email)) > { > require_once ("close_db.php"); > header ("Location: login.php?login_failed=true"); > exit; > } > > // Only alphanumeric > $password = preg_replace ("/[^\w]/", "", $_POST["password"]); > > $query = " > SELECT ID > FROM members > WHERE Email = '$email' > AND Password = PASSWORD('$password') > AND Active = '1' > "; > > $result = @mysql_query ($query); > > // Only if we have matching records > if ([EMAIL PROTECTED] ($result) >= 1) > { > require_once ("close_db.php"); > header ("Location: login.php?login_failed=true"); > exit; > } > ?> > = > > valid_email.php: > > function valid_email($email) > { > if (ereg ("^([^[:space:]]+)@(.+)\.(.+)$", $email)) > { > return TRUE; > } else { > return FALSE; > } > } > ?> > = > > open_db.php is just mysql_connect and mysql_select_db, while close_db.php > is just mysql_free_result and mysql_close. I've included them in the > tarball above as well as the SQL you will need if you want to try this for > yourself. > > Again, this code worked well until Microsoft broke IE. It still works if > you apply the patch that Microsoft isn't rolling out to everyone. > > I'd considered using Apache's .htaccess files, but I haven't tried > connecting that to MySQL for authentication. And I don't have admin > access on the box to install anything on the server. > > Ideas?? > /dev/idal > "GNU/Linux is free freedom." -- Me -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php code to connect to MS-SQL SERVER
mssql_connect('repo',$User,$Pass); mssql_select_db('test'); On Thu, 2004-03-18 at 02:31, Rafi Sheikh wrote: > Hello folks. > > Basics: Apache 1.3.29, PHP 4.3.4, on WIN 2K-Pro > > SYS DSN=using SQL Server driver a connection exists (tested via Ms-Access) > against a SQL Server > > PROBLEM: I am very new in php, therefore requesting if a simple snippet of > code can be listed showing the proper way of making a connection to a SQL > server in a PHP script. > > Names to Use: > System DNS=repo > SQL Server Database name=test > User=rookie > > > I tried > he manual on PHP site, and read about ODBC_connect and odbc_fetch_array but > I admit that at 1.30 in the morning I am way over my head on this. Any > pointer to a source (beg level) or help with a code snippet is deeply > appreciated. > > Regards, > > RS > > > > This e-mail, including attachments, may include confidential and/or > proprietary information, and may be used only by the person or entity to > which it is addressed. If the reader of this e-mail is not the intended > recipient or his or her authorized agent, the reader is hereby notified that > any dissemination, distribution or copying of this e-mail is prohibited. If > you have received this e-mail in error, please notify the sender by replying > to this message and delete this e-mail immediately. -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to keep a timestamp from updating?
On MySQL anyway, the timestamp is by-design, a update/insert timestamp. I quote: The TIMESTAMP column type provides a type that you can use to automatically mark INSERT or UPDATE operations with the current date and time. If you have multiple TIMESTAMP columns, only the first one is updated automatically. I suppose if you really wanted to, you could create another timestamp column, and this one would not be automatically updated. On Thu, 2004-03-18 at 10:17, Brian Dunning wrote: > I have a timestamp field that updates itself with NOW() every time I > update the record. I don't want that to happen - I want it to remain as > the original creation timestamp. How do I prevent this from happening? > > Thanks, > > - Brian -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Replace space from form field using preg_replace
http://www.php.net/str-replace On Wed, 2004-03-17 at 15:48, Vernon wrote: > I want to be able to replace a space that comes from a form field (such as > in 123 My Street) with a + sign. > > Can anyone help me with this? > > Thanks -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Connect Problem - Client Lib / Server Version Skew
I would think the mysqlclient library would be backwards compatible, but it's possible I guess. I'm kind of out of ideas, as the can't connect error without something like a bad username or password message, seems to indicate a TCP/IP communication failure. On Wed, 2004-03-17 at 15:26, Cameron B. Prince wrote: > > What does your MySQL error log say on your production database server? > > It should be in the "var" directory named something ".err". > > These are SunFire 210 Solaris boxes. The MySQL is installed from binary. It > doesn't write a log by default as best I can tell, but I did find something. > > The MySQL on the webserver is: mysql-standard-4.0.16-sun-solaris2.9-sparc > > The MySQL on the dbserver is: mysql-3.23.54a-sun-solaris2.8-sparc > > > Do you think the version skew could cause this? > > Thanks, > Cameron -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Connect Problem
What does your MySQL error log say on your production database server? It should be in the "var" directory named something ".err". On Wed, 2004-03-17 at 15:16, Cameron B. Prince wrote: > > Change your server address, to leave off the port number. > > > > Any different? > > $DBhost = "192.168.1.44"; > $DBuser = "web"; > $DBpwd = "user"; > $DBreg = "registration"; > $DBconf = "config"; > > # setup database handle and load configuration data > > $dbh = mysql_connect($DBhost, $DBuser, $DBpwd) >or die("Could not connect : " . mysql_error()); > > mysql_select_db($DBconf) >or die("Could not select database"); > > > > > Could not connect : Can't connect to MySQL server on '192.168.1.44' (2) > > > Same thing... What could be wrong here... Geez, this is starting to worry > me. > > > Thanks for your help, > Cameron -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Connect Problem
Change your server address, to leave off the port number. Any different? On Wed, 2004-03-17 at 15:07, Cameron B. Prince wrote: > > So what error prints out when you try and connect from PHP? > > Could not connect : Can't connect to MySQL server on '192.168.1.44' (2) > > Not very helpful huh? > > Any ideas? > > Cameron -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Connect Problem
So what error prints out when you try and connect from PHP? On Wed, 2004-03-17 at 15:03, Cameron B. Prince wrote: > Hi Adam, > > > What happens when you try to use the "mysql" client on the > > web machine, to connect to the production database server? > > It works: > > bash-2.05# pwd > /usr/local/mysql/bin > bash-2.05# ./mysql -h 192.168.1.44 -u web -P 3306 -p > Enter password: > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 41999 to server version: 3.23.54-log > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > mysql> > > > > Does it work? If yes, what lines are you using to connect to > > your DB with PHP? > > > $DBhost = "192.168.1.44:3306"; > $DBuser = "web"; > $DBpwd = "user"; > $DBreg = "registration"; > $DBconf = "config"; > > $dbh = mysql_connect($DBhost, $DBuser, $DBpwd) > or die("Could not connect : " . mysql_error()); > > mysql_select_db($DBconf) >or die("Could not select database"); > > > > You notice anything wrong? > > Thanks, > Cameron -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Connect Problem
What happens when you try to use the "mysql" client on the web machine, to connect to the production database server? Does it work? If yes, what lines are you using to connect to your DB with PHP? On Wed, 2004-03-17 at 14:54, Cameron B. Prince wrote: > Hey guys, > > I've been developing my site on a dev server with MySQL locally installed. > I've now moved the site to the production webserver and setup my databases > on the production dbserver, which are two different machines. > > I have begin updating my connection variables and now I find I can't connect > to the database from within PHP. MySQL is installed on the webserver, but > not running as a daemon. If I run the mysql client and use the -h option, I > can connect to the database with no problems from the webserver. > > I've tried manually specifying the port, tried hostname and ip address, made > sure safe_mode is off and I'm not having any luck. > > I've checked in the phpinfo function and confirmed MySQL support is compiled > in: > > MySQL Support enabled > Active Persistent Links 0 > Active Links 0 > Client API version 4.0.16 > MYSQL_MODULE_TYPE external > MYSQL_SOCKET /tmp/mysql.sock > MYSQL_INCLUDE -I/usr/local/mysql/include > MYSQL_LIBS -L/usr/local/mysql/lib -lmysqlclient > > Directive Local Value Master Value > mysql.allow_persistent On On > mysql.connect_timeout 60 60 > mysql.default_host no value no value > mysql.default_password no value no value > mysql.default_port no value no value > mysql.default_socket no value no value > mysql.default_user no value no value > mysql.max_links Unlimited Unlimited > mysql.max_persistent Unlimited Unlimited > mysql.trace_mode Off Off > > Can anyone give me ideas to get this working? I must admit, I'm stumped. > > Here's the mysql_error: Can't connect to MySQL server on '192.168.1.44' > > >From the webserver error log: > > php4_execute reports: PHP Warning: mysql_connect(): Can't connect to MySQL > server on '192.168.1.44' (2) > > > > Thanks, > Cameron -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Simple: Whats wrong with this?
Well I accidentally deleted your original email, but I didn't see where you were getting the counter variable from. Where is the variable being stored? You do know that setting $counter++ for one visitor, doesn't translate the value of $counter to another, right? On Wed, 2004-03-17 at 12:05, Shane McBride wrote: > It doesn't seem to work either way for me. > > Shane > > -Original Message- > From: Jake McHenry [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 17, 2004 12:01 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Simple: Whats wrong with this? > > > > No. > > > > $correct++; > > > > Is all you need for the second condition, it automatically sets itself > > back. > > > > > Does this always work? In my timesheet app, I have to do $counter = $counter > + 1, because for some reason the $counter++; doesn't work. It just doesn't > work, no incrementation of the variable. Is there something in php.ini that > can prohibit this from working? > > Thanks, > Jake > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDF Creating
I don't know if this is still the case, but when I was using the PDF library to generate PDF's, the only way to know when to stop the current page and start the next, was by keeping track of what your pixel position on the page was, and if you were within such and such of the margin, you should call the close page, and open new page functions. On Wed, 2004-03-17 at 11:59, Robert Sossomon wrote: > I'm looking into this and getting all my ducks in a row before I get > buried here, but I'm hoping you guys might have the answers since so far > my search has been fruitless. > > I have the PDF librarys from FPDF and from Potential Tech, I have not > decided which one to use yet. > > If you follow this and the PHP-DB list you'll see that I have been > building an online quote system for the office for the last 6 months (on > and off) and what I need to do now is create PDF files from the quotes > that I can then send to a fax program to be faxed out to the customers. > The information will be emailed as well, but I want to create PDF files > for the fax software to use, and to save for use later (if needed). > > My question is how to I know how/where the pages will break, and how can > I make the generation of the PDF files work automagically? The first > page will always have a header set of information, and then the quote > following it, all other pages will just have the quoted items. > > Thoughts? > > TIA!! > Robert -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple: Whats wrong with this?
Not that I'm aware of. In every incantation I've ever seen of the incrementing, $correct++; Is always, 100% equal to: $correct = ($correct + 1); But, maybe you ran into a case where it's not, you never know. On Wed, 2004-03-17 at 12:00, Jake McHenry wrote: > > No. > > > > $correct++; > > > > Is all you need for the second condition, it automatically sets itself > > back. > > > > > Does this always work? In my timesheet app, I have to do $counter = $counter > + 1, because for some reason the $counter++; doesn't work. It just doesn't > work, no incrementation of the variable. Is there something in php.ini that > can prohibit this from working? > > Thanks, > Jake -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple: Whats wrong with this?
No. $correct++; Is all you need for the second condition, it automatically sets itself back. On Wed, 2004-03-17 at 11:52, Shane McBride wrote: > I have a form variable I want to increment by a value of 1 each time the > page loads. Here's what I have so far: > > if(!isset($correct)) { > $correct = 0; > } else { > $correct = $correct++; > } > > Seems like it should work? > > Thanks! > Shane -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connecting to MySQL from shellscript
It's trivial, just as if you were compiling for Apache, you just use the --with-mysql flag, and it will "just work". On Thu, 2004-03-11 at 10:47, Ian Firla wrote: > Hello all, > > I have a shellscript written in php that needs to connect to a mysql > database. Everything I've been reading suggests that this cannot be done > easily. Is this true? > > The one workaround I've found is: > > http://www.phpbuilder.com/annotate/message.php3?id=1012940 > > But it's very inelegant and likely to impact on performance with a > script that is being launched several hundred times an hour. > > Ideas? > > Ian -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Updating content on the line. (cli)
Well I bet it would work on Win32, it just depends on how much CYGWIN your willing to include with your program. I think all you would need is the basic CYGWIN DLL(s) and a terminal like bash (plus ncurses obviously). On Wed, 2004-03-03 at 11:07, Simon Fredriksson wrote: > Yes, that's one way. It's currently in development for Win32, but it > would be nice if it works on *nix later on aswell. Got a tip from a user > in a chatroom to use Ncurses for it, but then I can't use it on win32. > > Just to correct myself; it's chr(8) and not 7. > > //Simon > > Adam Voigt wrote: > > > I'm not sure of how you could do this, but one other thing you could do, > > is like I've seen certain console FTP apps do, is just do a division of > > the total size by whats downloaded, and have like 100 pound signs that > > are gradually filled in as it downloads. > > > > > > On Wed, 2004-03-03 at 10:53, Simon Fredriksson wrote: > > > >>I'm building a download-manager script (like wget), in PHP. Does any of > >>you know how I can update a line in the console? I've tried to echo > >>chr(7) which is the backspace character, but it won't work. This kind of > >>thing is seen in tons of console applications. Like some "please wait" > >>thing that changes from - to \, |, /, and so on (looks like a rotating > >>line). > >> > >>Ideas? > >> > >>//Simon -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Updating content on the line. (cli)
I'm not sure of how you could do this, but one other thing you could do, is like I've seen certain console FTP apps do, is just do a division of the total size by whats downloaded, and have like 100 pound signs that are gradually filled in as it downloads. On Wed, 2004-03-03 at 10:53, Simon Fredriksson wrote: > I'm building a download-manager script (like wget), in PHP. Does any of > you know how I can update a line in the console? I've tried to echo > chr(7) which is the backspace character, but it won't work. This kind of > thing is seen in tons of console applications. Like some "please wait" > thing that changes from - to \, |, /, and so on (looks like a rotating > line). > > Ideas? > > //Simon -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Importing PDF Text
Well yes, I know there are utilities, on the Linux server I can just use the "pdftotext" program, but I'd like to make it platform-independent instead of relying on outside utilites. On Fri, 2004-02-27 at 11:43, Stuart wrote: > Adam Voigt wrote: > > >I need the ability to take a PDF and pull the text out of it, I looked > >at the manual for the PDFlib extension, but didn't see anything like > >this. Anyone know a way to do this? > > > > > I don't believe there is a PHP-only way to do it, but there are many > tools around, both commercial and free, that can. I suggest you Google... > > http://www.google.com/search?q=pdf+to+text -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Importing PDF Text
I need the ability to take a PDF and pull the text out of it, I looked at the manual for the PDFlib extension, but didn't see anything like this. Anyone know a way to do this? -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Accessing SMB (Samba perhaps) resources
He said he doesn't want to run commands, which this script does. On Tue, 2004-02-24 at 13:54, Manuel Lemos wrote: > Hello, > > On 02/24/2004 08:11 AM, Howard Miller wrote: > > I want to be able to manipulate files that are on my samba file server from > > my PHP application. These shares are not normally mounted on my web server > > and it would be inconvenient and yet another administative maintenance task > > to do so. > > > > So... I want to be able to present a form to the user where they can type a > > URL (eg, //my.sambaserver/myshare/some/directory), a username and a > > password and for PHP to be able to manipulate the files therein. > > You may want to try this Samba Web client class that does precisely what > you want: > > http://www.phpclasses.org/smbwebclient > > -- > > Regards, > Manuel Lemos > > PHP Classes - Free ready to use OOP components written in PHP > http://www.phpclasses.org/ > > PHP Reviews - Reviews of PHP books and other products > http://www.phpclasses.org/reviews/ > > Metastorage - Data object relational mapping layer generator > http://www.meta-language.net/metastorage.html -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running php3 files
Obviously links would have to be changed to point to the .php pages, but that's easily done with a good text editor. What would be of more concern is, what is the difference between the old version of PHP your running, and the version the hosting company is running. I.E., has function behavior changed, functions removed, built-in library changes, etc. On Tue, 2004-02-24 at 13:45, Ryan A wrote: > Hi, > A small problem, a pal of mine is hosting with a company that has PHP > configured to run only > with the .php extention and not the .php3 extention... > > Where will he have to make the changes so that his scripts will run if its > .php or .php3 ? > > Thanks, > -Ryan -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing SMB (Samba perhaps) resources
Yes, you would infact have to issue an outside command, and to do so, you are correct in the fact you would have to write a good amount of code to check the validity of the string being executed. However, unless you actually install PHP on the samba server, and run it off that, there's not really a way to manipulate samba files without mounting/connecting to the share. On Tue, 2004-02-24 at 10:54, Howard Miller wrote: > Well, mainly because PHP doesn't (I think) have a mount function. It would > mean executing an external command. I always regard that as living a bit > dangerously - it can be difficult to write robust code that will recover > from a problem that way. > > Adam Voigt wrote: > > > Why can't you just mount the share on-the-fly when they enter the > > username and pass? > > > > > > On Tue, 2004-02-24 at 06:11, Howard Miller wrote: > >> Hi, > >> > >> I want to be able to manipulate files that are on my samba file server > >> from my PHP application. These shares are not normally mounted on my web > >> server and it would be inconvenient and yet another administative > >> maintenance task to do so. > >> > >> So... I want to be able to present a form to the user where they can type > >> a URL (eg, //my.sambaserver/myshare/some/directory), a username and a > >> password and for PHP to be able to manipulate the files therein. > >> > >> Maybe this is easy, but I can't see how to do it!! Any help appreciated. > >> > >> Thanks!! -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing SMB (Samba perhaps) resources
Why can't you just mount the share on-the-fly when they enter the username and pass? On Tue, 2004-02-24 at 06:11, Howard Miller wrote: > Hi, > > I want to be able to manipulate files that are on my samba file server from > my PHP application. These shares are not normally mounted on my web server > and it would be inconvenient and yet another administative maintenance task > to do so. > > So... I want to be able to present a form to the user where they can type a > URL (eg, //my.sambaserver/myshare/some/directory), a username and a > password and for PHP to be able to manipulate the files therein. > > Maybe this is easy, but I can't see how to do it!! Any help appreciated. > > Thanks!! -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Working with MS-SQL
http://www.freetds.org Enjoy. On Tue, 2004-02-24 at 08:53, [EMAIL PROTECTED] wrote: > Hello, > > How can we connect to MS-SQL Server ? > What tools ( where can we download ) must be installed ? > > Thank a lots. > > PS : the php programs under Linux / Unix... > > Ed. -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting Binaries
Well actually to check .com, just make sure it contains a / then the .com, that will filter yahoo.com, but keep yahoo.com/downloadme.com On Mon, 2004-02-23 at 14:19, Axel IS Main wrote: > Yes, and in fact that is what I am doing now. This is a spider bot > though, so I'm having to think of every single type of binary file that > could be linked to on the web. So far I'm up to 28 with no end in sight. > What about a .com file? I can't omit links that end in .com can I? That > would be counterproductive to say the least. Also, the function that > does the checking just keep getting longer and longer, which makes the > spider go slower and slower. Granted, the thing is pretty fast if it has > enough BW to work with, but still. This could eventually turn into a > script killer. Detecting whether the stream from file_get_contents(), or > fopen() for that matter, is binary or not and going with that result is > the elegant solution to this problem. There has to be a way to do it. > > Nick > > Adam Voigt wrote: > > >Couldn't you just check the extension on the file? > > > > > >On Mon, 2004-02-23 at 14:03, Axel IS Main wrote: > > > > > >>Guys, this isn't THAT stupid of a question is it? From my perspective, > >>the way PHP seems to see it is that I should already know what kind of > >>file I'm looking at. In most cases that's not an unreasonable > >>assumption. Unfortunately, that's only good for most cases. PHP is rich > >>in ways to work with the HTTP protocol, but has no way of detecting > >>whether it's opening a text file or a binary file. To me this is a > >>glaring omission. There has to be a way to do it, even if it's a > >>round-a-bout or backdoor kind of way. Nothing is impossible. > >> > >>Nick > >> > >>Axel IS Main wrote: > >> > >> > >> > >>>I'm using file_get_contents() to open URLs. Does anyone know if there > >>>is a way to look at the result and determine if the file is binary? > >>>I'd like to be able to block binaries from being processed without > >>>having to try to think of all the possible binary extensions and omit > >>>them with a function that looks for these extensions. > >>> > >>>Nick > >>> > >>> > >>> -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting Binaries
Couldn't you just check the extension on the file? On Mon, 2004-02-23 at 14:03, Axel IS Main wrote: > Guys, this isn't THAT stupid of a question is it? From my perspective, > the way PHP seems to see it is that I should already know what kind of > file I'm looking at. In most cases that's not an unreasonable > assumption. Unfortunately, that's only good for most cases. PHP is rich > in ways to work with the HTTP protocol, but has no way of detecting > whether it's opening a text file or a binary file. To me this is a > glaring omission. There has to be a way to do it, even if it's a > round-a-bout or backdoor kind of way. Nothing is impossible. > > Nick > > Axel IS Main wrote: > > > I'm using file_get_contents() to open URLs. Does anyone know if there > > is a way to look at the result and determine if the file is binary? > > I'd like to be able to block binaries from being processed without > > having to try to think of all the possible binary extensions and omit > > them with a function that looks for these extensions. > > > > Nick > > -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] E-Commerce Advice? Squirrelcart?
PayPal has some pretty impressive inter-active programming API's. Other then that, the only suggestion I could make is try and steer clear of AuthorizeNET. On Mon, 2004-02-23 at 12:53, Matt Hedges wrote: > Hello, > > I am working on using PHP to build a web store. > http://www.squirrelcart.com/ looks to be pretty good for a shopping cart- > does anyone have any experience with this or others? > > Also, what suggestions do ya'll have for a payment gateway? > > > thanks > matt -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can anyone tell me why this code doesn't insert anything?
Change your query line to this: $result = mysql_query($query) or die(mysql_error()); What does it output? On Mon, 2004-02-23 at 12:11, Brian Dunning wrote: > This inserts nothing into the database, but returns no error that I can > see. How come? What's wrong with it? > > $dbname = "my_database"; > $dbconnection = mysql_connect("mysql05.powweb.com","my_user","my_pass"); > mysql_select_db($dbname, $dbconnection); > $query = "INSERT INTO invoices > ('ip','total','creation','first_name','email','session','last_name') > VALUES > ('0.0.0.0','0.00',NOW(),'Bob','[EMAIL PROTECTED]','12345','Smith')"; > $result = mysql_query($query); -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-DB] Embedded MySQL server (libmysqld)?
Alright, well with any txt based system, your probably going to run into problems with multi-users (multiple browsers) updating the DB. Reguardless, if you must use txtbased, I recommend SQL-Lite, it supports SQL statements, and is very small and very fast. http://www.sqlite.com On Mon, 2004-02-23 at 11:53, [EMAIL PROTECTED] wrote: > Adam Voigt wrote: > > Check these guys out: > > > > http://spenix.com/WebHostingPlans.aspx > > > > Very cheap, very reliable, great features, and support is second to none > > I've ever experienced, and before you ask, no I'm not now nor have I > > ever been an employee or shareholder. =) Just a satisfied customer. > > > Admin -- > There is no shortage of good cheap hosting package. > The choice of hosting providers is out of my hands. > > What I'm looking for is a way to implement a relational database in > docuument_root of the web site (ie. /home/username)? > > David -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Embedded MySQL server (libmysqld)?
Check these guys out: http://spenix.com/WebHostingPlans.aspx Very cheap, very reliable, great features, and support is second to none I've ever experienced, and before you ask, no I'm not now nor have I ever been an employee or shareholder. =) Just a satisfied customer. On Mon, 2004-02-23 at 09:53, [EMAIL PROTECTED] wrote: > Howdy -- > Would someone point or provide me with an example of PHP + libMysqld > (Embedded MySQL server)? > > My problem is my churchs web site doesn't provide a MySQL database as > a default package (add $15.95/mo)for a MySQL Db. > > TIA, > David -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] resize an image with php
You could use the image manipulation functions of PHP, or you could just specify a height and/or width with HTML (in the img tag). On Fri, 2004-02-20 at 12:53, Dominique ANOKRE wrote: > I want to resize an image before display it in the window. > Is there a php fonction which do it ? > > Thanks ! -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variables
Whoops, mistyped on my reply, you need to escape it with the single quotes to. On Thu, 2004-02-19 at 12:49, Dominique ANOKRE wrote: > hello, > > > how can i put the character \ in a variable ? > > I've done the code below but errors occurs : > > $barre_oblique = "\"; > > > Parse error: parse error, unexpected T_STRING > > Please help -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variables
Escape it. $string = "\\"; Or, use single quotes: $string = '\'; On Thu, 2004-02-19 at 12:49, Dominique ANOKRE wrote: > hello, > > > how can i put the character \ in a variable ? > > I've done the code below but errors occurs : > > $barre_oblique = "\"; > > > Parse error: parse error, unexpected T_STRING > > Please help -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] str_replace to replace /n with not having desired effect.
Single quotes don't work for the escape characters. Use double quotes around the str_replace where there is a \n. On Thu, 2004-02-19 at 10:52, Dave G wrote: > PHP Listers, > I am trying to use str_replace to format text taken from a MySQL > TEXT field and make it so that it is compatible with my CSS formatting. > Essentially, I want to ensure that new lines are replaced with tags > with the appropriate CSS class designation. > The code I have created with assistance from information found > on the web, looks like this: > > $charInfoCss = '' . str_replace('\n', '\n class="content">\n', $charInfo[introE]) . ''; > > The output looks like this: > Blah blah blah blah. > Another line of blah blah blah. > A third line of blah blah blah. > > The output I desire is this: > Blah blah blah blah. > Another line of blah blah blah. > A third line of blah blah blah. > > How do I correct my code to accomplish this? > > Thank you. > > -- > Yoroshiku! > Dave G [EMAIL PROTECTED] -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] '
$string = str_replace(''','\'',$string); You don't need to, but if you want to, thats how you could do it. Adam Voigt [EMAIL PROTECTED] On Wed, 2004-02-18 at 11:24, Diana Castillo wrote: > How do I convert ' to ' before displaying it in HTML? > Thanks, > > > -- > Diana Castillo > Global Reservas, S.L. > C/Granvia 22 dcdo 4-dcha > 28013 Madrid-Spain > Tel : 00-34-913604039 ext 214 > Fax : 00-34-915228673 > email: [EMAIL PROTECTED] > Web : http://www.hotelkey.com > http://www.destinia.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Free'ing Sockets Error
I cannot make PHP release the port after it binds to it, the following script should just open a port, accept one line of input, write the contents to the out file, then unbind and close the connection. It works fine, with the exception of if I run it again, it reads the port as still being bound. Any ideas on how to fix my script, or atleast free the port without having to reboot? -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple Array question
I think what you want is: Then on your next page, you can just do: foreach($_POST['id'] AS $row) echo $row; Or whatever, and that way you only get what you need. On Tue, 2003-07-29 at 13:08, Ryan A wrote: > Hi, > If i am posting something like this from a form: > > > > How do i get the value of id[]? > eg: > I dont want the "sh1" and "sh2", i just want the "3" and "4" > > The reason i dont wan the sh1 and sh2 is those are dynamic and will be > changing, I just need the values (in this case 3 and 4) to do some > comparasion and assignment operations > > Kindly reply. > > Thank, > -Ryan -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] debuging and getting mor information about failures
Umm, semicolons? On Tue, 2003-07-29 at 12:29, Marek Kilimajer wrote: > Check semicommas too. > > Peter James wrote: > > > These errors are usually caused by an extra or missing brace or > > quote/apostrophe/backtick. The best way to find where this is happening is > > to use another error. > > > > Start at the bottom of your script and introduce some garbage on a line by > > itself. "asdf" for example. This should cause a parse error when > > encountered. Move this up a few lines at a time, until the original parse > > error goes away, and this one starts. This will help you identify where > > your problem is. > > > > This is a very frustrating error message, but the above should take some of > > the pain away. :-) > > > > HTH. > > Pete. > > -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] libtdsodbc.so
Sorry, I don't use UnixODBC, so I have no idea. On Tue, 2003-07-29 at 10:14, Nabil wrote: > Dear Adam ; > The problem that it doesn't exist even after complilation .. > > ./configure --prefix=/usr/local/freetds --with-tdsver=4.2 --with-unixodbc=/u > sr/lib > make > make install > > the point is that unixodbc came out of the box with redhat 9 so i tried > > whereis unixodbc and i then assumed to /usr/lib do u think this is the > problem causes i lost libtdsodbc.so ?? > > > > > "Adam Voigt" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > It comes with FreeTDS, after you compile it, > > it will be in: > > > > /path/to/freetds/lib > > > > > > On Tue, 2003-07-29 at 09:01, Nabil wrote: > > > any one has this file or even know anything about it ? > > > > > > > > > > > > thanks > > > > > > -- > > > Nabil Attar > > > Advanced Web Solutions > > > > > > > > > /*** > > > Everyone is a beginner once, and no one is an expert at everything. > > > ***/ > > -- > > Adam Voigt ([EMAIL PROTECTED]) > > Linux/Unix Network Administrator > > The Cryptocomm Group > > -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] libtdsodbc.so
It comes with FreeTDS, after you compile it, it will be in: /path/to/freetds/lib On Tue, 2003-07-29 at 09:01, Nabil wrote: > any one has this file or even know anything about it ? > > > > thanks > > -- > Nabil Attar > Advanced Web Solutions > > > /*** > Everyone is a beginner once, and no one is an expert at everything. > ***/ -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Backtip operator
Well for one thing, when possible don't use the EREGI or REGEXP functions cause they are slower then simple string functions. Second, your script will never get to the bottom two lines, because if those characters do exist, you've already exited, and if they don't, the those two lines don't apply anyway. If you really want to kill the backtick operator (which I'm not even sure why as the string that had that in it, would have to be passed through the eval() function before it would be an exploit), then just put: $string = str_replace('`','',$string); At the top of your script. On Tue, 2003-07-29 at 06:17, [EMAIL PROTECTED] wrote: > Hi to all, any one can tell me, what is the correct way to write secure > applications in php and how is the best way to remove or prevent the > backtip operator. > > I think what my code is very insecure. > What is the correct way to do this ??? > > $Myusername = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars > ($HTTP_POST_VARS['username'])) : ''; > > $Myusername = substr(str_replace("\'", "'", $Myusername), 0, 25); > > >if ($Myusername ==""){ > exit; >} >elseif (eregi(";", $Myusername) ){ > echo "Hacking attempt"; > exit; >} >elseif (eregi("`", $Myusername) ){ > echo "Hacking attempt"; > exit; >} > >$Myusername= str_replace("\'", "''", $Myusername) ; >$Myusername= str_replace("`", "", $Myusername) ; > > > Un saludo, Danny -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP port problem
If your connecting from windows, try adding a datasource and making sure the datasource connects properly, then just use the name of the datasource as the first parameter. On Tue, 2003-07-29 at 03:26, Nabil wrote: > Anyone can explain to me why when we use mssql_connect to connect directly > to MSSQL server > > mssql_connect ('192.168.0.15:1433' , 'username' , 'password') > > it still not communicating thru port 1433 , but it use 445 and some others > protocols ... > And actually I have no idea WHY!!! > > Because there is a firewall in the network between the Linux and the SQL > server.. and it only allowed TCP port 1433, > > > Nabil Attar > Advanced Web Solutions > > > /*** > Everyone is a beginner once, and no one is an expert at everything. > ***/ > -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mssql_execute problems...
I would suggest you give the ODBTP extension a try: http://odbtp.sf.net It's designed to be a replacement for the FreeTDS MSSQL functions, I haven't experimented with it much, but so-far it looks stable and well-documented. On Mon, 2003-07-28 at 13:02, T. Rader wrote: > Thanks for the reply. I gave it a try and still have the same problem. I > have FreeTDS logging enabled, but the logs do not show anything useful. A > connection is made to the server, and the database is selected correctly. > Then, the log shows an outgoing connection. After that, nothing. > > We have used SQL Profiler to trace the incoming connection, and it pushes > through correctly when mssql_query() is used. However, when mssql_execute() > is used, the Profiler does not detect anything. It appears that the problem > is with the mssql_execute() function as everything operates correctly up > until the execution of this function. I am not sophisticated enough to be > able to verify this however. > > I have also tried to downgrade to FreeTDS 0.53 but then PHP does not > recognize all of the mssql functions... > > If it helps, following is the FreeTDS log: > 2003-07-28 11:44:11 Connecting addr 10.0.0.220 port 1433 > 2003-07-28 11:44:11 inside tds_process_login_tokens() > Received header @ 2003-07-28 11:44:11 > 04 01 01 8d 00 ab 01 00 || > > > Received packet @ 2003-07-28 11:44:11 > e3 1f 00 01 08 48 00 65 00 72 00 69 00 74 00 61 |.H.e. r.i.t.a| > 0010 00 67 00 65 00 06 6d 00 61 00 73 00 74 00 65 00 |.g.e..m.a .s.t.e.| > 0020 72 00 ab 70 00 45 16 00 00 02 00 27 00 43 00 68 |r..p.E... ..'.C.h| > 0030 00 61 00 6e 00 67 00 65 00 64 00 20 00 64 00 61 |.a.n.g.e. d. .d.a| > 0040 00 74 00 61 00 62 00 61 00 73 00 65 00 20 00 63 |.t.a.b.a. s.e. .c| > 0050 00 6f 00 6e 00 74 00 65 00 78 00 74 00 20 00 74 |.o.n.t.e. x.t. .t| > 0060 00 6f 00 20 00 27 00 48 00 65 00 72 00 69 00 74 |.o. .'.H. e.r.i.t| > 0070 00 61 00 67 00 65 00 27 00 2e 00 0b 53 00 51 00 |.a.g.e.'. ...S.Q.| > 0080 4c 00 2d 00 52 00 2d 00 57 00 45 00 42 00 30 00 |L.-.R.-.W .E.B.0.| > 0090 31 00 00 00 00 e3 08 00 07 05 09 04 d0 00 34 00 |1 .4.| > 00a0 e3 17 00 02 0a 75 00 73 00 5f 00 65 00 6e 00 67 |.u.s. _.e.n.g| > 00b0 00 6c 00 69 00 73 00 68 00 00 ab 70 00 47 16 00 |.l.i.s.h. ..p.G..| > 00c0 00 01 00 27 00 43 00 68 00 61 00 6e 00 67 00 65 |...'.C.h. a.n.g.e| > 00d0 00 64 00 20 00 6c 00 61 00 6e 00 67 00 75 00 61 |.d. .l.a. n.g.u.a| > 00e0 00 67 00 65 00 20 00 73 00 65 00 74 00 74 00 69 |.g.e. .s. e.t.t.i| > 00f0 00 6e 00 67 00 20 00 74 00 6f 00 20 00 75 00 73 |.n.g. .t. o. .u.s| > 0100 00 5f 00 65 00 6e 00 67 00 6c 00 69 00 73 00 68 |._.e.n.g. l.i.s.h| > 0110 00 2e 00 0b 53 00 51 00 4c 00 2d 00 52 00 2d 00 |S.Q.L .-.R.-.| > 0120 57 00 45 00 42 00 30 00 31 00 00 00 00 ad 36 00 |W.E.B.0.1 .6.| > 0130 01 07 01 00 00 16 4d 00 69 00 63 00 72 00 6f 00 |..M.i .c.r.o.| > 0140 73 00 6f 00 66 00 74 00 20 00 53 00 51 00 4c 00 |s.o.f.t. .S.Q.L.| > 0150 20 00 53 00 65 00 72 00 76 00 65 00 72 00 00 00 | .S.e.r.v .e.r...| > 0160 00 00 08 00 00 c2 e3 13 00 04 04 34 00 30 00 39 |. ..4.0.9| > 0170 00 36 00 04 34 00 30 00 39 00 36 00 fd 00 00 00 |.6..4.0.9 .6.| > 0180 00 00 00 00 00|.| > > > 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3 > 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is ab > 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3 > 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3 > 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is ab > 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is e3 > 2003-07-28 11:44:11 increasing block size from 4096 to 4096 > 2003-07-28 11:44:11 inside tds_process_default_tokens() marker is fd > 2003-07-28 11:44:11 leaving tds_process_login_tokens() returning 1 > Sending packet @ 2003-07-28 11:44:11 > 01 01 00 2a 00 00 01 00 73 00 65 00 74 00 20 00 |...*s .e.t. .| > 0010 74 00 65 00 78 00 74 00 73 00 69 00 7a 00 65 00 |t.e.x.t.s .i.z.e.| > 0020 20 00 38 00 30 00 30 00 30 00 | .8.0.0.0 .| > > Received header @ 2003-07-28 11:44:11 > 04 01 00 11 00 ab 01 00 || > > Received packet @ 2003-07-28 11:44:11 > fd 00 00 be 00 00 00 00 00 |. | > > 2003-07-28 11:44:11 processing result tokens. marker is fd > > Thanks in advance for any help. > > Tom > > "Adam Voigt" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] &
Re: [PHP] Re: mssql_execute problems...
Umm, try setting TDSVER to 8.0 is all I could say to try. On Mon, 2003-07-28 at 12:10, T. Rader wrote: > Any takers on this? > "T. Rader" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hey, > > > > System: RH9, Apache 1.3.27, PHP 4.3.2, FreeTDS 0.61 connecting to a Win2K > > Server, MSSQL Server 2K > > > > Problem: mssql_execute hangs when run. The script just never comes back. > > The code is as follows: > > $macn = mssql_connect("SERVER", "UID", "PWD"); > > mssql_select_db("DB"); > > $stmt = mssql_init("dbo.Grade2_GET", $macn); > > $result = mssql_execute($stmt); > > > > I have compiled PHP with the --with-mssql option so it does find the > > functions. Also, the Stored Proc will run just fine if executed via > > mssql_query(). But, I have some stored procedures that have output > > parameters and thus I need to use mssql_execute(). I have searched rather > > extensively on the 'net, and have seen a couple of posts about people > saying > > that it works correctly for them, but I am unable to get it to work. I > have > > even gone as far as to try the nightly build of FreeTDS (0.62) just to > see. > > Also, my env for TDSVER = 7.0 per documentation > > > > Does anyone have any ideas? I am currently stumped and cannot seem to > find > > any answers via research... > > > > TIA, > > Tom > > > > > > -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] convert mysql datetime to unix timestamp
Tried passing it through strtotime? Example: echo(date('U',strtotime($string))); On Mon, 2003-07-28 at 12:06, Chris Hayes (SENSE) wrote: > hi, > i have to move data from a table with a datetime (2003-05-14 13:36:04) to a > unix timestamp (e.g. 2147483647) . Any ideas? > > Chris -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Webpage like MySql- need to be able to see allfields and edit
Just select the values out, and put them as the default in the value portion of the form inputs, example: $query = mysql_query('select firstname,lastname from table where id=1;'); $array = mysql_fetch_array($query); On Thu, 2003-07-24 at 11:41, Matt Hedges wrote: > Hello. I am building a webpage for a sorority- http://www.olemissaoii.com . > > I built a basic php script where they add the sisters and their names, grad. > date, and email. Is there anyway to build a page that shows all the fields > where someone could go in and edit/add what they need? What I basically > want is a webpage that works like MyCC SQL Database. The only thing I've > been able to figure out is a basic update page, but using that they have to > type in everything again- so for example if they want to change the email > address, they'd have to retype the names and grad. date. So I'd like a > script that shows all the rows and columns and allows someone to go in and > change whatever field they want. > > Any help greatly appreciated, > Hedges > > > > > -- > ___ > | Matt Hedges > | http://hedgesinnovations.com > | -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] USB Flash Drive
No, PHP cannot do this. On Wed, 2003-07-23 at 13:06, Digital Directory USA, Inc wrote: > I have burned a flash movie onto a Flash USB Drive and need it to Auto Run it on a > PC when as soon as it is inserted into a USB port. Is there any PHP coding that can > help me with this? I need it to auto run on 98, 2000, ME, XP, Linux. If so, can > someone please help me with the code? -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is this possible?
Umm, you mean like: select i.id,d.description from items i, descriptions d where d.itemid = i.id; ? On Wed, 2003-07-23 at 12:32, Tony Crockford wrote: > Hi > > > Thanks for the help on previous questions, I now have an in principle > type question. > > I have a MySQL database - "items" in one table and "descriptions" in > another with a common key: item_ref > It is used to create a sort of categorised directory of the items. > (http://www.torbytes.co.uk) > > > each table has a status field the "items" have a default description and > the "descriptions" have a level classification. > > up to now been working through all the items and printing out the > descriptions at each level printing the default if I don't have a > matching description, but I now need to do the following: > > for a particular level print only the items (and their matching > description) where there is a matching description. (I hope you see what > I mean) > > since the items are categorised and I don't want any dead ends in my > tree structure I have to know if there's a description before I start > working through the items. > > I thought that this might be the way to do it: > > select all the item-ref values from the description table. > > step through this select array selecting the required fields from the > item table where item_ref=item_ref and adding them to another array. > > then step through that array building up the tree structure > > The trouble with it as I see it is: > > it's a lot of select calls to the database (one for every description > found) and I'm not sure how to add the fields found in the item table to > a new array. > > > Am I going at this the wrong way? > > Any help, clues or abuse accepted. > > Thanks > > Tony > > > > -- > NEO organizes my Outlook - check it out: > http://www.caelo.com/a/rl.php3?i=3NTVV -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with Date
Umm. echo(date('U',strtotime('next Friday'))); Notice the strtotime part. On Mon, 2003-07-21 at 09:25, John Manko wrote: > I'd settle for a function that will generate a date for this upcoming > friday. ;) > > Elliot Tobin wrote: > > >I need a function to create the dates of previous Fridays > > > > -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bringing href up in a different page
Umm, you mean new WINDOW? Add: target=_new To your href. On Thu, 2003-07-17 at 12:35, Ron Allen wrote: > This is my current code. I am trying to have this come up in a different > page. Help please! > > ".$row['ID']." -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to store a file into MSSQL?
On MSSQL it would be a NTEXT column. On Wed, 2003-07-16 at 18:14, Javier wrote: > [EMAIL PROTECTED] (John Manko) wrote in > news:[EMAIL PROTECTED]: > > Does it apply also to MSSQL = Microsoft SQL Server? > > > Look here > > http://www.mysql.com/doc/en/BLOB.html > > > > Actually, if you don't care if the images can be view from outside the > > DB, you can do what I do. > > I simplely put the name of the file in a varchar field, then let the > > browser do the work for you. > > This is good for files that are referenced from multiple entries (ie, > > individual products each referencing the same series image) > > but, blob can work fine. > > > > > > > -- > *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] INT Field in mysql display without .00
$var = number_format($var,0); On Wed, 2003-07-16 at 10:42, [EMAIL PROTECTED] wrote: > Hi All, > > I think it's a simple one but... Very hard for me! > > I've got prices in MYSQL. Field is formatted as INT(5,2).. So output is for example > 100.00 . Now i want to ECHO the field as 100.. How to achief this one? Because when > i'm echo'ing the field is shows up as 100.00 . > > Thanks for the help! > > Regards, > > Frank > > > __ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to store a file into MSSQL?
I just use a TEXT field, and am doing so with 25k images, without issue. On Tue, 2003-07-15 at 18:45, Javier wrote: > Hi everybody, I've trying to store a into a MSSQL Server (7 or 2k) using > an example I found on the web (www.php.net). > > Is it possible that PHP (4.3.2) just store 4k of data? Because after > inserting a test image with: > > $oDatos is an object that handles queries. > > // storing a file > $datastring = join('',file("logo2.jpg")); > $data = unpack("H*hex", $datastring); > $oDatos->query( "insert into temp_test (test) values ( 0x" . $data['hex'] > .")" ); > > A select will return a 4K file. Is it possible? > > $row = $oDatos->getData("select test from temp_test"); > //file://$row = mssql_fetch_assoc($result); > $fp = fopen('copy.jpg','w'); > > > So... is there anyway to store a file that it is larger than 4K? Or am I > missing something? :) > > Thanks. > > -- > *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using PPP with PHP
Umm, use exec() to call the dialing program? On Thu, 2003-07-10 at 13:22, Jay Blanchard wrote: > Good afternoon gurus and gurettes! > > Has any of you had any experience using PPP (Point-to-Point Protocol) > with PHP? I need to work with it to establish a connection to a remote > server on a remote network and was hoping that I could use PHP. > Currently I can manually establish I dial-up using PPP over a modem. I > would like to automate the process as much as possible. Any help would > be grandly appreciated. > > Jay -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL select
Hmm. How about: SELECT DISTINCT id_k, name FROM tablename WHERE typ != 'z' ORDER BY typ ASC; Does that work? On Thu, 2003-07-10 at 11:29, Mark wrote: > > Jiøí Nìmec wrote: > > > > > hello, > > > > > > i have got a problem with SQL select: > > > > > > I have got a table such this: > > > > > > id_k typ name id > > > 1 f bla1 1 > > > 2 f bla2 1 > > > 2 i bla3 1 > > > 3 z bla4 1 > > > 3 f bla5 1 > > > 4 i bla6 1 > > > 4 z bla7 1 > > > 5 z bla8 1 > > > > > > and id = 1 and I need select these rows: > > > > > > id_k typ nazev id > > > 1 f bla1 1 > > > 2 f bla2 1 > > > 3 f bla5 1 > > > 4 i bla6 1 > > > > > > so, when doesn'i exist component (id_k = component) type "f" so I > > want > > > component with type "i", but when doesn't exist type "f" noir "i" > > I > > > don't want to select row with type "z". > > > > > I don't think you can do what you want in a simple SQL statement. You > seem to want to return rows based on what is in other rows of the > same table. There may be ways to join the table to itself, but I'm > not aware of a straightforward way to do this only in SQL. In PHP, > it's probably not too tough. > > Just to be sure we all understand, I assume you want the following: > -At most, one row for each id_k > -If there is a row with an 'f' in the type column, return that row. > -If there is no record with an 'f' in the type column for that id_k, > and there is a record with an 'i', return that row. > -If there is no record with an 'f', nor a record with an 'i' in the > type column, do not return a row. > > Is that right? > > > > jiri nemec, ICQ: 114651500 > > > www.menea.cz - www stránky a aplikace > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > = > Mark Weinstock > [EMAIL PROTECTED] > *** > You can't demand something as a "right" unless you are willing to fight to death to > defend everyone else's right to the same thing. > *** > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can php/mysql handle 10000s of records
It can handle 1,000,000 records without breaking a sweat. On Wed, 2003-07-09 at 09:54, Adam Gerson wrote: > From: Adam Gerson <[EMAIL PROTECTED]> > Date: Wed Jul 9, 2003 9:48:20 AM America/New_York > To: [EMAIL PROTECTED] > Subject: Can php/mysql handle 1000's of records? > > I know this questions is a little of topic, but I figured the members > of this list would have experience in this area. > > I am writing an attendance system in php/mysql for my school. We have a > little less then 1000 students. For every day of the school year one > record will be entered into a table for each student representing their > attendance status (present, absent, late, etc...). I also have several > other supporting tables for relationships. When it comes to reporting > and querying this DB I am worried that it will very quickly become very > large and slow. Can mysql handle this? Are there any techniques to > speed it up? I will trying indexing major columns. > > I have also considered keeping all previous days attendance in a > separate table from the current days attendance and moving things over > in the middle of the night. This way any operations on the current days > data will go quickly, but reports on long term things will still be > slow. Good idea? > > Thanks, > Adam > > > > > > --- > Adam Gerson > Systems Administrator / Computer Teacher > Columbia Grammar and Prep School > 212-749-6200 > [EMAIL PROTECTED] > www.cgps.org -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imap_header timing out
Is error_reporting in your php.ini set to "E_ALL & ~E_NOTICE" ? On Tue, 2003-07-08 at 13:09, Amer Neely wrote: > > Put: > > > > set_time_limit(0); > > > > At the top of your script. > > Excellent! That worked, thank you. > > Now I'm getting .. > [08-Jul-2003 12:32:46] PHP Notice: (null)(): Unexpected characters at > end of address: <> (errflg=3) in Unknown on line 0 > > And the output is a blank html page, but the source code shows no > messages are being grabbed! > > I haven't been able to find a reference to 'errflg=3' anywhere. I > suspect there are some bad characters lying in wait in one of the > headers. A perl script that reads the mailbox has no problems with any > of the headers, but it uses external modules for some of the header > parsing. I may have to do my own with PHP. -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imap_header timing out
Put: set_time_limit(0); At the top of your script. On Tue, 2003-07-08 at 12:45, Amer Neely wrote: > I've a script reading a mailbox using > $InBox = imap_open($Host,$User,$Pass); > $NumMsgs=imap_num_msg($InBox); > for ($i=1; $i <= $NumMsgs; $i++) > { > $Header=imap_header($InBox,$i); # this is line 154 > . > . > . > and so on. > > With 12 messages in the mailbox this works fine, but with 15 it comes > back as timed out... > [08-Jul-2003 12:32:46] PHP Fatal error: Maximum execution time of 30 > seconds exceeded in g:\httpd\public\readmail\readmail.php on line 154 > > I'm running this at home (W2K/Apache/PHP 4.3.2) on a dialup account. Can > someone shed some light on why it may be timing out, and where do I > increase the timeout if needed? Or optimize the code if possible? > > -- > /* All outgoing email scanned by AVG Antivirus /* > Amer Neely, Softouch Information Services > W: www.softouch.on.ca > E: [EMAIL PROTECTED] > Perl | PHP | MySQL | CGI programming for all data entry forms. > "We make web sites work!" -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[2]: [PHP] Read a file
Umm, sudo? On Tue, 2003-07-08 at 12:49, carlos castillo wrote: > Thanks, i already solve that problem, but now i have > another...sorry...jejejeje. > > Look I need to change the permissions for the files, I use > $cmd = "chmod 644 $archivo"; > system($cmd); > > but I can do it, only the root can do thatyou have an idea how I can > do it? > > Thanks, > > Carlos A. Castillo. > Ingeniero de desarrollo > [EMAIL PROTECTED] > > > Su Aliado Efectivo en Internet > www.imagine.com.co > (57 1)2182064 - (57 1)6163218 > Bogotá - Colombia > > - Soluciones web para Internet e Intranet > - Soluciones para redes > - Licenciamiento de Software > - Asesoría y Soporte Técnico > > > > -Mensaje original- > De: Burhan Khalid [mailto:[EMAIL PROTECTED] > Enviado el: martes, 08 de julio de 2003 11:03 > Para: carlos castillo; [EMAIL PROTECTED] > Asunto: Re[2]: [PHP] Read a file > > On Tuesday, July 8, 2003, 6:52:56 PM, carlos wrote: > > cc> But them how i can look for the tag i need if i have the file in an > cc> array, i need to read an xml file and extract the info between tags > cc> and . > > Well, I wish you would have said that earlier. Parsing XML files is > different than parsing text (or other files). > > PHP has XML parsing built-in thanks to expat. More information on XML > support in PHP is at http://www.php.net/xml > > I have written a tutorial at my website > http://www.meidomus.com/archives/75.php that shows an > example of parsing > XML files in PHP. It does not use the XMLDOM extension. It might be of > help to you. > > -- > Regards, > Burhan Khalid > phplist[at]meidomus[dot]com > http://www.meidomus.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's wrong with this?????
Umm quotes. Anywhere in your actual SQL that you are using a single quote, you need to put a backslash before it, example: activated ENUM('0','1') DEFAULT '0' Becomes: activated ENUM(\'0\',\'1\') DEFAULT \'0\' On Tue, 2003-07-08 at 11:26, Artoo wrote: > I keep getting Parse error: parse error, unexpected T_LNUMBER in > /usr/local/psa/home/create.php on line 9 > > This is line 9, which should just create a table. > > $result = mysql_query('CREATE TABLE members (userid INT(25) NOT NULL > AUTO_INCREMENT, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(50) NOT > NULL, email_address VARCHAR(255) NOT NULL, username VARCHAR(30) NOT NULL, > password VARCHAR(30) NOT NULL, activated ENUM('0','1') DEFAULT '0' NOT NULL, > date_joined DATETIME NULL, last_login DATETIME NULL);')or die("Create table > Error: ".mysql_error()); > > What's that error mean and is that CREATE TABLE query correct? > > Thanks -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using PHP to stream to Shoutcastserver
I fooled with this sort of thing a long time ago, I believe I found out it was completely possible so long as you get the song broken buffering according to what shoutcast expects to recieve or something similar to this. On Mon, 2003-07-07 at 23:51, Simon Fredriksson wrote: > Hello World! > > I'm interested in starting a project to broadcast music via PHP to a > ShoutCAST DNAS. I'm wondering, is it possible to do this? I've searched > around for good tools to broadcast but none supports my needs. As for > now I'm using PHP 4.3.2 under Linux and Windows. I want this to be a > cross platform thing. > > I've been looking a bit at Java and C++ but so far I'm not very good > with these languages. > > Any thougts/comments about this would be nice if you shared. > > //Simon -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function
Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: > Is anyone familiar with the mail function and how it works on the server? I > can't get it to work on a client's server, and this error shows up in the > error log: > > PHP Warning: U1]É': Unable to initialize module > Module compiled with debug=144, thread-safety=135 module API=1119810252 > PHP compiled with debug=0, thread-safety=0 module API=20010901 > These options need to match > in Unknown on line 0 > PHP Warning: U1]É': Unable to initialize module > Module compiled with debug=144, thread-safety=167 module API=1120015052 > PHP compiled with debug=0, thread-safety=0 module API=20010901 > These options need to match > in Unknown on line 0 > > If anyone has any suggestions as to what to look for, I would appreciate it. > I already tried 'pointing' php.ini directly to sendmail (which is in a > traditional spot: /usr/sbin/sendmail). > > Thanks, > > -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Catch Signals
I have a PHP script that is running constantly in the background, and I've used CYGWIN to register it as a service, but the problem is when I try to stop/start (restart) it from the service control manager, it just sits and spins on the stop portion. I'm fairly sure this is because the PHP program is still in it's infinite loop doing what it's supposed to be doing, and doesn't realize it's been sent a shutdown signal. So, is there anyway to listen for a shutdown signal on a console based PHP script under Windows? -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] daemonized php
Umm, have your PHP program output a integer to a file somewhere, and just map the integer to a status, example, if "1" exists in the file, it's doing step 1, etc. On Mon, 2003-07-07 at 09:30, Uros wrote: > Hello, > > ok what about checking status what this program is doing right now. > > can this be done with > > http://www.php.net/manual/en/ref.pcntl.php > > > tia > > Uros > > Monday, July 7, 2003, 3:16:35 PM, you wrote: > > AV> #!/usr/local/bin/php -q > AV> AV> set_time_limit(0); > > AV> while(true) > AV> { > AV> // do something > AV> } > ?>> > > AV> Then: > > AV> chmod u+x scriptname > AV> ./scriptname & > > > AV> On Mon, 2003-07-07 at 08:41, Uros wrote: > >> Hello! > >> > >> Can somebody give me any workable example how to run some script written in > >> PHP in Unix console. > >> > >> I wan't to write some server aplication. So it has to be run in the > >> backgroud. > >> -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] daemonized php
#!/usr/local/bin/php -q Then: chmod u+x scriptname ./scriptname & On Mon, 2003-07-07 at 08:41, Uros wrote: > Hello! > > Can somebody give me any workable example how to run some script written in > PHP in Unix console. > > I wan't to write some server aplication. So it has to be run in the > backgroud. > > > -- > Best regards, > Uros -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Redirect to a different frame...
On Thu, 2003-07-03 at 12:02, Dan Joseph wrote: > Oh, yeah, that is correct. You'd need to use the tag and put some > javascript in them to target the frames. I'm not up on the javascript > enough though, check javascript.internet.com for more information. > > -Dan Joseph > > > -Original Message- > > From: Grant Rutherford [mailto:[EMAIL PROTECTED] > > Sent: Thursday, July 03, 2003 12:03 PM > > To: Dan Joseph > > Cc: PHP Mailing List > > Subject: RE: [PHP] Redirect to a different frame... > > > > > > Hi there, > > > > Thanks for your response. I understand that I can specify a target in > > the form tag. However, if I were to do that both buttons would have to > > go to the same frame. (I think?) > > > > If I could specify the target for each submit button, that would work > > perfectly. Also, if I could have the same input fields shared between > > two forms (one for each target destination). However, I don't think > > that either of these is an option in regular HTML. > > > > Thanks, > > Grant > > > > > > On Thu, 2003-07-03 at 10:41, Dan Joseph wrote: > > > Hi, > > > > > > > I was wondering if there is a way to use the header function in php to > > > > redirect the browser's output to a different frame. > > > > > > > > Specifically, I have a form on frame A which has two submit > > buttons. I > > > > would like one to submit the data in the form to a page which > > will load > > > > in frame A, and the other to submit the data to the same page > > which will > > > > load in frame B. > > > > > > in your tag, you can put target=framename, example: > > > > > >> target=framethree> > > > > > > Anything submitted from that frame will target the > > specified frame. No > > > fancy PHP needed, unless you want to make the target dynamic. > > > > > > -Dan Joseph > > -- > > Grant Rutherford > > Iders Incorporated > > 600A Clifton Street > > Winnipeg, MB Canada R3G 2X6 > > http://www.iders.ca > > tel: 204-779-5400 ext 36 > > fax: 204-779-5444 > > > > This message is intended solely for the use of the designated > > recipient(s) and their appointed delegates, and may contain > > confidential information. Any unauthorized disclosure, > > copying or distribution of its contents is strictly prohibited. > > If you have received this message in error, please destroy it > > and advise the sender immediately by phone, email or facsimile. > > -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Get Rid of this Crook
Well spamming doesn't get them any money. I believe I read they use this info to transfer money from your bank account, after convincing you to scan your passport for them, or something like that. One guy decided to "strike back", check it out: http://www.haxial.com/spls-soapbox/nigerian-fraud/ On Thu, 2003-07-03 at 07:54, Brian S. Drexler wrote: > You do have to admit though, it is a pretty good story. :-) Now let me ask > you this. You reply to this e-mail and give your phone/fax numbers and then > I'm assuming those get spammed all to hell too. Correct? > > -Original Message- > From: Daryl Meese [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 03, 2003 7:33 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP] Get Rid of this Crook > > > Could someone that this ass of the mailing list > > Daryl > > > > -Original Message- > From: MARIAM ABACHA [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 03, 2003 12:02 AM > To: [EMAIL PROTECTED] > Subject: [PHP] ASSISTANCE NEEDED > > > Hello, > I am sorry for the embarrassment this letter might cause you as we have not > had any correspondence before this letter. I got your address through my > nephew with Nigerian Military Chamber of Commerce industry and Mining > during my research for a reliable and trustworthy partner who l can do > business with though l did not disclose the nature of the business l intend > to do with whoever he recommend for me. > I am DR. MRS MARIAM ABACHA, wife of the late Nigeria Head of State, General > Sanni Abacha who died on the 8th of June 1998 while still on active duty. I > am contacting you in view of the fact that we will be of great assistance to > each other likeness developing a cordial relationship. > I currently have within my reach the sum of Twenty - Five Million US Dollars > (US$25,000,000.00) cash which l intends to use for investment, like Real > Estate Development specifically in your country. This money came as a > payback contract deal between my late husband and a Russian Firm on our > countries Multi-billion dollars Ajaokuta Steel Plant. > The Russian Partners returned my husband's Share of USD$25,000,000.00 after > the death of my husband and Lodged in my husband's Security Company of which > l am director right now, the new Civilian Government have intensified their > probe on my husband? Financial and oil company. In view of these, l acted > fast to withdraw the US$25,000,000.00 from the company vault and deposited > it in a Security Company. I have since declared the Security Company > bankrupt. No record ever existed concerning the money traceable by the > government because there is no documentation showing that we received the > money from the Russian. > Due to the current situation in the country concerning government attitude > towards my family, it has become quite impossible for me to make use of this > money within. Let me refer you to the front page of this day newspapers of > 10th March 2001. You can check it through their website > www.thisdayonline.com the present government in Nigeria had frozen and > seized all our bank accounts both here in Nigeria and abroad.Thus consent l > shall expect you to contact me urgently to enable us discuss in detail about > this transaction.Bearing in mind that your assistance is needed to transfer > this fund, I proposed a percentage of 30% of the total sum to you for the > expected service and assistance, 5% for offsetting minor expenses incurred > in the course of this transaction. Your urgent response is highly needed as > to stop further contacts. All correspondence must be by the email address > [EMAIL PROTECTED] I will give you my Tel numbers where you can > contact me when I hear from you. > I must use this opportunity to implore you to exercise the utmost indulgence > to keep this matter extraordinarily confidential whatever your decision > while await your prompt response. > NB: Because of the security being mounted on the members of my family, l has > decided that this transaction exist between you and my nephew Dr. Azeez > Bello. Remember to include your private Tel/fax or mobile number for easy > communication. > Best Regards. > DR. (MRS) MARIAM ABACHA > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Free Service to Secure PHP Code
You sure thats a valid URL? Is it new? Because my DNS doesn't resolve it. On Wed, 2003-07-02 at 12:14, Suhas Pharkute wrote: > Hello PHP Developers, > > Now a free service is available to secure PHP code. > This service is located at http://encphp.sspsoft.com > > Now you can encrypt your PHP files with online encryptor and get one of > loader module to run these files. > > This program is still under development, your suggestions/comments/questions > will be valuable input. > > If in any case of a non-working incidence, please email at > [EMAIL PROTECTED] > > No limits! No restrictions! Use it, its FREE!! > > _ > > Encrypt your PHP code for FREE at > http://encphp.sspsoft.com > > _ -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] outputting xml declaration
Ok never mind about what I said, brain lapse, I was focusing so hard on the ? that I didn't realize it was next to the > . Doh. On Wed, 2003-07-02 at 09:43, Jay Blanchard wrote: > [snip] > print ""; > > This is probably because I print a questionmark? How can I avoid that an > error is generated? > > Besides it's not an error in the way that it gives an errorstring but it > writes the output in the error_log of apache... > [/snip] > > Search the archives of this list, the subject comes up often. > > HTH! > > Jay -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] outputting xml declaration
Question mark's are not special or reserved in strings like $'s are. That shouldn't be the problem. On Wed, 2003-07-02 at 09:33, Steven Apostolou wrote: > Hello, > > The folowing code gives an error: > > print ""; > > This is probably because I print a questionmark? How can I avoid that an > error is generated? > > Besides it's not an error in the way that it gives an errorstring but it > writes the output in the error_log of apache... > > Greetings, > > -- > Steven Apostolou <[EMAIL PROTECTED]> -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems compiling PHP 5.0.0b1
If you didn't install the RPM of the libxml higher then 2.5.1, I would assume there's a configure line like --with-libxml=/path or something similar to that you have to specify where you installed it when you compiled it. On Tue, 2003-07-01 at 13:11, Mauricio Cuenca wrote: > Hello, > > I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using > this configure command: > ./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 > > And I get the following error: > configure: error: libxml2 version 2.5.1 or greater required. > > Then, I downloaded and compiled libxml 2.5.7 and the same error appears. > > I've compiled several diffrent versions of PHP before without problems. Has > anyone had a similar problem ? > > TIA, > > _ > Mauricio Cuenca -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file pointer
$data = file('c:\blah.txt'); $lineyouwant = $data[(count($data)-1)]; Not necessarily most efficient, but it works. > At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote: > >How would I set the file pointer to the very end of the last line of the > >file? > > > >ex. ahkjhff > >asdjfhlkajf > >sdfhaksljdh > >kasjdhkjlfh > >asdjfhklajs > >askjdhjfdjf//here > > > >Thanks, > >-- > >Kyle > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file pointer
$data = file('c:\blah.txt'); $lineyouwant = $data[(count($data)-1)]; Not necessarily most efficient, but it works. > At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote: > >How would I set the file pointer to the very end of the last line of the > >file? > > > >ex. ahkjhff > >asdjfhlkajf > >sdfhaksljdh > >kasjdhkjlfh > >asdjfhklajs > >askjdhjfdjf//here > > > >Thanks, > >-- > >Kyle > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] preg_match? [SOLVED]
Sounds like someone has a case of the Monday's. On Mon, 2003-06-30 at 08:40, Brian S. Drexler wrote: > Sorry. Must be Monday or something :-) > > preg_match('/%%Title:(.*?)%%/i',$contents,$matches); > > > > -Original Message- > From: Brian S. Drexler [mailto:[EMAIL PROTECTED] > Sent: Monday, June 30, 2003 8:35 AM > To: [EMAIL PROTECTED] > Subject: [PHP] preg_match? > > > Ok, here is my problem. I have a Postscript file that looks something like > this: > > %!PS-Adobe-3.0 > %%Title: Q-111BSD > %%Creator: Windows NT 4.0 > %%CreationDate: 8:31 6/30/2003 > %%Pages: (atend) . > > And I want to get the Q-111BSD into a variable but I can't figure out how to > keep it from grabbing the next line as well. Does anyone have any idea how > I can do this? Thanks in advance! > > Brian > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date/Time problem
echo(date('T')); Works fine for me. On Fri, 2003-06-27 at 13:03, Sparky Kopetzky wrote: > Well, I got the time displaying sort of right but have a length problem. See, using > %T doesn't work in date() but %Z does but it returns a very long string 'Mountain > Daylight Time' when all I want is 'MDT'. Is there a way around this problem other > than having to edit the string date() returns?? > > Robin E. Kopetzky > Black Mesa Computers/Internet Services > www.blackmesa-isp.net -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bundled GD & Webalizer
PHP doesn't install GD. GD is a library that PHP can link against, giving you the ability to manipulate images. PHP doesn't give you GD. GD is an independent library. On Fri, 2003-06-27 at 12:09, Michael A Smith wrote: > No, you don't understand, I want to know where PHP installs GD. > > -Michael > On Fri, 2003-06-27 at 08:06, Adam Voigt wrote: > > PHP did not remove your copy of GD, so this is > > a system question, not PHP. > > > > > > On Fri, 2003-06-27 at 12:03, Michael A Smith wrote: > > > I compiled PHP 4.3.2 --with-gd, but now webalizer can't find GD? Where > > > is it? I tried installing the original library but that's not good > > > either. > > > > > > -Michael > > > -- > > > Michael Smith > > > [EMAIL PROTECTED] > > > > > > "The great thing about democracy is that it gives > > > every voter a chance to do something stupid." > > > -Art Spander -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bundled GD & Webalizer
PHP did not remove your copy of GD, so this is a system question, not PHP. On Fri, 2003-06-27 at 12:03, Michael A Smith wrote: > I compiled PHP 4.3.2 --with-gd, but now webalizer can't find GD? Where > is it? I tried installing the original library but that's not good > either. > > -Michael > -- > Michael Smith > [EMAIL PROTECTED] > > "The great thing about democracy is that it gives > every voter a chance to do something stupid." > -Art Spander -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql lock
Yes you seem to have it figured out, just do the lock in a normal mysql_query, following the MySQL manual for syntax, and you can release a lock whenever you want, but the rule is the sooner the better, since if more then one page or query tries to do a write, while you have it locked it has to wait and wait until your lock is released. On Fri, 2003-06-27 at 11:45, anders thoresson wrote: > Hi, > > I've never used a lock on a MySQL table so far, but need one now. Two > questions: > > 1. Do I set the lock by a normal query, but in the form of "LOCK TABLE > WRITE", instead of "SELECT * FROM WHERE x = 1"? > > 2. Can I set the lock in one query, then perform multiple other queries on > the table, in between which I do some PHP work, and then release the lock > several queries and lines of PHP code later? > > In general, when is it wise to use a lock, and when is it uneeded? > > -- > anders thoresson -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ignored php.ini?
Is Windows installed on the D drive? Because you can't just make a WINNT folder on another drive, it must be in the actual folder the system is installed in. On Fri, 2003-06-27 at 10:25, [EMAIL PROTECTED] wrote: > Hello, >I have php 4.3.2 running as isapi module on windows 2000. > I have a php.ini in d:\winnt > > but when I edit it the output from > > > > is as before. > > Any hints? Many thanks in advance, bye > _____ -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 'Cannot send Headers' Problem!! MOre..
Headers can't be sent after HTML output, it's as simple as it sounds. What that means is, if you suddenly decide you want to send a Location header to redirect the browser, you can't if you outputted any HTML before the line that outputs the location, unless ofcourse your using Output Buffering. On Fri, 2003-06-27 at 09:17, PHPSpooky wrote: > Glory! > > Just to check .. I removed all HTML code from the directory.php page.. > and just left the PHP code.. and it worked fine!! > So the problem is with the HTML code.. whatever HTML is outputting.. > somehow it's taking it as the output and this generating the Warning! > But I need the HTML in the directory.php for the page.. so what do I do? > > PHPSPooky > > > > -Original Message- > > From: Marek Kilimajer [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 27, 2003 6:14 PM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: Re: [PHP] 'Cannot send Headers' Problem!! > > > > Simly go to mjs/directory.php, line 3, and remove any output that is > > there, mosty likely some white characters. > > -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Using header in if statement
Yep, or you could echo Javascript, or you could use output buffering, any of these will get your pages redirecting. On Fri, 2003-06-27 at 09:06, Gary Ogilvie wrote: > I didn't realise you could use echo to run a URL. Thanks for your help > :) > > -Original Message----- > From: Adam Voigt [mailto:[EMAIL PROTECTED] > Sent: 27 June 2003 14:08 > To: Gary Ogilvie > Cc: 'PHP General' > Subject: Re: [PHP] Using header in if statement > > Just have it echo, example: > > echo " content=\"0;url=http://192.92.0.248/company_search/admin/admin2.php\";>"; > > > On Fri, 2003-06-27 at 09:03, Gary Ogilvie wrote: > > If I attempt to direct the user to a url with in a if statement using > a > > header I get the following error message: > > > > Warning: Cannot modify header information - headers already sent by > > (output started at > c:\inetpub\wwwroot\company_search\admin\login.php:3) > > in c:\inetpub\wwwroot\company_search\admin\login.php on line 48 > > > > The code I am trying : > > > > if ($myUser == $myReturnedUser && $myPass == $myReturnedPass) { > > ("Location: > > http://192.92.0.248/company_search/admin/admin2.php";); > > } else { > > > > Is there any other way I can try and do this? > > > > Many thanks -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List of Variables
print_r(get_defined_vars()); On Fri, 2003-06-27 at 09:07, Thomas Weber wrote: > Hi, > > is there any way to get a list of all defined variables? > It is intended to be used to get and identify all defined objects to call > some costum decunstructor at the scripts end. > > Thanks! > Thomas 'Neo' Weber > --- > [EMAIL PROTECTED] [EMAIL PROTECTED] -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using header in if statement
Just have it echo, example: echo "http://192.92.0.248/company_search/admin/admin2.php\";>"; On Fri, 2003-06-27 at 09:03, Gary Ogilvie wrote: > If I attempt to direct the user to a url with in a if statement using a > header I get the following error message: > > Warning: Cannot modify header information - headers already sent by > (output started at c:\inetpub\wwwroot\company_search\admin\login.php:3) > in c:\inetpub\wwwroot\company_search\admin\login.php on line 48 > > The code I am trying : > > if ($myUser == $myReturnedUser && $myPass == $myReturnedPass) { > ("Location: > http://192.92.0.248/company_search/admin/admin2.php";); > } else { > > Is there any other way I can try and do this? > > Many thanks -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Just a small question on if statement
if($myUser == $myReturnedUser && $myPass == $myReturnedPass) { } On Fri, 2003-06-27 at 08:51, Gary Ogilvie wrote: > Hi everyone, > > I want to make an if statement that works only if the 2 conditions are > correct > > It starts as: > > If ($myUser == $myReturnedUser) > > But I want to add another so that the if statement runs only if $myUser > is equal to $myReturnedUser AND $myPass is equal to $myReturnedPass. How > do I do this? > > Thanks a lot =) > > Gary -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange output issue
The three might be the "Content-length" header, not sure though, thats just a guess since your outputting 3 characters. On Thu, 2003-06-26 at 11:44, John Luxford wrote: > Hello, > > I'm having a really strange output problem that I can't figure out. > The problem is that a few characters appear prepended and appended to > the body of the server response. I'm running PHP 4.3.0 and 4.3.2 on > Mac OS X (tibook and xserve) and Red Hat 7.1 with 4.3.2 as well, with > Apache 1.3 on all of them. > > Here is a reproduction of the problem on two servers: > > From the command line... (the following URL illustrates the problem, > feel free to use it) > > (Request) > $ telnet dev.ourvoices.ca 80 > GET /test.php HTTP/1.1 > Host: dev.ourvoices.ca > > (Response) > HTTP/1.1 200 OK > ...other headers... > Content-Type: text/html > > 3 > foo > 0 > > (The code in /test.php) > > > (What's with the 3 and the 0) > > You can also duplicate this problem at ourvoices.sitellite.org on the > Linux box as well. > > phpinfo() can be seen for both these machines at: > > http://dev.ourvoices.ca/phpinfo.php > http://ourvoices.sitellite.org/phpinfo.php > > Anyone seen this before? Anyone know of a solution? > > Thanks in advance, > > Lux > > -- > > John Luxford > President and Chief Developer > __ > SIMIAN systems > Driving Web Content Management > __ > web : http://www.simian.ca/ > email : [EMAIL PROTECTED] > phone : 204.942.8630 > fax : 309.218.3874 -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php