php-general Digest 25 Aug 2012 08:10:18 -0000 Issue 7935

2012-08-25 Thread php-general-digest-help
php-general Digest 25 Aug 2012 08:10:18 - Issue 7935 Topics (messages 318811 through 318834): Re: Dynamic Content thoughts 318811 by: Samuel Lopes Grigolato 318812 by: Matijn Woudt 318813 by: Jim Lucas 318814 by: David OBrien 318815 by: Jim Lucas

Re: [PHP] away from Fedora linux for a while and now this ...HELP

2012-08-25 Thread Ashley Sheridan
On Sat, 2012-08-25 at 01:54 +0200, Sebastian Krebs wrote: Am 25.08.2012 01:41, schrieb Fred Silsbee: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/html/log_book_MySQL.php'

[PHP] Re: Using PEAR and PHP

2012-08-25 Thread Carlos Medina
Hi Suraj, take my advice: read the Manual! Greets Carlos Am 23.08.2012 19:42, schrieb Suraj Shah: Hi. I am currently working on a website which uses PHP as an integral programming language as part of it. I am trying to replicate the website’s contents from one ftp server to another

[PHP] Re: set up mass virtual hosting with apache/nginx and PHP ... best practice2012?

2012-08-25 Thread Carlos Medina
Hi, Read the Apache and PHP Documentation, if you have any questions after this. write again... Greets Carlos Am 22.08.2012 01:26, schrieb D. Dante Lorenso: All, I need to set up a server to enable 5,000 students to have web hosting provided by the school with PHP and MySQL support.

Re: [PHP] away from Fedora linux for a while and now this ...HELP

2012-08-25 Thread Matijn Woudt
On Sat, Aug 25, 2012 at 1:54 AM, Sebastian Krebs krebs@gmail.com wrote: Am 25.08.2012 01:41, schrieb Fred Silsbee: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/html/log_book_MySQL.php'

Re: [PHP] Re: set up mass virtual hosting with apache/nginx and PHP ... best practice2012?

2012-08-25 Thread Matijn Woudt
On Sat, Aug 25, 2012 at 11:09 AM, Carlos Medina i...@simply-networks.de wrote: Hi, Read the Apache and PHP Documentation, if you have any questions after this. write again... Greets Carlos OT: Carlos, There's no need to write useless replies like this (also on other topics). I'm pretty

Re: [PHP] set up mass virtual hosting with apache/nginx and PHP ... best practice 2012?

2012-08-25 Thread Duken Marga
From my experience to maintain many virtual host, I prefer use Apache + PHP + suPHP. I think this combination will be able to cover your ideal situation above. But, I usually use authentication via shell user (/etc/user). You must find tutorial or something that integrate Apache and Active

Re: [PHP] away from Fedora linux for a while and now this ...HELP

2012-08-25 Thread Sebastian Krebs
Am 25.08.2012 13:04, schrieb Matijn Woudt: On Sat, Aug 25, 2012 at 1:54 AM, Sebastian Krebs krebs@gmail.com wrote: Am 25.08.2012 01:41, schrieb Fred Silsbee: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required

[PHP] redefine a define ...

2012-08-25 Thread Lester Caine
I know the response that I will get on the internals list, so I'll put this one past readers here ... I've just switched to overhauling a commerce package extension to the framework that I'm upgrading to be E_STRICT complaint, and I've hit a little snag. The original designers took the

Re: [PHP] redefine a define ...

2012-08-25 Thread Adam Richardson
On Sat, Aug 25, 2012 at 2:27 PM, Lester Caine les...@lsces.co.uk wrote: What I was not expecting was a string of 'Notices:' complaining about the redefines. So how does one get around this message? One can't 'if defined' as the string needs to be replaced with the more appropriate one. I would

Re: [PHP] redefine a define ...

2012-08-25 Thread Matijn Woudt
Op 25 aug. 2012 21:03 schreef Adam Richardson simples...@gmail.com het volgende: On Sat, Aug 25, 2012 at 2:27 PM, Lester Caine les...@lsces.co.uk wrote: What I was not expecting was a string of 'Notices:' complaining about the redefines. So how does one get around this message? One can't 'if

Re: [PHP] redefine a define ...

2012-08-25 Thread Matt Neimeyer
Can you just switch the order? Instead of... define(SOME_CONSTANT,Generic Value); define(SOME_CONSTANT,Override Value); Why not do... define(SOME_CONSTANT,Override Value); if(!defined(SOME_CONSTANT)) { define(SOME_CONSTANT,Generic Value); } This should avoid any redefinition and

