Re: [PHP] question about corrupt db?
To view the logs in IIS you must go to the root web site in the IIS Snap in, virtual folders, folders and applications don't have a separate log file. In the left panel in the snap in, right click in the site, probably default web site, click on properties, look for a tab called 'Web Site', in the bottom of the tab look for a checkbox labeled Enable Logs, mark it to enable logs, Click the properties button and select the folder to store logs. Fallow the same path to see where the logs are stored. Hope it helps. Uaca 2008/12/2 Ashley Sheridan [EMAIL PROTECTED]: On Tue, 2008-12-02 at 01:14 +, Nathan Rixham wrote: Ashley Sheridan wrote: On Mon, 2008-12-01 at 16:29 -0600, Terion Miller wrote: On Mon, Dec 1, 2008 at 4:20 PM, Ashley Sheridan [EMAIL PROTECTED] wrote: On Mon, 2008-12-01 at 15:53 -0600, Terion Miller wrote: On Mon, Dec 1, 2008 at 3:40 PM, Wolf [EMAIL PROTECTED] wrote: -Original Message- From: Terion Miller [EMAIL PROTECTED] Sent: Monday, December 01, 2008 4:23 PM To: Micah Gersten [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Subject: Re: [PHP] question about corrupt db? On Mon, Dec 1, 2008 at 3:12 PM, Micah Gersten [EMAIL PROTECTED] wrote: Terion Miller wrote: could a corrupt db make php pages stop functioning? My pages no longer go anywhere, I went back found the original scripts and still it didn't fix the problem (thought I had messed the code up) so it has to be something external of the code its doing this locally on my box and on the live server. thanks terion Have you checked the PHP error logs? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com I put this: ini_set('error_reporting', E_ALL); ini_set('display_errors', true); in the top of the pages but no errors are showing -- Then that answer would be no You need to actually look at your error logs as if the server is set up right it won,'t allow ini bypasses. Wolf I can't find any error logs, I've looked in the inetpub folder, the php folder the IIS services admin IIS has an option that lets you view the websites you have set up (I believe you can get to it from right-clicking My Computer and selecting Manage.) Select the site you are having problems with, and view the properties for it. One of the tabs (I forget which exactly) tells you where the error logs are for this site. Ash www.ashleysheridan.co.uk wow not there either, is it possible the person in this job before me just removed the logs and the servers capability to log? like there is no usr/bin/log file or anything like that (went to the apache site) and in the IIS install I went thru everything and can't find a thing about error logs...OMG pulling out my hair. Well, /usr/bin/log is for Apache on Linux, so won't be of any use to you with IIS on Windows! Stupid question, but have you searched for all *.log files? As far as I know, you can't stop the server logging, and I think IIS locks the logs to prevent accidental deletion. Generally speaking, the logs will be pretty large files (depending on how busy your website is) if that helps you narrow down your search. Ash www.ashleysheridan.co.uk just turn display errors on and set reporting to E_ALL ? save mucking around (although it is normally a good idea to know where you're log files are) :p If you read the thread, you'd know he's already tried that, and there's some information you just don't get with E_ALL that you need to look at the logs for. Ash www.ashleysheridan.co.uk -- 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] PHP friendly web software?
I use vs.php to edit php and dreamweaver to html and im happy with those two. 2008/11/25 John Boy [EMAIL PROTECTED]: Can anyone recommend a wysiwyg web development software which is php friendly, i.e. you can design the page in wysiwyg and insert php code into the html without destroying the screen image preview. I've been using Frontpage to compose the page then dev-php to insert the php code. This has worked well but if layout changes need to be made Frontpage displays stuff all over the place. Just trying MS Expression but this shows blank page when any php code is present. Any ideas? -- 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] PHP friendly web software?
2008/11/25 [EMAIL PROTECTED]: Life's too short to not have code completion! :D I tried to help a guy out yesterday, and his silly code completion thingie ended up writing bogus HTML as I typed... I don't NEED code completion, thank you very much, I know what I'm doing, so get out of my way! :-p (I've tried them all, and end up in 'vi' almost always.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I completely agree with you! Why use a car when you can walk? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SoapClient Result
Hello, i´m trying to consume a .net webservice from php as fallow: $client = new SoapClient('http://localhost:1105/Web Service .Net/Service.asmx?WSDL'); print_r($client-HelloWorld()); and the result is: stdClass Object ( [HelloWorldResult] = Hello World ) The call works as expected, the problem is the result, the $client-HelloWorld() returns a string in .net but in php is a stdClass with a HelloWorldResult attribute. I'm not sure of what to ask but something does not looks right here, i think i should get a string back from .net and not a class except for complex types. Do i have to write something like this $client-HelloWorld()-HelloWorldResult for every method for the web service to get the actual result? Uacaman
Re: [PHP] object persistence within a session
Did storing the object reference not also store the class definition? No. You need to include the class definition. Take a look at: http://br.php.net/manual/en/function.unserialize.php, maybe you can use the *unserialize_callback_func *to load the class definition. Ângelo 2008/11/7 Stan [EMAIL PROTECTED] If this is the wrong forum, please point me at the correct forum. I am new to PHP but have 40 years experience programming. My initial effort includes a class definition which needs to persist for the duration of a WWW session. The code (this snippet is the beginning of Default.php) ?PHP session_start(); require_once 'CSSFrames_Includes/Classes.inc'; if (!isset($_SESSION[navigator])) { $_SESSION[navigator] = new CSSFrames_Navigator; } else { parse_str($_SERVER['QUERY_STRING'], $queryString); foreach ($queryString as $key = $value) { switch($key) { case ID: $_SESSION[navigator]-set_page_ID($value); break; default: break; } } } initially works ... $_session[navigator] does exist and methods do function correctly. When, however, I click a link and cause the script (Default.php) to be reentered, I get the following Fatal error: main() [a href='function.main'function.main/a]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition quot;MyClass_definedquot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /MyWebSite.com/Default.php on line 16 which I understand to mean that my class definition (file?) has not been loaded. What I do not understand is why has not the class definition been loaded? Did storing the object reference not also store the class definition? What must I do to retain the class definition as part of the session data? Thanks, Stan
Re: [PHP] redeclare classes dynamically
From your code it looks like $controller will have only the last instance to the controller class, so you can only load the last request and instantiate only one time. Other alternative is to use namespaces but this is only for PHP 5.3 or you can do what everyone else does from the begging of time use some prefix to yours classes to avoid name conflicts. Uacaman 2008/10/22 viraj [EMAIL PROTECTED] i'm trying to dynamically initialize bunch of classes from different paths but with the same class and file names. while ($register-request-m != 'exit') { $controlFile = './core/' . $register-request-m . '/controller.class.php'; if (is_file($controlFile)) { require_once ($controlFile); $controller = new controller($register); } } the while loop should continue till one of those classes set 'exit' as the $register-request-m value, where it exists loop and reach the eos. but i get this fatal error.. Cannot redeclare class controller in /home/vir blah blah.. yeah, i know it's because i try to declare the same class name several times. my question is.. what is the best way to implement this? many thanks ~viraj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP to get File Type
There is a more elegant way: http://br2.php.net/manual/en/function.mime-content-type.php and the preferred way: http://br2.php.net/manual/en/function.finfo-file.php Angelo 2008/10/14 Aschwin Wesselius [EMAIL PROTECTED] Manoj Singh wrote: Hello All, Is there any function in PHP to get the file/Mime type of any file? Any help will be appreciated. Hi, There are better and more elegant ways to do this, but I'm not aware of them. Here is what I use most of the time. You only use the filename as $value for get_mimetype(). function get_file_extension($file) { return array_pop(explode('.',$file)); } function get_mimetype($value='') { $ct['htm'] = 'text/html'; $ct['html'] = 'text/html'; $ct['txt'] = 'text/plain'; $ct['asc'] = 'text/plain'; $ct['bmp'] = 'image/bmp'; $ct['gif'] = 'image/gif'; $ct['jpeg'] = 'image/jpeg'; $ct['jpg'] = 'image/jpeg'; $ct['jpe'] = 'image/jpeg'; $ct['png'] = 'image/png'; $ct['ico'] = 'image/vnd.microsoft.icon'; $ct['mpeg'] = 'video/mpeg'; $ct['mpg'] = 'video/mpeg'; $ct['mpe'] = 'video/mpeg'; $ct['qt'] = 'video/quicktime'; $ct['mov'] = 'video/quicktime'; $ct['avi'] = 'video/x-msvideo'; $ct['wmv'] = 'video/x-ms-wmv'; $ct['mp2'] = 'audio/mpeg'; $ct['mp3'] = 'audio/mpeg'; $ct['rm'] = 'audio/x-pn-realaudio'; $ct['ram'] = 'audio/x-pn-realaudio'; $ct['rpm'] = 'audio/x-pn-realaudio-plugin'; $ct['ra'] = 'audio/x-realaudio'; $ct['wav'] = 'audio/x-wav'; $ct['css'] = 'text/css'; $ct['zip'] = 'application/zip'; $ct['pdf'] = 'application/pdf'; $ct['doc'] = 'application/msword'; $ct['bin'] = 'application/octet-stream'; $ct['exe'] = 'application/octet-stream'; $ct['class']= 'application/octet-stream'; $ct['dll'] = 'application/octet-stream'; $ct['xls'] = 'application/vnd.ms-excel'; $ct['ppt'] = 'application/vnd.ms-powerpoint'; $ct['wbxml']= 'application/vnd.wap.wbxml'; $ct['wmlc'] = 'application/vnd.wap.wmlc'; $ct['wmlsc']= 'application/vnd.wap.wmlscriptc'; $ct['dvi'] = 'application/x-dvi'; $ct['spl'] = 'application/x-futuresplash'; $ct['gtar'] = 'application/x-gtar'; $ct['gzip'] = 'application/x-gzip'; $ct['js'] = 'application/x-javascript'; $ct['swf'] = 'application/x-shockwave-flash'; $ct['tar'] = 'application/x-tar'; $ct['xhtml']= 'application/xhtml+xml'; $ct['au'] = 'audio/basic'; $ct['snd'] = 'audio/basic'; $ct['midi'] = 'audio/midi'; $ct['mid'] = 'audio/midi'; $ct['m3u'] = 'audio/x-mpegurl'; $ct['tiff'] = 'image/tiff'; $ct['tif'] = 'image/tiff'; $ct['rtf'] = 'text/rtf'; $ct['wml'] = 'text/vnd.wap.wml'; $ct['wmls'] = 'text/vnd.wap.wmlscript'; $ct['xsl'] = 'text/xml'; $ct['xml'] = 'text/xml'; $extension = get_file_extension($value); if (!$type = $ct[strtolower($extension)]) { $type = 'text/html'; } return $type; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output text status on a long class
Dan, Try echo some text; ob_flush() http://br2.php.net/manual/en/function.ob-flush.php; *flush()* ; also take a look at the documentation at: http://br2.php.net/manual/en/function.flush.php Angelo 2008/10/14 Chrome [EMAIL PROTECTED] Hi all I have a class that takes a while to run and am wanting to push some output to the browser while it's doing its stuff. Is that possible? Here's what I'd like: Connecting to server... Done! Retrieving categories... Done! ... All I can get it to do is output all of the text at the end of the script A voice in my head says that outputting all of the text at the end of the script is the only way to do it. Then another voice says but there must be a way! :) I did try a quick test of buffering the text then explicitly flushing the buffer but it didn't seem to work I know this seems pointless but I'm anticipating that the users will be confused (which would be a surprise /sarcasm) and attempt to abort/bugger off somewhere else Thanks in advance! Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php framework vs just php?
Farid, I like to use PRADO(www.pradosoft.com), it is very easy to use for those who are coming from Microsoft .Net platform as it uses the same architecture. I did not like symfony, too much to read before the first example. Angelo 2008/10/6 farid lópez [EMAIL PROTECTED]: what is your framework??? uacaman. i'm using symfony, but i'm reading the book. it's hard but there are so many things you can do easily with symfony! 2008/10/7 uaca man [EMAIL PROTECTED] To be or not to be dump it your choice. My framework it not just awesome it is super awesome. Angelo 2008/10/6 Dan Joseph [EMAIL PROTECTED]: On Mon, Oct 6, 2008 at 1:01 PM, Jason Pruim [EMAIL PROTECTED] wrote: But... Which framework is better? :P Oh my.. now we're gonna get all those guys popping back up telling us how dumb we are and how awesome their frameworks are again! -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Atte Farid H. López Durán La naturaleza del hombre es tal que puede conseguir la perfección únicamente cuando trabaja para el bienestar y la dignidad de sus conciudadanos. Karl Marx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php framework vs just php?
Lets raise the dead once more. I have been using the Prado framework, prado uses the .net architecture, so it is easy and fast to learn for those who came from a Microsoft platform, anyway prado is very good to build UI, but there is always a *but*!! Prado database abstraction model it is just bad something like hibernate mixed with some ORM, or maybe i just don't like the java way of doing things. Angelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php framework vs just php?
To be or not to be dump it your choice. My framework it not just awesome it is super awesome. Angelo 2008/10/6 Dan Joseph [EMAIL PROTECTED]: On Mon, Oct 6, 2008 at 1:01 PM, Jason Pruim [EMAIL PROTECTED] wrote: But... Which framework is better? :P Oh my.. now we're gonna get all those guys popping back up telling us how dumb we are and how awesome their frameworks are again! -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The 'at' sign (@) variable prefix
Documentation is at: http://br.php.net/manual/en/language.operators.errorcontrol.php Angelo 2008/10/6 Crash Dummy [EMAIL PROTECTED]: I learned through osmosis that I could use the '@' sign to prevent an error with an uncertain variable. For example, if there is no $_GET[] value in this line, $query=$_GET[q]; I will get an error, but if I prefix the value with '@', [EMAIL PROTECTED]q]; and no value is available, a null string is returned, and no error is generated. This is great, but I'd like to see it in writing. I can't find this feature in the documentation. Can someone steer me to it? -- Dave -- 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] db_* = pg_*/my_*/ifx_* ?
nathan, if you are not going to help, DON´T answer. Michelle, there are many options, a few are available at pear.php.net, take a look at the pear MDB2 package it is probably what you want. Angelo 2008/9/27 Michelle Konzack [EMAIL PROTECTED]: Hello, I am using some crapy software, which does not allow switching the Database, where I use PostgreSQL since 1999 and those crapy software force me to install mysql, sqlite and other databases which let the administration, maintenance AND COSTS explode... My own tools are generaly build for PostgreSQL but very adaptive, since I use and include (e.g.: db_pgsql.inc) with the neccesary functions. This mean, I can create a db_mysql.inc and change the include path and all is working as expected. Now my question is: Is there a tool which support such thing already or do I have to do this crap for each software I code? Thanks, Greetings and nice Day/Evening Michelle Konzack Systemadministrator 24V Electronic Engineer Tamay Dogan Network Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 +49/177/935194750, rue de Soultz MSN LinuxMichi +33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Just testing IGNORE!!!
[PHP] $this-value VS $value
Hello to all my fellow members of the PHP community. As a personal rule i always use $this in front of class members, but i always knew from others programing languages and i guess I just thought it was same in PHP that without $this keyword it should work just the same, however in the code bellow it is clear that $value is not the same as $this-value. This test was done in PHP5. Anyone care to elucidate if this is correct? Tks, Ângelo class test { private $value; public function__construct() { $this-value = test; echo Not using this: . $value . br; echo Using this: . $this-value . br; } } new test(); ? output: Not using this: = Using this: = test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: $this-value VS $value
Yes, it is not the same. Should it be the same? 2008/9/23 Nathan Rixham [EMAIL PROTECTED]: uaca man wrote: Hello to all my fellow members of the PHP community. As a personal rule i always use $this in front of class members, but i always knew from others programing languages and i guess I just thought it was same in PHP that without $this keyword it should work just the same, however in the code bellow it is clear that $value is not the same as $this-value. This test was done in PHP5. Anyone care to elucidate if this is correct? Tks, Ângelo class test { private $value; public function__construct() { $this-value = test; echo Not using this: . $value . br; echo Using this: . $this-value . br; } } new test(); ? output: Not using this: = Using this: = test yeah that's right; add in one more line and the reason why is apparent.. class test { private $value; public function__construct() { $this-value = test; $value = 'another test'; echo Not using this: . $value . br; echo Using this: . $this-value . br; } } new test(); ? -- 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] Re: $this-value VS $value
Just for closure: so many year believing that $value and $this-value was the same!!! Tks everyone for the quick answer :) Ângelo 2008/9/23 Colin Guthrie [EMAIL PROTECTED]: Nathan Rixham wrote: yeah that's right; add in one more line and the reason why is apparent.. Well I think is apparent is a bit strong considering e.g. C++ syntax where syntax is equally valid but the semantics are different. So to answer the OPs question, yes this is different in PHP compared to other languages. I think this is due to the fact that classes are kinda bolted on in PHP and there isn't really such a thing as being in a class in terms of scoping. $this is allows the class scope to be kind of emulated inside a functional scope. I could be wrong here, but that's my understanding of it. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] -- 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