PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.comp.lang.php > PHP Installation Problems
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
PHP Installation Problems

Réponse
 
LinkBack Outils de la discussion
Vieux 29/07/2007, 11h46   #1
John
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PHP Installation Problems

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

  Réponse avec citation
Vieux 29/07/2007, 13h09   #2
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

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
  Réponse avec citation
Vieux 29/07/2007, 14h14   #3
Rik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

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
  Réponse avec citation
Vieux 29/07/2007, 18h00   #4
John
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

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

--

  Réponse avec citation
Vieux 29/07/2007, 18h01   #5
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

John wrote:

> Onto the next now getting mysql and phpMyAdmin working.


emerge mysql phpmyadmin


--

//Aho
  Réponse avec citation
Vieux 30/07/2007, 21h56   #6
John
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

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
  Réponse avec citation
Vieux 30/07/2007, 22h19   #7
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

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
==================
  Réponse avec citation
Vieux 31/07/2007, 10h52   #8
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

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
==================
  Réponse avec citation
Vieux 31/07/2007, 15h06   #9
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: PHP Installation Problems

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
==================
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h48.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16623 seconds with 17 queries