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 |
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 |
try:
<? include "./include/menu.php"; ?> |
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 |
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 :-) |
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 |
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 |
kool
that was a tough 1 :) |
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 |
damn!!! I was going to mention that but I didn't because php usually enables short tags by default.
Sorry... |
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 |
Quote:
cheers |
fear and loathing in seattle
.................... |
All times are GMT -5. The time now is 12:25 AM. |