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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-16-2003, 09:07 AM
|
#1
|
Member
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141
Rep:
|
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
|
|
|
06-16-2003, 11:40 AM
|
#2
|
Member
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235
Rep:
|
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
|
|
|
06-16-2003, 02:41 PM
|
#3
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
try:
<? include "./include/menu.php"; ?>
|
|
|
06-17-2003, 12:55 PM
|
#4
|
Member
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141
Original Poster
Rep:
|
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
|
|
|
06-18-2003, 02:32 AM
|
#6
|
Member
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141
Original Poster
Rep:
|
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 08:26 AM.
|
|
|
06-18-2003, 08:53 AM
|
#7
|
Member
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141
Original Poster
Rep:
|
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 08:55 AM.
|
|
|
06-18-2003, 10:49 AM
|
#8
|
Member
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235
Rep:
|
kool
that was a tough 1
|
|
|
06-18-2003, 04:32 PM
|
#9
|
Member
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141
Original Poster
Rep:
|
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
|
|
|
06-20-2003, 12:21 AM
|
#10
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
damn!!! I was going to mention that but I didn't because php usually enables short tags by default.
Sorry...
|
|
|
06-20-2003, 03:37 AM
|
#11
|
Member
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141
Original Poster
Rep:
|
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 04:15 AM.
|
|
|
06-21-2003, 04:07 AM
|
#12
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
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
|
|
|
06-21-2003, 05:40 AM
|
#13
|
Member
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141
Original Poster
Rep:
|
fear and loathing in seattle
....................
|
|
|
All times are GMT -5. The time now is 01:07 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|