Search found 54 matches
- Thu Jan 20, 2011 8:02 am
- Forum: PHP - Code
- Topic: file viewer functionality to dynamic data
- Replies: 3
- Views: 357
Re: file viewer functionality to dynamic data
You are missing some details. 1) In your select statement, you need to get the record id. I assume it is: styid. That number should be an autoincrement index of the database. 2) You need the page you are using, so you can use, href="/mypage.php?record=$row_id" 3) I think your code should b...
- Tue Jan 18, 2011 3:25 pm
- Forum: PHP - Code
- Topic: file viewer functionality to dynamic data
- Replies: 3
- Views: 357
Re: file viewer functionality to dynamic data
What do you mean by File View functionality? Do you mean you want to see the record details? You probably want to have a link like this: /mypage.php?record=XXX, where XXX is the record ID Then you want to use $_GET['record'] and clean it, with something like preg_replace('/[^0-9]/', '', $str), to ma...
- Tue Jan 18, 2011 6:50 am
- Forum: Swift Mailer
- Topic: Embedded Images as background of div
- Replies: 1
- Views: 5952
Re: Embedded Images as background of div
Note that you do not have the same HTML/CSS power in emails that you have on a Web page. For example, Outlook a few years ago became somewhat primitive when Microsoft chose to use the Word engine to display HTML. So, you cannot rely upon background images in your email. I believe you can use them in...
- Tue Jan 18, 2011 6:16 am
- Forum: Swift Mailer
- Topic: Allowed memory size of 134217728 bytes exhausted
- Replies: 2
- Views: 16608
Re: Allowed memory size of 134217728 bytes exhausted
There are a few things you might be doing to produce this error. 1) You could be creating a large array of the recipients which is exhausting the memory. 2) You could also have a text string or array that you are appending somewhere that is building upon sending each message. If you are sending to a...
- Fri Dec 18, 2009 5:39 am
- Forum: PHP - Code
- Topic: Cannot Error Trap gzdeflate
- Replies: 9
- Views: 939
Re: Cannot Error Trap gzdeflate
Thanks Josh and thanks tasairis. Josh, you are right. It's the environment that sometimes get's you. I was actually testing this in another environment, but that also had the same error handling, and I missed it. The use of this function happens to be within a class, which is where I temporarily rem...
- Thu Dec 17, 2009 10:38 pm
- Forum: PHP - Code
- Topic: Cannot Error Trap gzdeflate
- Replies: 9
- Views: 939
Re: Cannot Error Trap gzdeflate
Thanks Josh. Here some simple code to test this. To see errors you need: ini_set('display_errors','1'); error_reporting(E_ALL); $test = 'asdfasdf'; try { $RESULT = gzinflate($test); } catch (Exception $e) { $RESULT = ''; } $RESULT = @gzinflate($test); When you run the above code you will see...
- Thu Dec 17, 2009 5:05 pm
- Forum: PHP - Code
- Topic: Cannot Error Trap gzdeflate
- Replies: 9
- Views: 939
Re: Cannot Error Trap gzdeflate
One of my possible workarounds was to use gzuncompress(), but it gives the same error. Both of these produce nonfatal runtime errors with bad data.
Maybe my problem is that my custom error handler takes priority over the try-catch block or the @?
Maybe my problem is that my custom error handler takes priority over the try-catch block or the @?
- Thu Dec 17, 2009 4:04 pm
- Forum: PHP - Code
- Topic: Cannot Error Trap gzdeflate
- Replies: 9
- Views: 939
Re: Cannot Error Trap gzinflate
Oh, my subject title is wrong. It is actually gzinflate that is the problem. Thanks for the reply. If there is no solution to this, since I am using a custom error handler, similar to what you are suggesting, I could modify the handler to ignore gzinflate, but that does not seem very appropriate. By...
- Thu Dec 17, 2009 8:15 am
- Forum: PHP - Code
- Topic: Cannot Error Trap gzdeflate
- Replies: 9
- Views: 939
Cannot Error Trap gzdeflate
I have a function that uses gzdeflate to decrypt certain data. I am trying to error trap the function using PHP 5.1.6 try { $RESULT = gzinflate($RESULT); } catch (Exception $e) { $RESULT = ''; } or $RESULT = @gzinflate($RESULT); Both methods fail and give me "gzinflate() [funct...
- Thu Jun 04, 2009 1:39 pm
- Forum: Swift Mailer
- Topic: Swift Wrapper Class
- Replies: 1
- Views: 3106
Swift Wrapper Class
Below is my new Swift wrapper class for Version 4. I would love any critique. This class can be extended for specific uses, but in its simplest form lets you send messages quite easily. We use it to send single messages, and batch messages as well. Here are some notes: There are two main functions: ...
- Thu Jun 04, 2009 1:10 pm
- Forum: Swift Mailer
- Topic: Swift Mailer for sending mass email?
- Replies: 6
- Views: 19588
Re: Swift Mailer for sending mass email?
scottayy said: if you're using $mailer->send() inside of the loop then I reckon that is bad. I do not believe this to be true. Batch send does exactly this. It takes your list and loops through it and sends each message using send(). It basically automates the looping code. There are some advantages...
- Thu Oct 30, 2008 2:40 pm
- Forum: Databases
- Topic: phpMyAdmin Tip - Display More Default Rows
- Replies: 2
- Views: 2636
phpMyAdmin Tip - Display More Default Rows
For me, one of the annoying things with phpMyAdmin was the default to only display 30 rows at a time. In development, I always needed to display more rows. And to do that, you have to change the starting record and the number of rows. Here is how to configure phpMyAdmin to display more rows: In the ...
- Mon Sep 15, 2008 6:32 pm
- Forum: Swift Mailer
- Topic: Help in swiftmailer
- Replies: 6
- Views: 30853
Re: Help in swiftmailer
Well, the workaround was to comment out the throw exception. First, note that the <br /> should not be in the error message because the exception appears to output htmlentities. The response that we were getting back is a '250 ok' message, and sometimes we would get ' 250 ok' with a space. The ones ...
- Mon Sep 15, 2008 1:44 pm
- Forum: Swift Mailer
- Topic: Help in swiftmailer
- Replies: 6
- Views: 30853
Re: Help in swiftmailer
I am trying to help someone that is getting the exact same error. The message he is getting back is: Fatal error: Uncaught exception 'Swift_ConnectionException' with message 'There was a problem reading line 1 of an SMTP response. The response so far was:<br />[]. It appears the connection has died ...
- Fri Aug 29, 2008 4:24 pm
- Forum: PHP - Theory and Design
- Topic: Include File PHP end tag?
- Replies: 10
- Views: 1918
Re: Include File PHP end tag?
Funny, I was helping someone, just yesterday, and we traced the problem down to extra spaces after the PHP end tag. The reason I started this thread is I wanted to know if I should make leaving off the PHP end tag part of my standard practices. I had heard this was recommended by Zend, but could not...