Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




"Cannot Find Module" Error Messages In PHP


Red Hat Enterprise Linux 4.X.

I'm writing command-line PHP scripts for the first time.

I get the messages below. What do they mean? Are these operating system
library modules, or something in PHP that I don't have? Do I need to
install more Linux packages? Or adjust PHP in some way?

[dashley@pamc standalone]$ ./sitehashkeygen.php
No log handling enabled - turning on stderr logging
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Content-type: text/html
X-Powered-By: PHP/4.3.9




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Fatal Error: Fopen(): Unable To Find The Wrapper "https" - Did You Forget To Enable It When You Configured PHP?
i have used a script that i downloaded and uses the
fopen($url,'r'); function to access a url to retrieve data and i get
this error

Fatal error: fopen(): Unable to find the wrapper "https" - did you
forget to enable it when you configured PHP?

i checked the 'allow_url_fopen = On' in php.ini and it is set to On,
and still it didn't work

'echo "": No Such File Or Directory" Error Using "exec" To Pipe In PHP Script
[TCL]
set php {<? print_r("Hello World"); ?>}
puts $php; # PRINTS OUT <? print_r("Hello World"); ?>
puts [exec "echo '$php' | php -q"]
[/TCL]

When I try this within TCL I get the following error:

'Parse Error' Problem In "isset" And "empty"
I've been having some problems with a parse error that I can't figure
out (PHP 4.3.11 on Solaris9). Sample code:

<?php
// getting strange parse errors on this
class A {
var $value;
function A() {
$this->value = 1;
}

function getValue() {
return $this->value;
}
}

$a = new A();
if (!empty($a->getValue())) {
echo "success";
}
else {
echo "failure";
}
?>

The result of this is:

Parse error: parse error, unexpected '(', expecting ')' in
/foo/public_html/parse_errors.php on line 15

I also get the same effect with "isset", however, testing with "is_null"
or "is_int" produces the correct ("success"/"failure") result. Any ideas?

Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting In Php.ini
Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini

in php.ini I have:

SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = "H:WINNTsystem32" (this is where sendmail.dll is
sitting. H is the drive with w2k)

Other PHP code on that page is working.

What else should I check?

Parsing Incoming "bad Email" Messages
I have a database mailing list and when I send to them, I get a whole bunch of errors for bad emails - either people who've changed emails or typed in a bad address (it's not spam, it's a subscription service). I was wondering how I'd go about using PHP to process all the incoming "bad email address" emails and extract the bad emails out of them, then remove them from the database.

Error In Page When Checking Http_get_vars("myvar") And "myvar" Was Not Passed In URL String
PHP, coming from ASP coding

if (HTTP_GET_VARS['b']==1){
print "Yes";
}else{
print "No";
}

