LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2003, 08:07 AM   #1
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Rep: Reputation: 15
Angry 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
 
Old 06-16-2003, 10:40 AM   #2
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
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
 
Old 06-16-2003, 01:41 PM   #3
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
try:
<? include "./include/menu.php"; ?>
 
Old 06-17-2003, 11:55 AM   #4
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
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
 
Old 06-17-2003, 12:40 PM   #5
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
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 :-)

Last edited by phil81; 06-17-2003 at 12:42 PM.
 
Old 06-18-2003, 01:32 AM   #6
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
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

Last edited by phil81; 06-18-2003 at 07:26 AM.
 
Old 06-18-2003, 07:53 AM   #7
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
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

Last edited by phil81; 06-18-2003 at 07:55 AM.
 
Old 06-18-2003, 09:49 AM   #8
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
kool
that was a tough 1
 
Old 06-18-2003, 03:32 PM   #9
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
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
 
Old 06-19-2003, 11:21 PM   #10
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

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

Sorry...
 
Old 06-20-2003, 02:37 AM   #11
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
Thumbs up

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

Last edited by phil81; 06-20-2003 at 03:15 AM.
 
Old 06-21-2003, 03:07 AM   #12
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
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
 
Old 06-21-2003, 04:40 AM   #13
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
fear and loathing in seattle

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what are the Hexadecimal function and ASCII function in Perl Bassam Programming 1 06-03-2004 01:44 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 01:31 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 12:21 PM
GCC:- 'cout' is an undeclared function when #include <iostream> is included? caesius_01 Programming 5 04-04-2004 11:00 AM
What is correct code for "Include File Function" on .asp pages gregoryfrancis Linux - General 1 02-11-2003 10:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration