473,226 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

Script Dying At include()

I tried to run a simple script today on my PC (WinXP, PHP5, MySQL
4.0.17) that I haven't run for about a year, and for some reason it's
dying at an include() statement that used to work fine. I double
checked to make sure the file is still there, and it is. The weird
thing is, I'm not getting any type of error to tell me what the problem
is. I tried

include(file.php) or die (mysql_error());

but still got no error. I've had some other issues since I went to
PHP5, so I tried going back to 4.3.9, but I still have the same problem.
The exact same setup on my laptop works just fine, so I know it's
something local to the PC. Can anyone give me a suggestion as to why my
script would be dying at include()?


Jul 17 '05 #1
4 1570
include(file.php) or die (mysql_error());
You can't use an include like that. include/require are no functions,
they are special language constructs. Have a look at the manual for some
more details on how these constructs work and why the above can't work
as expected.

but still got no error.

Set error_reporting to E_ALL in your php.ini.

In an example like above I get a warning and the file is not included.

Jul 17 '05 #2


at the top of your script to debug this.

Jul 17 '05 #3
Maybe use something like the script below, just to verify if its looking in
the correct place.

if file_exists("file.php"){
else {
echo "<br> File not found<br>";
"Jasper Bryant-Greene" <ja******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...


at the top of your script to debug this.

Jul 17 '05 #4
"Jasper Bryant-Greene" <ja******@gmail.com> wrote in message news:<11**********************@f14g2000cwb.googleg roups.com>...


or even better error_reporting(E_ALL | E_STRICT);

<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Bob | last post by:
Hi, I'm trying to build a PHP page which launches another php script to be run in the background. The web page should return immediately, while the background script may run for 10 minutes or...
by: Arun | last post by:
Hi, This is a scripting question, but since I am writing the script in python I am posting this question here: I have a python script that runs a simulator (that was written in c++, so I use...
by: Justice | last post by:
Just moved site to different web server. Previously no problems. Now, the script will time out after 90 minutes. I've set set_time_limit(0) but no effect. Any ideas? John
by: comp.lang.tcl | last post by:
The TCL command I am using will do a command-line action on a PHP script: set cannotRunPHP I have to do it this way as both the TCL script and the PHP script run as CLI. However, "info.php"...
by: zee | last post by:
Hi, I remember when i first went to school and got my copy of "oh Pascal" and thought it was a great language. What seemed like a lifetime later. It was then C closely followed by C++ as I...
by: rhythmace | last post by:
W3C HTML validator passes this: .... <script type="text/javascript" src="foo.js"> <script type="text/javascript"> ....script in here... </script> ....
by: Linny | last post by:
Hi, Came across this article in the ComputerWorld website which has included C in the top ten dying languages. The top 10 dead (or dying) computer skills...
by: nkjp | last post by:
Hi I've found that my script to start sybase isn't working at all. Infact, with some debugging, I've found that it's dying here at the first variable defenition (I found this by logging messages...
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a couple of years, despite having very crude...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.