when "b" is not passed via
(http://www.mydomain.com?b=1

an error occurs and the "NO" is printed but an error is printed too.

How can I check for the value of "b" so that no error occurs if b is
not passed??

example

http=www.mydomain.com

$myvar=HTTP_GET_VARS['b']

causes an error because
"b" does not exist (ie. its not passed in the URL string.

$myvar maybe evaluated as NULL or Empty but the error is printed in
the page, anyway.

Unexpected ' " ' However Cannot Find The Error
Ive got this code, that is included into the script via: require("File.inc");  and Ive ensured that the file included is enclosed in <?php ?> tags.  However im getting  the following error.

Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in FILE.inc on line 4 Code:

How Do I Insert "for" Loop In Class Module?
Below are three scripts that create one page. The "TopNewsPageTwo.php" script creates an instance, the "HtmlTemplateClass.php" is the class used with the instance script, and the "TopNewsTemplateP2.php" template below displays the output in the browser.

My problem is this: How do I insert a "for" loop so that the output will display on the page (see "TopNewsTemplateP2.php" below for the desired positioning)? The "for" loop that I'm needing to incorporate into the process is as follows: Code:

"Storage Module" Initialization Problem
I am using a web host that has squirrel mail working, as well as
Drupal. However, I am trying to install my own version of squirrel mail.

Both Drupal and Squirrelmail seem to rely on the same start_session() and
both share the same php.ini. However, I get the dreaded
"Fatal error: session_start(): Failed to initialize storage module" error.

I have seen hundreds of similar errors cited when I Google, yet I see no
serious documentation to solve it. Can anybody provide me with a solution?
Why do two separate PHP web apps work and another does not?

Make PHP Find Windows Directory. I Need The Php Equivelant To "%WINDIR%"
I've written a small gui for PHP.ini but I don't know how to make PHP find the windows directory itself. You'll probably understand better when you see the code below.

I'm currently using the line:
Code: $PHP = new Config ("c:windowsphp.ini",";"); And that works fine but only if PHP.ini is in c:windows.
I tried
Code: $PHP = new Config ("%WINDIR%php.ini",";"); but that dowsn't work, I need something that finds windows dir. itself, Any ideas?

You can see an example of it at http://213.152.46.100/gui/php-config.php (Uses a temp PHP.ini so you can't mess nothing up, feel free to play about with it)

Unable To Find The Socket Transport "ssl"
Unable to find the socket transport "ssl" i am getting this error when i try to send mail through smtp.gmail.com? can anyone help me?

I Can't Find An Explanation Of The "@" Modifier(?) In PHP. Please Explain
I have been using mysql for a little while, but I ran across some code that
had this format:

$connection=@mysql_connect(blah, blah....)

I have always used:

$connection=mysql_connect(blah, blah...)

What is the significance of the '@' ....and why?

How Do I Do Something Like $color = ("red", "yellow", "blue")[$colornum]?
How do I take an index of a literal array, instead of a variable?

That is, say I want to get the short name of a month. Can I do
something like:

$monthname = ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec")[$month];

or do I always have to do:

$blah = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec");
$monthname = $blah[$month];

It seems a shame to have to create a variable specifically for this
one-shot purpose.

STRANGE "Fatal Error: Call To Undefined Function..." ERROR
why strange you ask? here goes:

I have been working with Php and Mysql for a week without any problems.
Today I tried executing a php page that connects to mysql and creates a
new database, I got this error:

"Fatal error: Call to undefined function mysql_connect() in C:Program
FilesApache GroupApache2 est\_debug_tmp.php on line 3".

I did some reading on the net and checked all my configuration, and it
looks o.k. (and it already worked well a whole week before today).

The strange thing is that I have another form that inserts data into
the same database in Mysql, and it works like a charm (needless to say
but both pages log in with the same username to the same database).

Preventing Visitors Ability To "re-visit" A Page Via The "back Button"..
I have a rather complex registration/member sign up form.. which gets a little confused, when a visitor "backs" completely out of the form, then for whatever reason returns to the form. The form contains 'cancel' buttons, which naturally cancel the reg process and redirects them to the document just before they started.

JS provides us with the "location.replace()" method, but I can't seem to find a way to coordinate the use of location.replace() with the posting of the form values. In short, I want to "replace" the first step of the form with the "second step".

I think what's making this tricky, is that each step of the form are located within the "same" page (register.php). The document works like so: The first step is the "Member Agreement" when they click "agree" (submit) the system creates a new row in the temporary register table of the db.

It then issues a registration cookie, which carries the row id, and session value. in addition (for those cookie impared users) we carry the row id and session value in hidden elements. So far, as long as the user continues through the process all is fine, but if they (for whatever reason) back all the way out, and click 'agree' again, the process fails.

I guess I have to find a way to force a reload of the 1st step "if they've gone back" OR "replace()" the first step with the second, so as to prevent the user from going "back" to the 1st step of the register page.

Errors Won't Show Up Even With Error_reporting(E_ALL) And Ini_set("display_errors","1")
Here's my code:

<?php

error_reporting(E_ALL);
ini_set("display_startup_errors","1");
ini_set("display_errors","1");

wefw
wefwef=wefwe
2349023909()
;wrgwrg ====232

phpinfo(); ?>

I get a blank page.

If I take out the crap, it prints phpinfo() just fine.

PHP 4.3.something...

Pagnation - Limit Number Of Pages Between "Previous" & "Next" Hyperlinks
Was hoping for some advice with a part of page navigation....

It works at the moment so there is a "Previous" & "Next" Hyperlink underneath the records. In between the Previous & Next links are the number of pages that there is of these records. e.g:

Previous 1234 Next

This is fine if there are only a few pages of records, but when there are hundreds of pages the numbers are listed and they take up half the web page with them.

How can i make it so only limited 10 numbers of pages say appear between the "Previous" & "Next" Hyperlink and as you progress through the pages they are as do the next 10 numbers of pages? Code:

[regex] Stripping Out "name" And "value" Values Out Of Tags, Aaargh
Searched through the site, but couldn't find the right regex syntax I was looking for.

the thing i want is, to extract with preg_match_all the given values in a tag...

ex.

$str = '<input type="text" name="name" value="value">'
$pattern = some magic stuff I need to know
preg_match_all($pattern, $str, $result);

And in result I want to have the values text, name and value AND it's important that the order doesn't matter
so structure of tags can be <input type =name= value=> or <input name= class= value= type=> etc, etc...

Group Mailing, Want To Suppress All The "to" Addresses In The "to:" Field
I want to do a mass emailing for a club.
I don't want all the clubs members to see all the addresses of the
other club members for privacy reasons.

How do I set up the php mail function to not display the recipients
email addresses, just to display something like, "U7 Soccer Club
Team"?

Error Using Header("", FALSE) To Show Multiple Images From MySQL Db
Many people seems to have problems when displaying multiple images from their database (mySQL db). Often you can read error statements like "Header already sent out ...". To solve this, people often propose to use include files.

To keep the scipt it would be nice not having this problem, being able to sent out multiple headers to a browser without getting these error messages. In the PHP4 manual, we can read an option that can be added to the header statement, Header("xxx",FALSE). It would enable multiple headers to be sent out.

For instance the following statement:

while ($product = db_fetch_object($result)) {
header("Content-type: pv($product->filetype)",false);
echo pv($product->image)"
}

However, it doesn't work. Anybody has any idea why? Does anybody use this option FALSE with success?

Another "Fatal Error: Call To Undefined Function: Mysql_connect()"Question
I am getting the following error when I try to view a test page in my
browser. This test page just reads a table in mysql and outputs the
results.

Fatal error: Call to undefined function: mysql_connect() in
/var/web/public/test.php on line 2

I'm using:
Apache 2
MySQL 4.1.12
PHP 4.4.0

I have tried upgrading PHP to PHP5. I went back down to PHP4. I
verified that mysql.so was being loaded. I tried using the OLD_PASSWORD
feature in mysql. Verified that the PHP module is loaded in apache.

What is weird however (at least I think) is when I run the following via
telnet:

php ./test.php

It pulls up the page, connects successfully to the database and displays
the records. No error message.

Pear Install Error "no Signature Found For Package.info"
I get the same error trying to install any pear package if it's not
alreay installed.

# pear install Net_SMTP
no signature found for package.info(string,string,bool)

# pear -V
PEAR Version: 1.3.3
PHP Version: 5.0.3
Zend Engine Version: 2.0.3
Running on: SunOS fido 5.6 Generic_105181-26 sun4u

I understand that this is probably a server side error on pear.php.net
.... who clears it?

Formmail.php Brings Up Error Message About Configuring "sendmail_from" Line
This may not be the best place to put this but i have set up apache as
a testing server on my local machine. Whenever i try to use a
formmail.php script i downloaded is always come sup saying that i need
to configure sendmail_from.

I have changed this (in php.ini) to be to my email address and the smtp
server is set to be my university's smtp server (which i hope should
work). But it still comes up with the error.

The actual error is:

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or
custom "From:" header missing

Can't Install PHP - Keep Getting "Invalid Directory" Error Regarding The Path To Apache Httpd.h
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying
to install PHP 5.1.4. I can not get the ./configure command to work. I
keep getting this error:

configure: error: Invalid Apache directory - unable to find httpd.h
under /usr/local/apache/include

So then I run this command:

find / -name httpd.h

which should find every file on my machine with the name "httpd.h".
These are the results I get:

/usr/local/apache/include/httpd.h
/home/shelley/apache_1.3.36/src/include/httpd.h

So I've rerun the ./configure command, using this first:

--with-apache=/usr/local/apche/include

and since that didn't work:

--with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h

but I get the "Invalid directory" error with both addresses.

"Disk Quota Exceeded" Error When Trying To Use New Version Of PhpMyAdmin
I've a site where I've just installed a new version of phpMyAdmin
(version 2.8.1). I can't get it to work. I'm getting this error:

Warning: session_write_close(): write failed: Disk quota exceeded
Warning: session_write_close(): Failed to write session data (files).
Please verify that the current setting of session.save_path is correct
(/tmp)

I've also, on this same site, another copy of phpMyAdmin (version
2.2.7-pl1) installed. I installed it many years ago. It is working
without an error. So the problem is not with the site or the server or
the database, but with the newer version of phpMyAdmin. Perhaps I
configured it wrong? Does anyone here have experience debugging
phpMyAdmin installations,

