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 > wrote: > > > I've just inherited some (pretty awful code) that I have to make some > > edits to, and came across a bit of a pr

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 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 cod

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 wrote: > > Using VirtualDocumentRoot, I was able to create a virtual host defined > like this: > > ServerName student.sampledomain.edu > ServerAlias *.student.sampledomain.edu > > DocumentRoot > /mnt/web/student.sampledomain.**edu/docroot

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 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: > > while(condition) > { > ?> > some html here > } > ?

Re: [PHP] A quick ereg translation

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

[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: some html here But when I check this my PHP parser is saying that this is a syntax error (checked in the browser an

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('#(.*)#is', $content, $matches); --- > Date: Sat, 25 Aug 2012 23:10:08 +0200

Re: [PHP] A quick ereg translation

2012-08-25 Thread Sebastian Krebs
Am 25.08.2012 23:06, schrieb Lester Caine: ereg('(.*)', $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 into delimite

[PHP] A quick ereg translation

2012-08-25 Thread Lester Caine
ereg('(.*)', $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 - http://lsces.co.uk/wiki/?page=conta

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 lang

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 somethin

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_CO

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 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 r

Re: [PHP] redefine a define ...

2012-08-25 Thread Matijn Woudt
Op 25 aug. 2012 21:03 schreef "Adam Richardson" het volgende: > > On Sat, Aug 25, 2012 at 2:27 PM, Lester Caine 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 nee

Re: [PHP] redefine a define ...

2012-08-25 Thread Adam Richardson
On Sat, Aug 25, 2012 at 2:27 PM, Lester Caine 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 > say, why is th

[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 approac

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 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_b

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 Directo

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 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 sure there's n

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 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' >> (include

[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.

[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 > an

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' >