Re: [PHP] Re: set up mass virtual hosting with apache/nginx and PHP ... best practice2012?

2012-08-25 Thread D. Dante Lorenso
On 8/25/12 6:11 AM, Matijn Woudt wrote: Hi Dante, Wouldn't it be much easier to use reseller packages like DirectAdmin or cPanel? AFAIK it should be pretty easy to do the things above. I'm considering that as well. In the end, I really only want 3 features, however: - ftp access to files

Re: [PHP] redefine a define ...

2012-08-25 Thread Ashley Sheridan
On Sat, 2012-08-25 at 15:17 -0400, Matt Neimeyer wrote: Can you just switch the order? Instead of... define(SOME_CONSTANT,Generic Value); define(SOME_CONSTANT,Override Value); Why not do... define(SOME_CONSTANT,Override Value); if(!defined(SOME_CONSTANT)) {

Re: [PHP] set up mass virtual hosting with apache/nginx and PHP ... best practice 2012?

2012-08-25 Thread D. Dante Lorenso
On 8/25/12 7:50 AM, Duken Marga wrote: From my experience to maintain many virtual host, I prefer use Apache + PHP + suPHP. I think this combination will be able to cover your ideal situation above. But, I usually use authentication via shell user (/etc/user). You must find tutorial or

Re: [PHP] redefine a define ...

2012-08-25 Thread Lester Caine
Ashley Sheridan wrote: I think the point is that the code is relying on overriding the constants, so that wouldn't help at all. I think the best thing would be to re-write the code, constants are never meant to be treated like that, it's entirely the opposite of what a constant is. I've 45

[PHP] A quick ereg translation

2012-08-25 Thread Lester Caine
ereg('body(.*)/body', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm struggling to get a pcre alternative. Anybody already cracked this one? -- Lester Caine - G8HFL - Contact -

Re: [PHP] A quick ereg translation

2012-08-25 Thread Sebastian Krebs
Am 25.08.2012 23:06, schrieb Lester Caine: ereg('body(.*)/body', $phpinfo, $regs); Pulls the body of phpinfo() to use with a tidy header of other system information, but I'm struggling to get a pcre alternative. Anybody already cracked this one? usually it's just fine to wrap the pattern

RE: [PHP] A quick ereg translation

2012-08-25 Thread SagaciousDev PHP-Dev
You're correct in the fact that you've added delimiters to the pattern, however you also need to specify the s pattern modifier so that the search spans over multiple lines. This should do the trick: preg_match('#body(.*)/body#is', $content, $matches); --- Date: Sat, 25 Aug 2012 23:10:08

[PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Ashley Sheridan
I've just inherited some (pretty awful code) that I have to make some edits to, and came across a bit of a problem. A lot of the code breaks in and out of PHP and into HTML code: ?php while(condition) { ? lisome html here/li ?php } ? But when I check this my PHP parser is saying that this is a

Re: [PHP] A quick ereg translation

2012-08-25 Thread Lester Caine
SagaciousDev PHP-Dev wrote: This should do the trick: preg_match('#body(.*)/body#is', $content, $matches); TA - That has got it ;) That is tidier than what I had ended up with ... #body([^\']*?)\/body# from a 'tutorial' -- Lester Caine - G8HFL - Contact -

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Adam Richardson
On Sat, Aug 25, 2012 at 6:54 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: I've just inherited some (pretty awful code) that I have to make some edits to, and came across a bit of a problem. A lot of the code breaks in and out of PHP and into HTML code: ?php while(condition) { ?

Re: [PHP] set up mass virtual hosting with apache/nginx and PHP ... best practice 2012?

2012-08-25 Thread Duken Marga
On Sun, Aug 26, 2012 at 2:30 AM, D. Dante Lorenso da...@lorenso.com wrote: Using VirtualDocumentRoot, I was able to create a virtual host defined like this: VirtualHost *:80 ServerName student.sampledomain.edu ServerAlias *.student.sampledomain.edu DocumentRoot

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Duken Marga
Can you tell us what is the error shown in browser or CLI? On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: I've just inherited some (pretty awful code) that I have to make some edits to, and came across a bit of a problem. A lot of the code breaks in and out

Re: [PHP] syntax error breaking in and out of php into html code

2012-08-25 Thread Ashley Sheridan
On Sun, 2012-08-26 at 09:41 +0700, Duken Marga wrote: Can you tell us what is the error shown in browser or CLI? On Sun, Aug 26, 2012 at 5:54 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: I've just inherited some (pretty awful code) that I have to make some edits to, and came