Re: [PHP] Php page runs from one computer but not another
Hi, "I can run the same page on the machine with the problem if I simply rename it." If you could tell what the name was when it didn't work and what when it worked. If by rename you mean change of extension like say from php3 to php then it indicates that apache config file (I am not sure for IIS or others) is not configured to handle that particular extension through php. regards Jaski On Tue, 20 Aug 2002 Jonathan Black wrote : >Hello, > >php 4.2.1 Internet Explorer 6. > >After some server upgrades at my webhoster I can see the phpinfo >page from a >computer running windows 98, but not from another computer >running windows >2000 server. Here I just see the php code in my browser. >I can run the same page on the machine with the problem if I >simply rename >it. > >The relevant url is: >http://www.natureinfo.org.il/users/webmaster/phpnatureinfo/phpinfo.php > >I have tried to disable caching as you can see from the code of >the page >which follows but this does not help: > >added by jjb due to caching problems > >header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); >header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); >header("Cache-Control: no-cache,must-revalidate"); >header("Pragma: no-cache"); > > >// Show all information, defaults to INFO_ALL >phpinfo(); > > >?> > >Thanks > >Jonathan > > > > > >-- >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] Data management tool
Hi Everyone, I am looking for a tool that lets me do simple data managment ie. edit,update,insert and delete records in tables of a database. I am kinda fed up of writing those php scripts for back ends of websites over and over :). I am looking for some thing generic to replace that if possible. PhpMyAdmin is a great tool but I don't want the user to have access to drop table and empty table etc. I cannot change the permissions of MySQL user. Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions getting destroyed for *Some* clients
Hi Guys, I have some thing weird happening with sessions here. They are getting destroyed/reset for *SOME* clients. I wrote a shopping cart which obviously needs sessions to work. It works perfectly fine on my development server .. but when I move it to my production server it starts behaving strange. It works for some client PCs and not so for others. I tested with 2 servers and 2 clients. Test Results --- Client Server Result PC Development Server OK NoteBook Development Server OK PC Production ServerPROBLEM Notebook Production ServerOK --- PC = Win 98, IE6/Opera7 Notebook = Win XP, IE 6 Devlopment Server = PHP 4.1.2 Production Server = PHP 4.3.5 Three out of four cases are working OK. And one is simply not working and sessions keep getting reset on every page request. This kinda sounds as if its neither the server nor the client which is the problem but some combination of the two which is the problem. The combination which had the problem had it for IE 6 as well as Opera 7. I asked my friends to test and 2 reported its OK and 1 reported the same problem that I encountered. The shopping cart code is written by me and is running on a couple of other servers perfectly fine. The production server is http://original-remote-control.co.uk PHPinfo() page http://original-remote-control.co.uk/phpinfo.php Any ideas on where to look would be highly appreciated. Jas __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: sessions getting destroyed for *Some* clients
I do not think it is the server name issue. I used www.original-remote-control.co.uk for testing ..and I have done that scores of times now :) .. I do not use setcookie .. I just call session_start() in the beginning to set the cookie for session. Jas -- Make sure it's not just a cookie-problem related to server name. The shopping cart session for "original-remote-control.co.uk" is different from the shopping cart for "www.original-remote-control.co.uk". If this is your problem, I think you can fix it by changing how you call "setcookie". Of course, this may not be the problem, in which case you can ignore what I just said. :-) cheers, Travis __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php training tips
Hello, I am a PHP coder for the last 4 years doing mostly PHP MySQL stuff. Off late I have been requested by a number of programmers and students to teach PHP. I am wondering how different teaching is from coding and how to design the contents of a 1-2 week training course. I am planning to begin with a free of cost 1 hour per day class, but entry will be restricted to keep it a small bunch of seriously interested people only. Any tips are welcome. Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Get "nice" variables from POST
>if (is_array($_POST)) { > foreach($_POST as $name=>$value) { > ${$name} = $value; > } >} or use this if (is_array($_POST)) { extract($_POST); } Jaski __ Do you Yahoo!? Yahoo! Search - Find what youre looking for faster http://search.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image files - upload and managment
Hi People, I am writing a web app on LAMP. The app is sort of yellow pages where people can login and post advertisments with pictures. App needs to allow users to upload pictures. (jpg and gif), needs to create thumbnails of those pictures and to store thumbnails and full pictures. App needs to manage all those files - can be as much as 20K plus images. I think image file size, file type and image dimensions restrictions should be easy to handle by using $_FILES array and getimagesize function. The issues that I am thinking of and need suggestions about are 1) Storage and retrieval - File system sounds like a better choice over database. We are talking about 20 thousand plus pictures. 2) Thumbnails - Should I create those once and save it in a file when the image is uploaded for the first time. Looks like a faster option than creating them every time on the fly. 3) Security issues - I believe I must have a world writable "666" permissions directory to keep images as users of the web app are uploading them. Does that create any security holes in my application? 4) Any thing else related to image uploads that one might need to take care of. Are there any tutorials on image upload issues. Thanks and HAND. Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image uploads - part 2
Thanks Robby Russell, Jason Wong , Greg Donald, raditha dissanayak and every one else who answered part 1 of my email concerning image uploads. It was about where to store images uploaded by website users and question was database vs filesystem and dedicated vs shared hosting and the conclusion I could understand was fast,secure,cheap pick any two 1) database + shared = secure and cheap 2) filesystem + shared = fast and cheap 3) filesystem + dedicated = fast and secure 4) database + dedicated = err.. stupid? ;) For now I have decided to try option 1 and see how far I can go till performance begins to become a limiting factor and then decide later if I really need to, to choose between security and cost. I have another question. I have used mysql mediumblob to store images. They are jpeg files. When I retrieve that binary data with a query and generate an image with PHP .. ie. I do The image gets generated and displayed OK. But when I save that image file on my work station it gets saved as a huge file .. a file which was 36 Kb jpg when uploaded is saved as 5Mb bmp when downloaded. The data in mysql column is 36 Kb only. So why is it getting saved as such a huge file and why bmp when header is 'image/jpeg' thanks Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image uploads - part 2
Thanks Robby Russell, Jason Wong , Greg Donald, raditha dissanayak and every one else who answered part 1 of my email concerning image uploads. It was about where to store images uploaded by website users and question was database vs filesystem and dedicated vs shared hosting and the conclusion I could understand was fast,secure,cheap pick any two 1) database + shared = secure and cheap 2) filesystem + shared = fast and cheap 3) filesystem + dedicated = fast and secure 4) database + dedicated = err.. stupid? ;) For now I have decided to try option 1 and see how far I can go till performance begins to become a limiting factor and then decide later if I really need to, to choose between security and cost. I have another question. I have used mysql mediumblob to store images. They are jpeg files. When I retrieve that binary data with a query and generate an image with PHP .. ie. I do The image gets generated and displayed OK. But when I save that image file on my work station it gets saved as a huge file .. a file which was 36 Kb jpg when uploaded is saved as 5Mb bmp when downloaded. The data in mysql column is 36 Kb only. So why is it getting saved as such a huge file and why bmp when header is 'image/jpeg' thanks Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php