|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I am setting up one of my PC's as a server. So far I have loaded
Apache2.2.4 which works fine across my internal network using the IP address of the server. I have also loaded PHP5.2.3 and Mysql5. Simple PHP also works on webpages across my new intranet. However I have a number of sites I would like to run that have been developed and work fine over the internet at my ISP. The first page is getting stuck at the first line when loading- require_once ($_SERVER['DOCUMENT_ROOT'] . "/site_data.inc"); Now I remember having a problem with Register_Global's before and have modified the php.ini to set this ON. I know this is not recommended but access will not outside of the intrnet so there is no security issue. I rebooted but this does not seem to make any difference. Blank page shows with <html> <head> And that's where the first require_once sits. If I comment out this line the code moves on to the next require. Since the site works fine I really don't want to plough through the code trying variants of the Server variables. Am I doing something very silly here or have I missed a step? I also remember I had a problem with the location of the php.ini a couple of years ago when I did this but I can't remember the solution. I know this is a common problem for newbies at this stuff but I can't see an answer here or on Google so apologies if I have missed it. Thanks for you . -- John |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
John wrote:
> I am setting up one of my PC's as a server. So far I have loaded > Apache2.2.4 which works fine across my internal network using the IP > address of the server. I have also loaded PHP5.2.3 and Mysql5. Simple > PHP also works on webpages across my new intranet. > > However I have a number of sites I would like to run that have been > developed and work fine over the internet at my ISP. The first page is > getting stuck at the first line when loading- > > require_once ($_SERVER['DOCUMENT_ROOT'] . "/site_data.inc"); In that case you are missing the site_data.inc which should be in the directory you have configured in Apache to be DocumentRoot for that virtual host. > Now I remember having a problem with Register_Global's before and have > modified the php.ini to set this ON. I know this is not recommended > but access will not outside of the intrnet so there is no security > issue. This isn't the issue here, if you enable register globals, you will automatically get a variable $something if you have a $_REQUEST['something'], this setting hasn't anything to do with enabling or disabling any of the $_* global variable arrays, as those you will always be enabled. > If I comment out this line the code moves on to the next require. > Since the site works fine I really don't want to plough through the > code trying variants of the Server variables. The vode is correct, it's just you how didn't manage to copy all the needed files. -- //Aho |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Sun, 29 Jul 2007 12:46:50 +0200, John <67vnue6o@knwfv> wrote:
> I am setting up one of my PC's as a server. So far I have loaded > Apache2.2.4 which works fine across my internal network using the IP > address of the server. I have also loaded PHP5.2.3 and Mysql5. Simple > PHP also works on webpages across my new intranet. > > However I have a number of sites I would like to run that have been > developed and work fine over the internet at my ISP. The first page is > getting stuck at the first line when loading- > > require_once ($_SERVER['DOCUMENT_ROOT'] . "/site_data.inc"); Have you checked what's actually in $_SERVER['DOCUMENT_ROOT'], and it is what you expect? > Now I remember having a problem with Register_Global's before and have > modified the php.ini to set this ON. I know this is not recommended > but access will not outside of the intrnet so there is no security > issue. Well, most destructive hacking gets done inside companies, not from the outside... > I rebooted but this does not seem to make any difference. Blank page > shows with > > <html> > <head> > > And that's where the first require_once sits. Are errors logged? If so, check your log file. Else, temporarily enable display_errors & error_reporting in your php.ini to check what they have to say. > If I comment out this line the code moves on to the next require. > Since the site works fine I really don't want to plough through the > code trying variants of the Server variables. Well, why not just set up a seperate page without links, with just: <pre> <?php print_r($_SERVER); ?> </pre> So you know what it thinks is DOCUMENT_ROOT etc. It might be the simple misconfiguration of a virtual host. -- Rik Wasmus |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Sun, 29 Jul 2007 11:46:50 +0100, John <67vnue6o@knwfv> wrote:
>I am setting up one of my PC's as a server. So far I have loaded >Apache2.2.4 which works fine across my internal network using the IP >address of the server. I have also loaded PHP5.2.3 and Mysql5. Simple >PHP also works on webpages across my new intranet. Thanks for that guys. I guess I assumed that globals were not working so test them to see what was loaded, thanks Rik. Default was set to ….apache/htdocs/ so just had to adjust the path slightly and all fine now thanks J.O Onto the next now getting mysql and phpMyAdmin working. Thanks again -- |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
John wrote:
> Onto the next now getting mysql and phpMyAdmin working. emerge mysql phpmyadmin -- //Aho |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On 30 Jul 2007 16:03:41 GMT, Kim André Akerø
<kimandre@NOSPAMbetadome.com> wrote: >J.O. Aho wrote: > >> John wrote: >> >> > Onto the next now getting mysql and phpMyAdmin working. >> >> emerge mysql phpmyadmin > >That would be the case if he was running Gentoo Linux. In fact, he >hasn't told us which OS he's running on that computer, whether it's a >Linux flavor or Windows (or any other OS available out there). Hi Kim You're right, I neglected that fact. It's Windows XP. And now just discovered, the hard way, that PHP hasn't loaed the mysql extension like it used to. So having to download the zip as well as the installer. Why does all this stuff always have to end up as a challenge? As if I don't have enough of those already. -- John |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
John wrote:
> On 30 Jul 2007 16:03:41 GMT, Kim André Akerø > <kimandre@NOSPAMbetadome.com> wrote: > >> J.O. Aho wrote: >> >>> John wrote: >>> >>>> Onto the next now getting mysql and phpMyAdmin working. >>> emerge mysql phpmyadmin >> That would be the case if he was running Gentoo Linux. In fact, he >> hasn't told us which OS he's running on that computer, whether it's a >> Linux flavor or Windows (or any other OS available out there). > > > Hi Kim > > You're right, I neglected that fact. It's Windows XP. > > And now just discovered, the hard way, that PHP hasn't loaed the mysql > extension like it used to. > > So having to download the zip as well as the installer. > > Why does all this stuff always have to end up as a challenge? > > As if I don't have enough of those already. > John, Do you have the MySQL client dll in a directory in your PATH statement? Otherwise PHP can't find it. You shouldn't have to download both the zip file and the installer. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
John wrote:
> On Mon, 30 Jul 2007 17:19:16 -0400, Jerry Stuckle > <jstucklex@attglobal.net> wrote: > >> John wrote: >>> On 30 Jul 2007 16:03:41 GMT, Kim André Akerø >>> <kimandre@NOSPAMbetadome.com> wrote: >>> >>>> J.O. Aho wrote: >>>> >>>>> John wrote: >>>>> >>>>>> Onto the next now getting mysql and phpMyAdmin working. >>>>> emerge mysql phpmyadmin >>>> That would be the case if he was running Gentoo Linux. In fact, he >>>> hasn't told us which OS he's running on that computer, whether it's a >>>> Linux flavor or Windows (or any other OS available out there). >>> >>> Hi Kim >>> >>> You're right, I neglected that fact. It's Windows XP. >>> >>> And now just discovered, the hard way, that PHP hasn't loaed the mysql >>> extension like it used to. >>> >>> So having to download the zip as well as the installer. >>> >>> Why does all this stuff always have to end up as a challenge? >>> >>> As if I don't have enough of those already. >>> >> John, >> >> Do you have the MySQL client dll in a directory in your PATH statement? >> Otherwise PHP can't find it. >> >> You shouldn't have to download both the zip file and the installer. > > I was under the impression that PHP and mysql were joined at the hip > but there seems to have been some surgery. > > I haven't got to the point of testing proper as I am still setting up > but the error from phpMAdmin said "mysql extension missing" > > After Googling someone mentioned that the extensions weren't included > in the PHP installer. The zip version did indeed contain /ext/dll's > including php_mysql.dll. > > After moving it into the PHP folder phpMyAdmin moved on to the next > problem - "access denied". > > Ho hum. > They used to be, but recent versions of PHP don't include the MySQL extensions, for various reasons. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
John wrote:
> On Tue, 31 Jul 2007 05:52:37 -0400, Jerry Stuckle > <jstucklex@attglobal.net> wrote: > >> John wrote: >>> On Mon, 30 Jul 2007 17:19:16 -0400, Jerry Stuckle >>> <jstucklex@attglobal.net> wrote: >>> >>>> John wrote: >>>>> On 30 Jul 2007 16:03:41 GMT, Kim André Akerø >>>>> <kimandre@NOSPAMbetadome.com> wrote: >>>>> >>>>>> J.O. Aho wrote: >>>>>> >>>>>>> John wrote: >>>>>>> >>>>>>>> Onto the next now getting mysql and phpMyAdmin working. >>>>>>> emerge mysql phpmyadmin >>>>>> That would be the case if he was running Gentoo Linux. In fact, he >>>>>> hasn't told us which OS he's running on that computer, whether it's a >>>>>> Linux flavor or Windows (or any other OS available out there). >>>>> Hi Kim >>>>> >>>>> You're right, I neglected that fact. It's Windows XP. >>>>> >>>>> And now just discovered, the hard way, that PHP hasn't loaed the mysql >>>>> extension like it used to. >>>>> >>>>> So having to download the zip as well as the installer. >>>>> >>>>> Why does all this stuff always have to end up as a challenge? >>>>> >>>>> As if I don't have enough of those already. >>>>> >>>> John, >>>> >>>> Do you have the MySQL client dll in a directory in your PATH statement? >>>> Otherwise PHP can't find it. >>>> >>>> You shouldn't have to download both the zip file and the installer. >>> I was under the impression that PHP and mysql were joined at the hip >>> but there seems to have been some surgery. >>> >>> I haven't got to the point of testing proper as I am still setting up >>> but the error from phpMAdmin said "mysql extension missing" >>> >>> After Googling someone mentioned that the extensions weren't included >>> in the PHP installer. The zip version did indeed contain /ext/dll's >>> including php_mysql.dll. >>> >>> After moving it into the PHP folder phpMyAdmin moved on to the next >>> problem - "access denied". >>> >>> Ho hum. >>> >> They used to be, but recent versions of PHP don't include the MySQL >> extensions, for various reasons. > > Apparently the zip does but the installer doesn't. > I always get MySQL separately, anyway. That way I have the version I want - which may be more recent than the one in the zip file. It's not all that hard to install the client. Actually, it's not that hard to install the server, either :-) -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
![]() |
| Outils de la discussion | |
|
|