[PHP] RE: How do I prevent a session from rebuilding itself?
> The session data that you store in $_SESSION is written to > the files in your /tmp dir. > Are you sure your session files are getting written to that directory? Yes. > You are sure those aren't old session files from a previous configuration? Positive. I wipe the /tmp dir clean. Login to my page (user/pw, authentication, etc). See the sess_ file created. Delete the file. Reload the page, and a new sess_ file is created (with a new session ID hash). I would expect my session to be invalid and force me to login again as I do this kind of thing at the top of every page in the header: if ( !is_bool($_SESSION['login']) || $_SESSION['login'] != true ) { exit("location.href='/index.php';"); } > Are you working with a project/site on that box that uses > custom session handlers? No. > Perhaps some of your sites write to that dir, but > the session in question are getting written to your database. No. > If everything you've said is 100% accurate, then I would check for > Gremlins. The session data only exists in memory or in those session > files in the /tmp dir. Yes. > The symptoms you see could be caused by: > 1. Starting a session > 2. Saving data into the $_SESSION super global. > 3. rm'ing all of the session files. > 4. Closing your current session. > --> all done in the same page. We do write to $_SESSION all the time. For example at the top of each page we update the timestamp so we know if we should auto logout the user after 10 minutes... > I am thinking you are killing the first session, rming the > files, then > creating a new session. At the end of the page the data that was in > memory is getting written to the new session file. Yes. That's what is happening as I said. I don't want it to re-write. Ironically we used to have this problem with our PHP bug tracking system, where every few hours or whatever, people would get logged off. Turned out that some cron was purging all of /tmp. I fear that this 'bug' was 'fixed' in PHP 5 or something and so in a 'helpful' way, PHP restores the session from memory. I do NOT want that to happen. > Regards, > Mrs. O'Toole > > Daevid Vincent wrote: > > I've noticed a 'feature' that seems to be causing me some pain. > > > > When a user logs in, we store various pieces of info and > their user class in > > a $_SESSION variables. > > > > This includes a flag saying that they've ben authenticated. > > > > I would expect that if I 'rm -rf /tmp/sess_*' that the user > would get > > prompted to re-login (since the flag is not set). > > > > However what actually happens, is that PHP silently just > re-creates the > > session with a new unique identifier but with all the same > data in it. GRRR. > > > > How can I force this to NOT happen (either via php.ini or > via some function > > or directive call in each page load)? > > > > ÐÆ5ÏÐ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] DB Create Table help - using Pear DB
Jochem Maas wrote: Scott Heinrichs wrote: Hello all, This is the first time I have posted an issue to this forum, so please excuse in noob questions or statement. I am trying to create a table from a string that created by a DESCRIBE TABLE query... this is the generated string: CREATE TABLE 'users' ( 'username' varchar(120) NOT NULL primary key, 'password' varchar(64) NOT NULL, 'level' int(11) NOT NULL DEFAULT '0' ) then I use the statement: $db is a PEAR DB object that has been set up with my database access info and connects to MYSQL. $stmt = above create string. $db->query ( $stmt ); for some reason it is not creating the desired table. Im sure the $db object has some error related methods that will give some information as to the problem. some ideas: 1. your using transaction and not commiting after the query 2. the user you connect as doesn't have 'create table' permissions 3. $stmt doesn't contain what you think it does. 4. the SQL is invalid (doesn't look like it though.) no.2 seems most likely. Can anyone give me a solution or a reason why the above situation would not work. Just to clarify that my Database info is correct I was able to generate the create string from a DESCRIBE TABLE query so the connection works and is valid and I have CREATE rights. Ok... I can log in to the mysql padmin and create a table using the same connection info. I am assuming this would mean that I should have create rights when I connect through my script. I am not 100% on this and I am unable to find out what my GRANT rights are at least not in a timely fashion. My script currently checks for errors and it is not generating any $result = $this->db->query( $stmt ); unset( $stmt ); if ( PEAR::isError($result) ) { $this->hasError = true; $this->errorCount++; array_push ( $this->errorMessage, "Error: Unable to create Table in Database" ); return false; } This is a snippet from my code It should catch the error. When I run the script no error is generated. Is there a better or more reliable way to write SQL syntax for creating a table then the one I am using... here it is again: CREATE TABLE 'users' ( 'username' varchar(120) NOT NULL primary key, 'password' varchar(64) NOT NULL, 'level' int(11) NOT NULL DEFAULT '0' ) The above line was captured from an ECHO of the $stmt variable so I know the $stmt is what I expect it to be. I know that I am not using transactions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I prevent a session from rebuilding itself?
On Tue, 2006-07-11 at 17:27, Daevid Vincent wrote: > I've noticed a 'feature' that seems to be causing me some pain. > > When a user logs in, we store various pieces of info and their user class in > a $_SESSION variables. > > This includes a flag saying that they've ben authenticated. > > I would expect that if I 'rm -rf /tmp/sess_*' that the user would get > prompted to re-login (since the flag is not set). Does it say someplace in the manual that you should be able to do that? Or is this a case of what you expect is not what the rest of the world expects? Ok, that's maybe not fair, but "rm -rf /tmp/sess_*" is completely prone to race conditions. > However what actually happens, is that PHP silently just re-creates the > session with a new unique identifier but with all the same data in it. GRRR. Are you sure that PHP is the one completely recreating the session? Do you have some kind of "remember me" facility using a permanent cookie that enables your scripts to recreate a session with a new identifier? Because PHP doesn't usually do that by itself. > How can I force this to NOT happen (either via php.ini or via some function > or directive call in each page load)? Try this... /etc/init.d/apache stop rm -rf /tmp/sess_* /etc/init.d/apache start If that doesn't prevent recreation of the session then see the "remember me" comment above (you may need to replace the above shutdown/startup commands with whatever works for your OS/distro. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] List of Restricted Countries to Leave Out of Credit Card Form?
For my credit card form I provide the user with a list of countries. I suppose these are ISO country codes? For the US is there an official list of countries with which I'm not supposed to do business with? Will Authorize.Net catch those transactions? Thanks, Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Startinga shell process with a life of its own
This one time, at band camp, "Daevid Vincent" <[EMAIL PROTECTED]> wrote: > > I wish PHP would add threading. We write enterprise level products with PHP, > and we end up using DBUS and letting Ruby do all the "real work". submit patch Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] DB Create Table help - using Pear DB
At 5:05 PM -0700 7/11/06, Scott Heinrichs wrote: >Can anyone give me a solution If all else fails, use phpAdminMySQL to set up your tables. I seldom program it. tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DB Create Table help - using Pear DB
Hello all, This is the first time I have posted an issue to this forum, so please excuse in noob questions or statement. I am trying to create a table from a string that created by a DESCRIBE TABLE query... this is the generated string: CREATE TABLE 'users' ( 'username' varchar(120) NOT NULL primary key, 'password' varchar(64) NOT NULL, 'level' int(11) NOT NULL DEFAULT '0' ) then I use the statement: $db is a PEAR DB object that has been set up with my database access info and connects to MYSQL. $stmt = above create string. $db->query ( $stmt ); for some reason it is not creating the desired table. Can anyone give me a solution or a reason why the above situation would not work. Just to clarify that my Database info is correct I was able to generate the create string from a DESCRIBE TABLE query so the connection works and is valid and I have CREATE rights. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5...
Unless there is some specific reason that you need this code to run on both php4 and php5, then inform your boss/admin that the idea of developing on php5, to deploy on php4 is nuts. If they disagree inform them that they are personally nuts( tell them some guy on the internet said so ). It may be possible to develop php5 code in a php5 env, if you are intimately familiar with the differences between php4 and php5, but if you're that familiar with PHP, then you're worth more than a half-ass software creation enviornment. Basicly it's a catch22 if you're good enough to be able to cope with this enviornment, you shouldn't have to.
RE: [PHP] PHP 5...
It's silly to have two different environments like that. Either code the thing in PHP4. or upgrade the production environment to PHP5. DÆVID > -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 11, 2006 6:08 AM > To: php php > Subject: [PHP] PHP 5... > > Hi, > Something strange and dont really know what to expect > so was hoping you > more experienced PHP 5 people can help me out. > > We have been given a development server thats running > php5 with MySql > Client API version 5.0.22 (didnt know there was one > that high) > > the problem is, we have to develop on this and then > when its done the > app will be moved to a php 4 final server... > > I have been reading and i see that there are some php4 > functions that > act strange on php5 (like strpos) > are there any other things I should be aware of? > > If you think it would be too much of a hassle, do you > think i should > request the admin to install php 4 instead and scrap > this installation? > > I have also seen many sites having php4 and 5 on the > same machine, this > is a windows server, is there any easy way to do that > here? > > Thanks! > Ryan > > -- > - The faulty interface lies between the chair and the keyboard. > - Creativity is great, but plagiarism is faster! > - Smile, everyone loves a moron. :-) > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 5...
Hi, Something strange and dont really know what to expect so was hoping you more experienced PHP 5 people can help me out. We have been given a development server thats running php5 with MySql Client API version 5.0.22 (didnt know there was one that high) the problem is, we have to develop on this and then when its done the app will be moved to a php 4 final server... I have been reading and i see that there are some php4 functions that act strange on php5 (like strpos) are there any other things I should be aware of? If you think it would be too much of a hassle, do you think i should request the admin to install php 4 instead and scrap this installation? I have also seen many sites having php4 and 5 on the same machine, this is a windows server, is there any easy way to do that here? Thanks! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I prevent a session from rebuilding itself?
I've noticed a 'feature' that seems to be causing me some pain. When a user logs in, we store various pieces of info and their user class in a $_SESSION variables. This includes a flag saying that they've ben authenticated. I would expect that if I 'rm -rf /tmp/sess_*' that the user would get prompted to re-login (since the flag is not set). However what actually happens, is that PHP silently just re-creates the session with a new unique identifier but with all the same data in it. GRRR. How can I force this to NOT happen (either via php.ini or via some function or directive call in each page load)? ÐÆ5ÏÐ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD to database directly
Eric Butera wrote: On 7/11/06, Kevin Waterson <[EMAIL PROTECTED]> wrote: How much of a performance hit? Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Here's to being bored on lunch. :) Now to add my two cents to the convo: I don't see a problem with storing images in the DB IF they aren't going to be continually accessed that way. For example say you have a script that lets a user upload an image and creates a small, medium, and large view out of it. Stick the original in the Db and then make your 3 sizes on the fly and cache the output so they are not continually created. This way you could down the road re-do all the sizes if you go through a site redesign or the client chooses they want them 450 instead of 400. =) Via MySQL 4.1 & PHP 5.1.4: erics:~ eric$ ab -n500 -c5 http://localhost/fs_vs_db/viewimage_db.php This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Finished 500 requests Server Software:Apache/1.3.33 Server Hostname:localhost Server Port:80 Document Path: /fs_vs_db/viewimage_db.php Document Length:25256 bytes Concurrency Level: 5 Time taken for tests: 4.323 seconds Complete requests: 500 Failed requests:0 Broken pipe errors: 0 Total transferred: 12727000 bytes HTML transferred: 12628000 bytes Requests per second:115.66 [#/sec] (mean) Time per request: 43.23 [ms] (mean) Time per request: 8.65 [ms] (mean, across all concurrent requests) Transfer rate: 2944.02 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect:0 00.4 010 Processing:1442 12.6 38 147 Waiting: 1442 12.6 38 147 Total: 1442 12.6 38 147 Percentage of the requests served within a certain time (ms) 50% 38 66% 40 75% 44 80% 46 90% 56 95% 67 98% 78 99% 97 100%147 (last request) Raw Image: erics:~ eric$ ab -n500 -c5 http://localhost/fs_vs_db/cloud.jpg This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Finished 500 requests Server Software:Apache/1.3.33 Server Hostname:localhost Server Port:80 Document Path: /fs_vs_db/cloud.jpg Document Length:25256 bytes Concurrency Level: 5 Time taken for tests: 0.624 seconds Complete requests: 500 Failed requests:0 Broken pipe errors: 0 Total transferred: 12775000 bytes HTML transferred: 12628000 bytes Requests per second:801.28 [#/sec] (mean) Time per request: 6.24 [ms] (mean) Time per request: 1.25 [ms] (mean, across all concurrent requests) Transfer rate: 20472.76 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect:0 10.7 1 5 Processing: 3 56.6 4 131 Waiting:1 46.7 3 130 Total: 3 66.5 5 131 Percentage of the requests served within a certain time (ms) 50% 5 66% 5 75% 5 80% 6 90% 7 95% 10 98% 11 99% 19 100%131 (last request) The time taken per request, though (and that's about all we can get with a concurrency as low as 5) doesn't tell us much. We also don't know exactly what the PHP code is doing, how it does it, how your database is organized/indexed/accessed, if you have any PHP accelerators installed (Normally the PHP script would be reconverted to bytecode every execution), etc. Additionally, your test isn't really MySQL versus filesystem, it's PHP+MySQL versus filesystem. Perhaps a more useful comparison would be PHP+Filesystem versus PHP+MySQL. As in, the same PHP script for both benchmarks, except one copy uses file_get_contents and echo (Closer match than readfile, since MySQL would require loading the file into memory) and the other uses MySQL. This would be a closer match that would tell us how much latency is induced by the actual database itself rather than PHP and loading stuff into memory. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] order/reorder pull out data from arrays
Dallas Cahker wrote: > I have an array that i would like to sort and reorder based on a simple > critera. I already order the data but I would like to break the data now > into sections by customer id, so one customer has 5 things and another > customer has one. How can I do that with an array. > > $data = orders($id,$status); > $c = count($data); > for($i=0; $i<$c; $i++) { > $orderid = $data[$i]['orderid']; > $customerid = $data[$i]['customerid']; > $name = $data[$i]['name']; > print $orderid.' - '.$customerid.' - '.$name.''; > } // something like this?: $grouped = array(); foreach ($data as $d) { $cid = $d['customerid']; if (!isset($grouped[$cid])) { $grouped[$cid] = array( 'cust' => "{$cid} - {$d['name']}"; 'data' => array(); ); } // I dont know exactly what constitutes an order line // - your example doesn't make it clear $grouped[$cid]['data'][] = "make a string of the current orderline here!"; } foreach ($grouped as $cid => $data) { echo $data['cust'],"\n"; foreach ($data['data'] as $orderline) echo $orderline,"\n"; } > What it is currently is all the orders are ordered by the customer number, > however I would like to group it a little nicer on the output. > ... > > Anyway I can do that? as many as there ways to skin a cat probably :-) > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] order/reorder pull out data from arrays
Ok I understand your method now. your code does not match your output. how would your print line produce that , $customerid ? anyways... $data = orders($id,$status); $c = count($data); $currentId; $n = 1; for($i=0; $i<$c; $i++) { $orderid = $data[$i]['orderid']; $customerid = $data[$i]['customerid']; $name = $data[$i]['name']; if($currentid == $customerid) { //Continue current customer group print $orderid.' - '.$customerid.' - '.$name.''; } else { //Begin a new group... $currentId = $customerid; Print("Customer ".$n"); $n++; } } I'm kind of headed out so its a bit rushed and the example above wont work as given but you get the idea from the two comments I added... On 7/11/06, Dallas Cahker <[EMAIL PROTECTED]> wrote: I have an array that i would like to sort and reorder based on a simple critera. I already order the data but I would like to break the data now into sections by customer id, so one customer has 5 things and another customer has one. How can I do that with an array. $data = orders($id,$status); $c = count($data); for($i=0; $i<$c; $i++) { $orderid = $data[$i]['orderid']; $customerid = $data[$i]['customerid']; $name = $data[$i]['name']; print $orderid.' - '.$customerid.' - '.$name.''; } What it is currently is all the orders are ordered by the customer number, however I would like to group it a little nicer on the output. Current: 1234 - blah blah blah - Y - 3, 01234 1235 - blah blah blah - N - 6, 01234 1236 - blah blah blah - N - 6, 01234 1237 - blah blah blah - Y - 6, 11256 1238 - blah blah blah - N - 6, 22589 1239 - blah blah blah - N - 6, 22589 1240 - blah blah blah - Y - 6, 22589 1241 - blah blah blah - N - 6, 22589 Would like: 01234 - The Customer 1 1234 - blah blah blah - Y - 3 1235 - blah blah blah - N - 6 1236 - blah blah blah - N - 6 11256 - The Customer 2 1237 - blah blah blah - Y - 6 22589 - The Customer 3 1238 - blah blah blah - N - 6 1239 - blah blah blah - N - 6 1240 - blah blah blah - Y - 6 1241 - blah blah blah - N - 6 Anyway I can do that?
[PHP] Re: ftp_put()'ing a string ...
Jochem Maas wrote: > hi everyone, > > I was wondering if anyone knew how (if possible) I could take a string > and ftp_put()/ftp_fput() that string directly onto the remote server as a file > (without first saving the string to disk temporarily locally) > > I imagine that there is a way to create a stream that refers to the string > in question but I can't get my head round the streams functionality... > > Obviously saving the string temporarily to disk locally is an easy option > but I was kind of using the situation I have now to try and do something a > little fancy and learn something about streams. > > anyone with idea/pointers? I stumbled accross the following page while RTFMing: http://php.net/manual/en/wrappers.ftp.php very nice, it enabled me the come up wth the following to lines (nice and compact!): $context = stream_context_create(array('ftp' => array('overwrite' => true))); $retval = file_put_contents("ftp://{$ftp_user}:[EMAIL PROTECTED]:21/{$filename}", $xml, LOCK_EX, $context); BUT this leaves me with the problem of determining what went wrong if the file_put_contents() call fails. did the connection fail? did the login fail? did the write/upload fail (and why)? using the std. ftp functions it's [obviously] alot easier to determine at which point the failure occured. can anyone confirm I'm on the right track by trying to set 'notification' [stream]context parameter? > > TIA, > Jochem. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] order/reorder pull out data from arrays
I have an array that i would like to sort and reorder based on a simple critera. I already order the data but I would like to break the data now into sections by customer id, so one customer has 5 things and another customer has one. How can I do that with an array. $data = orders($id,$status); $c = count($data); for($i=0; $i<$c; $i++) { $orderid = $data[$i]['orderid']; $customerid = $data[$i]['customerid']; $name = $data[$i]['name']; print $orderid.' - '.$customerid.' - '.$name.''; } What it is currently is all the orders are ordered by the customer number, however I would like to group it a little nicer on the output. Current: 1234 - blah blah blah - Y - 3, 01234 1235 - blah blah blah - N - 6, 01234 1236 - blah blah blah - N - 6, 01234 1237 - blah blah blah - Y - 6, 11256 1238 - blah blah blah - N - 6, 22589 1239 - blah blah blah - N - 6, 22589 1240 - blah blah blah - Y - 6, 22589 1241 - blah blah blah - N - 6, 22589 Would like: 01234 - The Customer 1 1234 - blah blah blah - Y - 3 1235 - blah blah blah - N - 6 1236 - blah blah blah - N - 6 11256 - The Customer 2 1237 - blah blah blah - Y - 6 22589 - The Customer 3 1238 - blah blah blah - N - 6 1239 - blah blah blah - N - 6 1240 - blah blah blah - Y - 6 1241 - blah blah blah - N - 6 Anyway I can do that?
Re: [PHP] PHP 5....
Ryan A wrote: > Hi, > Something strange and dont really know what to expect so was hoping you more > experienced PHP 5 people can help me out. btw which minor version of php5 your running is important ... plenty of things have changed in [semi] breaking ways between minor php5 versions. > > We have been given a development server thats running php5 with MySql Client > API version 5.0.22 (didnt know there was one that high) > > the problem is, we have to develop on this and then when its done the app > will be moved to a php 4 final server... > > I have been reading and i see that there are some php4 functions that act > strange on php5 (like strpos) what's wrong with strpos() in php5? are you perchance using multibyte strings without using the mb_string function overloading stuff? > are there any other things I should be aware of? the fact that objects are always references in php5 and in php4 you have to use '&' everwhere to make sure your always talking to the same object (using the '&' notation in php5 will give you NOTICEs or WARNINGS depending on the minor version) that and a million other little things like certain functions not being available :-) > > If you think it would be too much of a hassle, do you think i should request > the admin to install php 4 instead and scrap this installation? YES. *at the very least* it will be a pain to dev on php5 and go to production on a php4. > > I have also seen many sites having php4 and 5 on the same machine, this is a > windows server, is there any easy way to do that here? sorry I'm clueless regardless IIS. > > Thanks! > Ryan > > --- The faulty interface lies between the chair and the keyboard. > - Creativity is great, but plagiarism is faster! > - Smile, everyone loves a moron. :-) > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Mathijs wrote: > Jochem Maas wrote: >> Mathijs wrote: ... > (Hartelijk dank voor de hulp :D ). we kunnen geheime taal gaan gebruiken - vinden ze hier vast leuk ;-) > > Mathijs > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD to database directly
On 7/11/06, Kevin Waterson <[EMAIL PROTECTED]> wrote: How much of a performance hit? Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Here's to being bored on lunch. :) Now to add my two cents to the convo: I don't see a problem with storing images in the DB IF they aren't going to be continually accessed that way. For example say you have a script that lets a user upload an image and creates a small, medium, and large view out of it. Stick the original in the Db and then make your 3 sizes on the fly and cache the output so they are not continually created. This way you could down the road re-do all the sizes if you go through a site redesign or the client chooses they want them 450 instead of 400. =) Via MySQL 4.1 & PHP 5.1.4: erics:~ eric$ ab -n500 -c5 http://localhost/fs_vs_db/viewimage_db.php This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Finished 500 requests Server Software:Apache/1.3.33 Server Hostname:localhost Server Port:80 Document Path: /fs_vs_db/viewimage_db.php Document Length:25256 bytes Concurrency Level: 5 Time taken for tests: 4.323 seconds Complete requests: 500 Failed requests:0 Broken pipe errors: 0 Total transferred: 12727000 bytes HTML transferred: 12628000 bytes Requests per second:115.66 [#/sec] (mean) Time per request: 43.23 [ms] (mean) Time per request: 8.65 [ms] (mean, across all concurrent requests) Transfer rate: 2944.02 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect:0 00.4 010 Processing:1442 12.6 38 147 Waiting: 1442 12.6 38 147 Total: 1442 12.6 38 147 Percentage of the requests served within a certain time (ms) 50% 38 66% 40 75% 44 80% 46 90% 56 95% 67 98% 78 99% 97 100%147 (last request) Raw Image: erics:~ eric$ ab -n500 -c5 http://localhost/fs_vs_db/cloud.jpg This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 100 requests Completed 200 requests Completed 300 requests Completed 400 requests Finished 500 requests Server Software:Apache/1.3.33 Server Hostname:localhost Server Port:80 Document Path: /fs_vs_db/cloud.jpg Document Length:25256 bytes Concurrency Level: 5 Time taken for tests: 0.624 seconds Complete requests: 500 Failed requests:0 Broken pipe errors: 0 Total transferred: 12775000 bytes HTML transferred: 12628000 bytes Requests per second:801.28 [#/sec] (mean) Time per request: 6.24 [ms] (mean) Time per request: 1.25 [ms] (mean, across all concurrent requests) Transfer rate: 20472.76 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect:0 10.7 1 5 Processing: 3 56.6 4 131 Waiting:1 46.7 3 130 Total: 3 66.5 5 131 Percentage of the requests served within a certain time (ms) 50% 5 66% 5 75% 5 80% 6 90% 7 95% 10 98% 11 99% 19 100%131 (last request) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: I cannot forget you!
On Tue, 2006-07-11 at 05:26, Barry wrote: > [EMAIL PROTECTED] schrieb: > > your big love, ;-) > > > Well PHP is good but is it that good? *shsh* Where have you been? http://marc.theaimsgroup.com/?l=php-general&m=115129593132595&w=2 Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 5....
Hi, Something strange and dont really know what to expect so was hoping you more experienced PHP 5 people can help me out. We have been given a development server thats running php5 with MySql Client API version 5.0.22 (didnt know there was one that high) the problem is, we have to develop on this and then when its done the app will be moved to a php 4 final server... I have been reading and i see that there are some php4 functions that act strange on php5 (like strpos) are there any other things I should be aware of? If you think it would be too much of a hassle, do you think i should request the admin to install php 4 instead and scrap this installation? I have also seen many sites having php4 and 5 on the same machine, this is a windows server, is there any easy way to do that here? Thanks! Ryan --- The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Startinga shell process with a life of its own
Great approach! Slicker'n snot. I added one enhancement: The shell script writss progress info to the database which the trigger page displays on entry. Richard Lynch wrote: I would recommend, however, that you re-structure things slightly so that the Architecture is more like this: User visits web page. Page generates a database record of what needs to be done. Page finished. CRON JOB: Look in task list of what needs doing, and do some of them. Make sure only one job is done at a time, or whatever race conditions are handled here. I've done projects both ways, and always end up frustrated with the "PHP attempts to background a process" and the "Task List + Cron" always works out far far better. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[Fwd: [PHP] Problem installing php] - SOLVED
Solved installing csv version. Is it officially stable? Do anyone know when is it going to be stable? Original Message Subject:[PHP] Problem installing php Date: Tue, 11 Jul 2006 12:04:18 +0200 From: Ruben Rubio Rey <[EMAIL PROTECTED]> To: php-general@lists.php.net I have a problem when installing php. I have tried with different versions of apache (2.0.55 and 2.0.58) and php (5.1.4 and 5.1.2). The problem still there (Same error in different versions)!!! Note that I had installed apache 2.0.58 and php 5.1.4 before on this server. Problems began when tried to add -with-pspell --with-openssl at configure. ( I installed aspell). When I tried it, i was no able to install php again. Any ideas or workarrounds will be appreciated. Complete Information: Configure: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gettext --with-pgsql --enable-trac k-vars --enable-force-cgi-redirect --with-mime-magic -with-pspell --with-openssl Server: CentOS release 4.3 (Final) 2.6.9-34.0.1.ELsmp /usr/local/src/php-5.1.2$ make install Installing PHP SAPI module: apache2handler /usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules /usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/ cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a ranlib /usr/local/apache2/modules/libphp5.a chmod 644 /usr/local/apache2/modules/libphp5.a libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.1.2/libs' Warning! dlname not found in /usr/local/apache2/modules/libphp5.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/apache2/modules/libphp5.so chmod: no se puede acceder a «/usr/local/apache2/modules/libphp5.so»: No existe el fichero o el directorio apxs:Error: Command failed with rc=65536 Thanks in advance, Ruben Rubio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Jochem Maas wrote: Mathijs wrote: ... Now i have a problem with the ETag. what are you using this header for? I Use this header to check if the content of a file has changed. This because the content can be variable. But is static most of the time. I Compute an MD5 of the content, and add this to the ETag. Normally a browser sends an HTTP_IF_NONE_MATCH back if it has an ETag. If this gets send back, i compare them and if they are the same, they get en 304 Not Modified back. Now Internet Explorer doesn't send this back when the content has been compressed (gz_handler). This because the Vary header has been set or something. This is a bug in IE, and probably fixed in IE7. freaking lightbulb moment for me!!! see how it pays to help people - you never know when you might get slapped in the face with some new knowledge :-) thanks! that said I wonder whether generating the dynamic content, buffering it, using the buffer to generate a md5 hash and then checking that is any faster than just outputting the generating content regardless? or is this purely a tactic to reduce bandwidth? LoL. And no problem. Um yea it's an bandwidth saving tactic. This because the website has big traffic. And it is mostly the JS and CSS files that are eating everything up. If i compress them it saves a lot of bandwidth. I Just discovered this problem with IE and the ETag :(. I use Opera and Firefox my self. But didn't really checked this caching in IE. And most of the users still use IE. I Think i have to weigh the features. The content isn't going to be changed that much. Only when someone changes the language or if i change some constant values. So i think i go for this solution since there is non so ever to fix this for IE. I am going to check the user-agent. If it is IE then i am not going to gzip the contents. Everything else then IE will get the gziped contents. This way the ETag gets send back, and i can respond with an 304 if it still is the same. This should save bandwidth also. And it will only send out an un-compressed version just once. And it will resend the content when it is changed (Which i think won't happen that much). Again, thanks for you thoughts :). (Hartelijk dank voor de hulp :D ). Mathijs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Mathijs wrote: ... >>> >>> Now i have a problem with the ETag. >> >> what are you using this header for? > > I Use this header to check if the content of a file has changed. > This because the content can be variable. But is static most of the time. > > I Compute an MD5 of the content, and add this to the ETag. > Normally a browser sends an HTTP_IF_NONE_MATCH back if it has an ETag. > If this gets send back, i compare them and if they are the same, they > get en 304 Not Modified back. > > Now Internet Explorer doesn't send this back when the content has been > compressed (gz_handler). > This because the Vary header has been set or something. > This is a bug in IE, and probably fixed in IE7. > freaking lightbulb moment for me!!! see how it pays to help people - you never know when you might get slapped in the face with some new knowledge :-) thanks! that said I wonder whether generating the dynamic content, buffering it, using the buffer to generate a md5 hash and then checking that is any faster than just outputting the generating content regardless? or is this purely a tactic to reduce bandwidth? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Mathijs wrote: Jochem Maas wrote: Mathijs wrote: Hello there, I can't figure out why there are some headers set while i don't set them myself. The following headers are sent to the browser. -Expires: Thu, 19 Nov 1981 08:52:00 GMT -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache All those i didn't set my self. Does PHP set these or something? maybe it was php (check your session settings and read the relevant parts of the manual regarding session related headers) maybe it was a piece of 3rd party code. may it was 'something' ;-) most likely it's the session extension doing this. And you are right again :). Thanks again. This was a real pain in the ass. Because IE didn't sent the If-Last-Modified and/or if-none-match if one of those headers are sent. Thank you. Thx in advanced. Well it seems its working kinda. Now i have a problem with the ETag. Internet Explorer seems to forget this when the content is compressed. This because of the Vary header apparently. Is there a fix for this? Or a workaround? Thx. --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0628-1, 07-10-2006 Tested on: 07-11-2006 13:33:12 avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] printing special characters in PHP
At 10:16 AM + 7/11/06, Antonio Bassinger wrote: >Dear ALL, > >I've an binary file with special (non-printable) characters including '<' >'/' & '>'. I retrieve this file from the database, into a variable >$binaryFILE. > >I then copy the content to a temporary file, opened with handle $handle : > > >if (!fwrite($handle, $binaryFILE)) { > echo "Failed to copy $bname..."; > } > else > { > echo "Success"; > } > >The file copies to a file on the filesystem correctly. However, if I try to >print out the characters of this file on a browser, using > >echo $binaryFILE; > >the output isn't the same. The characters '<' and '>' and anything included >within is not printed. > >I tried printing line by line, using: > >$binaryMS = explode("",$binaryMMS); >foreach ($binaryFILE as $ii) >{ > echo $ii; >} > >However, no change in result. > >Do I print character by character? I shall appreciate any pointers on this >problem. > >Many Thanks >Antonio Antonio: The reason why you are not seeing the characters is that they are being grabbed-up by the browser as html code. In other words, you are injecting html into your web page. Take a look at this: http://www.weberdev.com/htmlentities Now, pass your content through this function and then display. tedd -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Jochem Maas wrote: Mathijs wrote: Mathijs wrote: Jochem Maas wrote: Mathijs wrote: Hello there, I can't figure out why there are some headers set while i don't set them myself. The following headers are sent to the browser. -Expires: Thu, 19 Nov 1981 08:52:00 GMT -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache All those i didn't set my self. Does PHP set these or something? maybe it was php (check your session settings and read the relevant parts of the manual regarding session related headers) maybe it was a piece of 3rd party code. may it was 'something' ;-) most likely it's the session extension doing this. And you are right again :). Thanks again. This was a real pain in the ass. Because IE didn't sent the If-Last-Modified and/or if-none-match if one of those headers are sent. Thank you. Thx in advanced. Well it seems its working kinda. Now i have a problem with the ETag. what are you using this header for? I Use this header to check if the content of a file has changed. This because the content can be variable. But is static most of the time. I Compute an MD5 of the content, and add this to the ETag. Normally a browser sends an HTTP_IF_NONE_MATCH back if it has an ETag. If this gets send back, i compare them and if they are the same, they get en 304 Not Modified back. Now Internet Explorer doesn't send this back when the content has been compressed (gz_handler). This because the Vary header has been set or something. This is a bug in IE, and probably fixed in IE7. Internet Explorer seems to forget this when the content is compressed. This because of the Vary header apparently. Is there a fix for this? Or a workaround? yes. but your no longer in the realm of php (I believe) this is something you should tackle at the webserver configuration level... on one of the machines I run the (main) site has this in the config (its apache): # Netscape 4.x has some problems... BrowserMatch^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch\bMSIE !no-gzip !gzip-only-text/html # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 # the above regex won't work. You can use the following # workaround to get the desired effect: BrowserMatch\bMSI[E] !no-gzip !gzip-only-text/html # Don't compress images SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary SetEnvIfNoCase Request_URI \/image\.php no-gzip dont-vary # Also don't compress PDF and Flash-files 17-01-2004 MM SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.swf$ no-gzip dont-vary # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary now I'm not saying these settings will work for you - the site in question runs behind an instance of Squid configured as a reverse caching proxy - which complicates matters somewhat - but it might give you an idea. I have checked this also, and it came up with nothing. :(. It now seems that i have to check if i am dealing with Internet Explorer or not within PHP. And then if it is IE i don't compress the content. Anyway, Thank you very much for your help :). If you have any idea's left :D. Kind Regards, Mathijs. Thx. --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0628-1, 07-10-2006 Tested on: 07-11-2006 13:33:12 avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Randomly rotate image on page load? File under: Image Manipulation WOT
[snip] One could even say that the slides were rotated. :-) [/snip] LOL at the Carousel reference.but if we are still splitting hairs I owned a Bell & Howell Slide Cube projector. Slides were stacked into cubes and dropped into place. And anyway, the Carousel rotated, not the slides. The slides were merely passengers and IIRC had to be placed into said carousel upside down and backwards. Wow. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Mathijs wrote: > Mathijs wrote: >> Jochem Maas wrote: >>> Mathijs wrote: Hello there, I can't figure out why there are some headers set while i don't set them myself. The following headers are sent to the browser. -Expires: Thu, 19 Nov 1981 08:52:00 GMT -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache All those i didn't set my self. Does PHP set these or something? >>> >>> maybe it was php (check your session settings and read the relevant >>> parts of the manual >>> regarding session related headers) >>> >>> maybe it was a piece of 3rd party code. >>> >>> may it was 'something' ;-) >>> >>> most likely it's the session extension doing this. >>> >> >> And you are right again :). >> Thanks again. >> >> This was a real pain in the ass. >> Because IE didn't sent the If-Last-Modified and/or if-none-match if >> one of those headers are sent. >> >> Thank you. >> >> Thx in advanced. >> > > Well it seems its working kinda. > > Now i have a problem with the ETag. what are you using this header for? > Internet Explorer seems to forget this when the content is compressed. > This because of the Vary header apparently. > > Is there a fix for this? > Or a workaround? yes. but your no longer in the realm of php (I believe) this is something you should tackle at the webserver configuration level... on one of the machines I run the (main) site has this in the config (its apache): # Netscape 4.x has some problems... BrowserMatch^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch\bMSIE !no-gzip !gzip-only-text/html # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 # the above regex won't work. You can use the following # workaround to get the desired effect: BrowserMatch\bMSI[E] !no-gzip !gzip-only-text/html # Don't compress images SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary SetEnvIfNoCase Request_URI \/image\.php no-gzip dont-vary # Also don't compress PDF and Flash-files 17-01-2004 MM SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.swf$ no-gzip dont-vary # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary now I'm not saying these settings will work for you - the site in question runs behind an instance of Squid configured as a reverse caching proxy - which complicates matters somewhat - but it might give you an idea. > > Thx. > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 0628-1, 07-10-2006 > Tested on: 07-11-2006 13:33:12 > avast! - copyright (c) 1988-2006 ALWIL Software. > http://www.avast.com > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] printing special characters in PHP
Antonio Bassinger a écrit : Dear ALL, I've an binary file with special (non-printable) characters including '<' '/' & '>'. I retrieve this file from the database, into a variable $binaryFILE. $binaryMS = explode("",$binaryMMS); foreach ($binaryFILE as $ii) { echo $ii; try this : echo htmlspecialchars($ii); N F } However, no change in result. Do I print character by character? I shall appreciate any pointers on this problem. Many Thanks Antonio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] printing special characters in PHP
Antonio Bassinger wrote: > Dear ALL, > > I've an binary file with special (non-printable) characters including '<' > '/' & '>'. I retrieve this file from the database, into a variable those 3 chars are not non-printable (the fact that I see them in this email is proof enough. > $binaryFILE. > > I then copy the content to a temporary file, opened with handle $handle : > > > if (!fwrite($handle, $binaryFILE)) { > echo "Failed to copy $bname..."; > } > else > { > echo "Success"; > } > > The file copies to a file on the filesystem correctly. However, if I try to > print out the characters of this file on a browser, using > > echo $binaryFILE; > > the output isn't the same. The characters '<' and '>' and anything included > within is not printed. > > I tried printing line by line, using: > > $binaryMS = explode("",$binaryMMS); > foreach ($binaryFILE as $ii) > { > echo $ii; > } > > However, no change in result. > > Do I print character by character? I shall appreciate any pointers on this > problem. either do 'view source' in your browser or pass the string through the htmlentities() function - the reason you don't see stuff in between the LT and GT chars has to do with the markup used for HTML tags think about it for a second :-) > > Many Thanks > Antonio > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Jochem Maas wrote: Mathijs wrote: Hello there, I can't figure out why there are some headers set while i don't set them myself. The following headers are sent to the browser. -Expires: Thu, 19 Nov 1981 08:52:00 GMT -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache All those i didn't set my self. Does PHP set these or something? maybe it was php (check your session settings and read the relevant parts of the manual regarding session related headers) maybe it was a piece of 3rd party code. may it was 'something' ;-) most likely it's the session extension doing this. And you are right again :). Thanks again. This was a real pain in the ass. Because IE didn't sent the If-Last-Modified and/or if-none-match if one of those headers are sent. Thank you. Thx in advanced. --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0628-1, 07-10-2006 Tested on: 07-11-2006 11:53:48 avast! - copyright (c) 1988-2006 ALWIL Software. http://www.avast.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] printing special characters in PHP
Dear ALL, I've an binary file with special (non-printable) characters including '<' '/' & '>'. I retrieve this file from the database, into a variable $binaryFILE. I then copy the content to a temporary file, opened with handle $handle : if (!fwrite($handle, $binaryFILE)) { echo "Failed to copy $bname..."; } else { echo "Success"; } The file copies to a file on the filesystem correctly. However, if I try to print out the characters of this file on a browser, using echo $binaryFILE; the output isn't the same. The characters '<' and '>' and anything included within is not printed. I tried printing line by line, using: $binaryMS = explode("",$binaryMMS); foreach ($binaryFILE as $ii) { echo $ii; } However, no change in result. Do I print character by character? I shall appreciate any pointers on this problem. Many Thanks Antonio
[PHP] Problem installing php
I have a problem when installing php. I have tried with different versions of apache (2.0.55 and 2.0.58) and php (5.1.4 and 5.1.2). The problem still there (Same error in different versions)!!! Note that I had installed apache 2.0.58 and php 5.1.4 before on this server. Problems began when tried to add -with-pspell --with-openssl at configure. ( I installed aspell). When I tried it, i was no able to install php again. Any ideas or workarrounds will be appreciated. Complete Information: Configure: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gettext --with-pgsql --enable-trac k-vars --enable-force-cgi-redirect --with-mime-magic -with-pspell --with-openssl Server: CentOS release 4.3 (Final) 2.6.9-34.0.1.ELsmp /usr/local/src/php-5.1.2$ make install Installing PHP SAPI module: apache2handler /usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules /usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/ cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a ranlib /usr/local/apache2/modules/libphp5.a chmod 644 /usr/local/apache2/modules/libphp5.a libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.1.2/libs' Warning! dlname not found in /usr/local/apache2/modules/libphp5.la. Assuming installing a .so rather than a libtool archive. chmod 755 /usr/local/apache2/modules/libphp5.so chmod: no se puede acceder a «/usr/local/apache2/modules/libphp5.so»: No existe el fichero o el directorio apxs:Error: Command failed with rc=65536 Thanks in advance, Ruben Rubio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with caching and headers.
Mathijs wrote: > Hello there, > > I can't figure out why there are some headers set while i don't set them > myself. > > The following headers are sent to the browser. > -Expires: Thu, 19 Nov 1981 08:52:00 GMT > -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, > pre-check=0 > -Pragma: no-cache > > All those i didn't set my self. > > Does PHP set these or something? maybe it was php (check your session settings and read the relevant parts of the manual regarding session related headers) maybe it was a piece of 3rd party code. may it was 'something' ;-) most likely it's the session extension doing this. > > Thx in advanced. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: I cannot forget you!
[EMAIL PROTECTED] schrieb: your big love, ;-) Well PHP is good but is it that good? -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems with caching and headers.
Hello there, I can't figure out why there are some headers set while i don't set them myself. The following headers are sent to the browser. -Expires: Thu, 19 Nov 1981 08:52:00 GMT -Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 -Pragma: no-cache All those i didn't set my self. Does PHP set these or something? Thx in advanced. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $previous variable ?
I am using apache 2.0.50 and php 4.4.3RC2 as mod (on Mandrake 10.1). When I run this script: in cli php, i give 'Undefined variable' error message - OK. But under apache, this variable has value 'N'. Is it error ? I found nothing about $previous variable in php.ini and php config directories. Thanks Roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php