LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   include function (https://www.linuxquestions.org/questions/linux-newbie-8/include-function-65907/)

phil81 06-16-2003 08:07 AM

include function
 
hello folks

For some reason or other the php include funtion does not work on my local machine

but it works fine on my providers server ?
this is what i have for script on my page
<? include("include/menu.php"); ?>
any ideas

thanks
phil

youngstorm 06-16-2003 10:40 AM

Hi,
I must ask the obvious. Did you install PHP on your machine?
If yes, then, do you have a web server running on your box?
if yes, then, try this: make a file called info.php in the root dir
of your web server. the contents of the file should be as follows:

<?
phpinfo();
?>

go to this file with your web browser, if you see a page with lots of info
about your php installation, then you know that php is installed
correctly on your machine.

let me know the results.

michael

bulliver 06-16-2003 01:41 PM

try:
<? include "./include/menu.php"; ?>

phil81 06-17-2003 11:55 AM

php info
 
Hello
and thanks for your answers . this forum never fails !

I tried the php info test page and I get no result !
There is something wrong but what ?
how come phpMyAdmin works correctly as well as php nuke or coppermine photo gallery.?
all my php aplications seem to work apart from the ones i did myself.
I know httpd and mysqld are running but what about php.

about my instalation .
RH 8

php was selected at the install and i afterwards downlowded and installed
php-mysql-4.3.2-alt0.cvs20030405.i586.rpm

Without this phpMyAdmin does not run
something to do with the mysql.so file......

OK I just realised !!!
I checked the phpinfo in phpMyAdmin and It works

It Statesthat I have PHP4.2.2
Funny the rpm I installed says 4.3.2

Itsalso says that
Virtual Directory is disabled
as well as thread safety

could this be it


Phil

phil81 06-17-2003 12:40 PM

i have put online the include test page here
http://admin.acrea81.com/test

and the php test page here
http://admin.acrea81.com/test/test.php

so that end is ok :-)

phil81 06-18-2003 01:32 AM

Ill just recap here .

I have a page called index.php
sitting at
/var/www/html

with this code;

<html>
<head>
<title>php info test</title>
</head>
<body>
<center><b>php info test</b></center>
<br>

<? phpinfo(); ?>
</body>
</html>


ONLINE it works perfect !!
but locally
It gives no reading at all no info, no error messages!

One would say that PHP is not installed .
but I also have phpMyAdmin running php-nuke and coppermine photo galery.
in the same directory..
/var/www/html
So How come they work

I use RH 8 and apache and mysql all work fine but what can I do to fix this php Problem

does any body have an idea ?

thanks

phil81

phil81 06-18-2003 07:53 AM

solved
 
Hi
Just to say that this problem is solved
by
http://www.phpbuilder.com/board/show...10364752<br />

thanks for all your help

phil81

youngstorm 06-18-2003 09:49 AM

kool
that was a tough 1
:)

phil81 06-18-2003 03:32 PM

Just thought id let you know that the real problem was that
short tags was set to off in php.ini

I assume that no serious php script should use short tags as you cant control the php.ini files on distant servers always


cheers Phil

bulliver 06-19-2003 11:21 PM

damn!!! I was going to mention that but I didn't because php usually enables short tags by default.

Sorry...

phil81 06-20-2003 02:37 AM

LoL

Sometimes we look for complicated answers
I admit that it is not always evident to explain problems especially for a novice like myself.

Its such a big migration from the easy buggy world of windows to
Linux and GPL .

Its like having to learn dos again with win3.1
Aargh!
Anyway I have been using the Oreilly php -mysql book but it talks too much about cgi and xml I am only interested in dynamic content management using php and mysql databases. And it is probably out of date.
So I ordered
PHP and MySQL Web Development
by
Luke Welling, Laura Thomson
http://admin.acrea81.com/test/book.gif
I will read this during the summer vacations.

I enjoyed your site
I wonder if Hunter s Thomson uses windows or linux ?
cheers
Phil

bulliver 06-21-2003 03:07 AM

Quote:

I wonder if Hunter s Thomson uses windows or linux ?
He uses Linux for his computing needs, and shoots Windows boxes in his back yard whilst liquored up.

cheers

phil81 06-21-2003 04:40 AM

fear and loathing in seattle

....................


All times are GMT -5. The time now is 12:25 AM.