Uploading Large Files - Error "stat Failed"
I have a page where i can upload binary file (using the HTML input
type=file approach). This works fine for relatively small files
(<6MB)) but when files get bigger (13MB) there is a problem.
The code of the php file is based upon the article in
http://www.onlamp.com/pub/a/php/200...php_mysql.html: uploading
large binary files using more than one table and more trhan 1 row per
file.

When I want to upload something of -say- 13MB the problems are:

1 takes ages to upload (slow connection? it's on my LAN),

2 after a while I get a error msg:
"Warning: stat failed for none (errno=2 - No such file or directory)
in /Users/marc/Sites/wwwweb/FTP/FileTransfer.php on line 91"

Lines 90 and 91 are below:
90clearstatcache();
91$time = filemtime($SrcPathFile);

(does this mean the tmp file is not there???)

I changed 4 variables in php.ini to accomodate the bigger file size:

max_execution_time=120
post_max_size=65M
upload_max_filesize=65M
memory_limit =65M

I changed the rights on the tmp file upload directory so that everyone
can write to it just to be sure...

Still I get the error.

Why am I not able to upload those big files?

Why does it take so long for the file to upload to the server? It
happens all on my LAN (no proxies enabled) so it should be faster....
even dloading a file from the internet is faster than this.

Totally Lost! "Fatal Error: Call To Undefined Function: Mysql_connect()"
I'm a noob with a server so keep that in mind :) Been trying to connect
with php to mysql and all I get is:

"Fatal error: Call to undefined function: mysql_connect()"

I've read and read and can't figure out what is wrong. My current set
up is:

# rpm -qa | grep php

php-ldap-4.3.2-23.ent
php-mysql-4.3.2-3mdk
php-imap-4.3.2-23.ent
php-4.3.2-23.ent

# rpm -qa | grep php

php-ldap-4.3.2-23.ent
php-mysql-4.3.2-3mdk
php-imap-4.3.2-23.ent
php-4.3.2-23.ent

On RedHat 3.2ES

Can someone please help? I've been trying for 2 weeks now and I still
don't know what to do.

Include("....file.php") Doesn't Work (error 2039)
I have a problem with include. I am develloping a site www.mobiclips.net.
I have placed the php files dealing with the gui, getting the pictures and the
download all in seperate folders in the root. Now I want to include the header an db.php,which are in the root. I have to use something like this <?php
include("....dbconnect.php")since I grouped all php related to each other in one map which itsel is in the map called PHP.

It works fine on XP amd windows 2003, but it does not work on the webserver on
linux. Notthing shows up. A few test showed that .. go up a level doesn't work.
When I put Echo ERROR_ALL I get error 2039 ...

Mail() Sends As "nobody", Causing Server Error
I'm troubleshooting a program that I didn't build, so forgive me on this one. It's called email.php, and it looks like a program that the original developer must have downloaded from somewhere.

The part of the program that sends an email states this:

$headers = 'MIME-Version: 1.0' . "";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "";
// Additional headers
if (isset($_REQUEST["bcc"])){ $headers .= 'Bcc: '.$bcc. ""; }
$headers .= 'From: '.$from.'' . "";
if (isset($_REQUEST["cc"])){ $headers .= 'cc: '.$cc. ""; }
if (isset($_REQUEST["bcc"])){ $headers .= 'Bcc: '.$bcc. ""; }

// Mail it ......

Php Reference In <SCRIPT> Tag Gives "Error On Page" In IE6.0
I have some problems with a PHP reference in a <SCRIPTtag, but only
with the Internet Explorer, which gives a "Error on page" message in
the Status Bar.
The code is as follows :
<script>
<!--
var stat =<?php echo stripslashes($status); ?>;
window.status = stat;
//-->
</script>

The error given is :

Line:24
Char:13
Error: Syntax error
Code: 0

Char 13 is the "<" or looking to the source of the page with the IE
browser, it's ";"

I get the error message as said before only in the Internet Explorer
browser and it does not affect the display nor the functionality of
the page, but it's not good looking ...

"SSL: Fatal Protocol Error" With Fsockopen()
I'm experience the infamous "SSL: Fatal Protocol Error" bug with Apache 2.x

According the fopen() documentation:

"If you are using fsockopen() to create an ssl:// socket, you are
responsible for detecting and suppressing the warning yourself."

PHP Pages Getting 404 Error, "Page Cannot Be Displayed"...
I tried putting this into the PHP Installation forum but don't get any answers or suggestions there so I'm going to try it here and hope it doesn't get moved.

I'm on a Windows 2003/PHP 5.22 setup.  I'm TRYING to upgrade from PHP 5.02 which did work on my server and quite well.  I followed the upgrading and installation instructions layed out on the PHP.net set -- I still can't get it to work.

The install dumped all the PHP related files under "c:program filesphp".  I've ensured that path is in my windows PATH statement for my env vars.  I've also verified that "c:program filesphpphp-cgi.exe" is in my Web Service Extensions listing in IIS and the status is set to "Allowed". 

From the command-line, I can execute my "test.php" file that has the phpinfo(); info function in it and it works fine.  It's only when I try to use my web browser to access the php file that I get the 404 error, "page cannot be displayed".  I know that IIS in general is working ok because I can point it to the default http://servername/iisstart.htm and it resolves to that page just fine.  It's only when I change it to http://servername/test.php (which has my phpinfo()) function in it when I get the 404 error.

My web server just doesn't seem to be interpretting PHP files anymore and I can't figure out why.

Deleting From Database, "SQL Sytax Error"
I searched the forums and I couldn't come up with anything, so I'm sorry if this has been solved before. But my problem is that when I want to delete a comment from the database, it just says, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1". At line one I have a Session_start...and I doubt that would interfere with deleting.

Here's my query:
$com = $_GET['del'];
if ($com != NULL && is_numeric($com)) {
  if ($ip == $okip) {
mysql_query("DELETE FROM `comments` WHERE `id` = '".$com."' LIMIT 1 ");
echo "Comment has been deleted.<META HTTP-EQUIV="REFRESH" CONTENT="2; URL=show.php"> ";
}
else {
echo "You do not have permission to delete comments."; }
}

Echo "<!--#include File="top.html" -->";
I have a search script which returns a page of results, however I'd like the returned page to be in the same format as the rest of my site.
To do this I've tried adding the HTML for my site to my PHP page with echo" " commands. This works for the plain HTML, but my regular pages also use SSI to do other stuff (some of them even execute other PHP scripts to generate tables of data etc). I've tried

echo "<!--#include file="top.html" -->";
but it doesn't work as I get a parse error. My question is, how do I go about doing this properly? Is this possible at all? And if not have you guys got any suggestions to get around this?

Any File Size Limit In <PARAM Name="***" Value="***"> ?
I embed an applet in my php script which has a parameter providing an
input file for the jar. Does this file has size limit?

The code is as follows:
<APPLET ARCHIVE="myapplet.jar" WIDTH=372 HEIGHT=360 VSPACE=0 HSPACE=0
ALIGN=middle>

<?php echo "<PARAM NAME="data" VALUE="myfile.">";?>

when "myfile" is beyond 15M, my applet cannot load sucessfully, but
while this file is limited like 5M or 7M, it works well.

Does anybody know is the reason caused by php script limit, applet
mechanism, or by different browser?

How To Do PHP "require()" Or TCL "source" In Bash Script
I can't figure out how to explain this any better than
this.

In PHP we have a command "require()" that obtains a file and logically
places it into another file.

I cannot figure out how to do this in bash script as the requirement
is necessary for a migration script to obtain the code from a .cfg
file and then be able for the "parent" script to run the code it
"imported" from the .cfg file, much like PHP's require() or TCL's
"source".

This is what I have so far and it fails:

if [ -f ivc.cfg ]; then
cat ivc.cfg
fi

Anyone really know bash script well please help, it's a barrier for me
not to be able to get just this one piece working.

"unexpected Error In Date()"
Could anybody explain to me the cause of an unexpected error in date() after calling the function several times.

Broken "php" Image No Error In PHP?
I wrote a PHP file which is supposed to return an image. The image is read like this:
PHP Code:

Parse Error On "</HTML>"?
What I'm trying to do is display a list of products in a certain category of products . This I can do fine, it displays a thumbnail image, a brand name, a model number, a short description and a price. These are just a few columns from the products table. Heres the code I have that grabs that info from the products table, this WORKS OK: PHP Code:

No PHP Error. Just "Page Cannot Be Displayed"
I was wondering if someone could explain why I'm receiving this error. It's
like a 404 error but I think it might be something else.

Basically, I have a page where a user inputs his email address. The system
is supposed to look up the email address and send the associated password to
that email address. It worked up until a few months ago. Note that the
validation works. So, if the user tries to submit a blank text box, it
returns an error. If the email address is not found, it returns an error
"Email not found." But if the email is valid, it just dies. This code
worked a few months ago when I initially wrote it....

Troubleshooting "Too Many Connections" Error(s)
I've determined that this is occurring 30-40 times per hour (I have a mail notice delivered for each 'TMC' error). On every page where I open a connection($db) and retrieve data from a database($result), I include this in the last bit of PHP code:

mysql_free_result($result);
mysql_close($db);

I Get A "server Misconfiguration Error",
I get a "server misconfiguration error", but only sometimes. It occurs on
the first screen that accesses the database on a submit. This error is
intermittent -- sometimes it happens and sometimes not from the same screen
with the same data.

Here is the error:

Internal Server Error. Using "::" ?
ivre recently installed  V-Webmail on my server, and the installation worked fine on my localhost.  However when i uploaded the files to my online server, i found that i got "Intertnal Server Error".  Now when i looked at the index.php, it had code, using :: between words  an example is below. Could this be cauaseing the error, or is it somethign else? Code:

PEAR "not Found. Error"
I am not able to get PEAR working And got the 'not found etc… error' When including a pear function For ex:

require_once('Mail.php');
require_once('Mail/Mime.php');

(further I know that mail mime require SOAP)

How do I fugure if SOAP is installed?

Since PEAR is by default present in PHP. I was under the impression that it should open any pear () as any php integrated function?

My php.ini include_path as of now is:

include_path = ".:/usr/local/lib/php"

Do I have to change it?



Coding "NEXT" And "PREVOIUS" Buttons
Hi

I am stuck here. I am doing a form which dispalys details of client companies. My query includes this statement:

.... WHERE CompanyName LIKE %$name% ....

What I need is following: if a query returns more then one result I what to "flip" through result with NEXT and PREVIOUS buttons.

Mysql/php - "LIMIT" And "ORDER"
In the following fragment of code, I am querying a database that in order to display a list of films. The list is very long and I would like to offer the possbility to restrain the range of results showned by page keeping in mind that the user should be able to browse forward or backward data if applicable. I know that I have to add the LIMIT method in the MySQL query but I have a hard time figuring how not to get lost in setting it dynamically in the PHP script.

Then I have a second question. Is there a more elegant / straightforward way to deal with the display order of the data (cf. $ot, $od and $oy)? Code:

Sticking "if" Or Changes Within A MySQL "where" Array?
I'm not exactly sure how to even ask the question, and I know my terminology
is not good as I'm a SQL beginner, but, here goes.

I need to find a way to make an if statement within an array...or, the
"while" portion of a recordset.

The best way I can ask is show what I mean.
http://oscarguy.mechphisto.net/awardbrowse.php
If you go there and select an award (like Best Picture), leave the year
field alone, and select YES and submit, you'll see a lot of results. And I
have HR's dividing each entry.

What I need to do is group all the entries of the same year, or at least
only put HR's between the blocks of years.
So, I'd have all the entries for 2002, an HR, then all for 2001, an HR, etc.

Here at the bottom I'll include my PHP code I'm using so far.
But I have no idea where to even start looking for an answer...if it's even
possible.
If someone can just give me the name of the function or process or
technique, then I can go Web/book searching myself...I just need a direction
of where to go.

PHP:------------------------------------------------------------------------
------
$query_RS_award = "SELECT * FROM $award WHERE id != &#391;' ORDER BY year DESC,
w DESC";
//$query_RS_award = "SELECT * FROM $award WHERE year =
"$year"";
$RS_award = @mysql_query($query_RS_award, $connection) or
die("Couldn't query: " . mysql_error());
$totalRows_RS1 = mysql_num_rows($RS_award);
while ($row_RS_award = mysql_fetch_assoc($RS_award)) {
$award_id = $row_RS_award['id'];
$award_tblid = $row_RS_award['tblid'];
$award_award = $row_RS_award['award'];
$award_year = $row_RS_award['year'];
$award_category = $row_RS_award['category'];
$award_won = $row_RS_award['w'];
$award_film = $row_RS_award['film'];
$award_nominee = $row_RS_award['nominee'];
$award_note = $row_RS_award['note'];
if (!($award_category)) {
$award_category = "n/a";
} else {
$award_category = $award_category;
}
if ($award_won == "1") {
$award_won = " - Award Winner";
} else {
$award_won = "";
}
$display_block_Award .= "YEAR:&nbsp;<span
class='normalText12White'>$award_year</span><br>FILM:&nbsp;<span
class='normalText12White'>$award_film</span><br>CATEGORY:&nbsp;<span
class='normalText12White'>$award_category</span><br>NOMINEE:&nbsp;<span
class='normalText12White'>$award_nominee</span><span
class='normalText12BoldWhite'>$award_won</span><br><blockquote><span
class='normalText12White'>$award_note</span></blockquote><hr>";
}

Cookies And "include" Or "require"
i'm having a problem with my setcookie() instructions. Although there are absolutely
no html tags in front of them,for some reason PHP3 sends me back the message "oops...php3_SetCookie called after header has been sent"...

I do however use two "require" calls, one to a file with a .php extension, and one to a file with an .inc extension. At the beginning of each files there's a Could the cookie failure and the include functions be related ?

In my text, I have even wiped out any HTML tags such as "bold, paragraph, line break" tags, even in "echo" commands, but to no avail what am i doing wrong ?

FTP_login + $pass="" And $user=""
I use the following scrit in an Intranet with the user name = "" and
the password = "" :

<?php
$ftp_server = "192.168.25.25";
$ftp_user = "";
$ftp_pass = "";

$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to
$ftp_server");

if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "Connected at $ftp_user@$ftp_server
";
} else {
echo "Can't connect with $ftp_user
";
}
?>

I have the following message :

Connected to 192.168.25.25
Warning: ftp_login(): 'USER': Invalid number of parameters in
E:www est_ftp.php on line 26

I tried to : ftp_login($conn_id, "", "") but i have the same result...


Copyright © 2005-08 www.BigResource.com, All rights reserved