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




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?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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?



PHP Install Core Dump "make Install" PEAR On Solaris 9
php has been configured with the following two configure lines and
core's during "make install" on the PEAR section. Is there something
simple i'm missing? Any help would be appreciated.

Environment:

Solaris 9
php 5.2.1
GNU Make 3.81
gcc 4.1.1

../configure --prefix=/opt/foo/php5 --enable-force-cgi-redirect --
enable-discard-path --enable-fastcgi --with-curl=/opt/foo --enable-
sockets --with-zlib=/opt/foo --with-libxml-dir=/opt/foo --with-
openssl=/opt/foo --with-nsapi=/opt/foo/sunone/current --enable-ftp --
with-ldap=/opt/foo/openldap --with-snmp=/opt/foo/net-snmp --enable-
soap --with-xsl=/opt/foo --enable-libgcc --with-mysql=/opt/foo/mysql --
with-pear .....

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.

'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:

2>&1 Arg In Exec(perl.... + "sh: /perl Not Found Error" TIA For Help
I have the following line in a php file:

$msg= exec("perl $scriptPath/insert.pl $d $u $t 2>&1", $returnVal);

Can someone explain the "2>&1" argument?


Second problem, this same line of code when run from the unix command line
returns the following error:

sh: /perl: No such file or directory

I've verified that perl is located in /usr/bin/
/usr/bin is in the environment variable "PATH"
all the directories from php program to the root and back down to usr/bin
have 755 permissions.
if I run the program (insert.pl) from the command line it works
I've tried putting the following in both the php and perl programs:
#!/usr/bin/perl
#!/usr/bin

'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?

"Page Not Found" Because Script Takes Too Long?
I am developing an online calculator for my school district. Without going into too much education-ease, the idea is simply that the user puts in some numbers, and the system crunches those numbers. The form, and the form handler are contained in one script, using a hidden variable to tell the script to process the information upon submitting to itself...

Everything was working great, until I put in the various algorithms... They are not particularly numerous, lengthy, or complicated, but clicking on 'Submit' now yields a 'Page not found' error. When I commented out half of the math, the page loaded ok...so it seems to be 'timing out'... I'm baffled.... this script is simple, and short... what could be the problem????

Here is the math part of the script..

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.

Why Doesn't "make Install" Generate Libphp5.so?
I am trying to build a LAMP stack for the first time, and have
encountered the following problem:

CentOS 4.3
mysql 4.1.20
apache 2.2.3
php 5.1.6

I've compiled and installed apache as follows:

==apache===

./configure --prefix=/usr/local/apache2 --enable-module=so

make

make install

=====

That appears to work perfectly. The problem comes when I try and
compile and install PHP.

==php==

./configure --prefix=/usr/local/php
--with-mysqli=/usr/bin/mysql_config
--with-apx2=/usr/local/apache2/bin/apxs

make

make install

====

According to my reading, a "libphp5.so" is supposed to be generated
during this process, but there is no such file on the system after the
fact, which is certainly a problem.

Can anybody perhaps provide guidance as to why this file would NOT be
generated?

Mysql_query("show Status") To Get Info
to check the total amount of data written into the database by performing a script i did this way:

<?PHP
$info=mysql_query("show status");
$write=mysql_result($info,3) ( 3 or 4 or whatever dosnt matter )
my code here
$info2=mysql_query("show status");
$write2=mysql_result($info,3) ( 3 or 4 or whatever dosnt matter )
$byte_written=$write2-$write1;>?

it works, but the script runs extremely slow do you know another way to take this info ?

Sending "header" Info After HTML?
I am looking to use "header("Location:index.php");" in my code. Basically this will be called when the user logs in to redirect them to the home page but as you expect I get the usual "headers already sent message"

Just wondering how to get around this? Do I use the ob_start() method or something?

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.

Cannot "make Install" With 4.3.3RC4 On HP-UX 11.00
I'm having problems getting PHP 4.3.3RC4 successfully to install on my
HP-UX 11.00 server.

After a (successfull?) compile, "make install" errors out with this error
message:

################################################## ################################################## #########

Installing PHP CLI binary: /opt/php/bin/
Installing PHP CLI man page: /opt/php/man/man1/
Installing PHP SAPI module: apache2handler
/opt/apache2/build/instdso.sh SH_LIBTOOL='/opt/apache2/build/libtool' libphp4.la /opt/apache2/modules
/opt/apache2/build/libtool --mode=install cp libphp4.la /opt/apache2/modules/
cp .libs/libphp4.lai /opt/apache2/modules/libphp4.la
cp .libs/libphp4.a /opt/apache2/modules/libphp4.a
ranlib /opt/apache2/modules/libphp4.a
chmod 644 /opt/apache2/modules/libphp4.a
libtool: install: warning: remember to run `libtool --finish /root/admin/src/php-4.3.3RC4/libs'
Warning! dlname not found in /opt/apache2/modules/libphp4.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /opt/apache2/modules/libphp4.so
chmod: can't access /opt/apache2/modules/libphp4.so
apxs:Error: Command failed with rc=65536
..
*** Error exit code 1

Stop.

################################################## ################################################## #########

You can see the whole "make" log at
http://email-server.info/~askwar/stuff/PHP_MakeLog.txt

/opt/apache2 contains the Apache 2.0.47 installation.

root_s08nfs:/root/admin/depots/ > ls -la /opt/apache2/modules/
total 7074
drwxr-xr-x 2 root sys 96 Aug 21 12:32 .
drwxr-xr-x 15 root sys 1024 Aug 21 07:21 ..
-rw-rw-r-- 1 vz6tml pcei 8131 Aug 21 07:21 httpd.exp
-rw-r--r-- 1 root sys 3609588 Aug 21 12:32 libphp4.a
-rw-rw-r-- 1 root sys 2097 Aug 21 12:32 libphp4.la

I'm wondering - why does "make install" (or rather apxs) look for
libphp4.so? In HP-UX, shared library files have the extension .sl, not .so
(that's Linux). And also - why was no libphp4.sl compiled at all?

To configure PHP, I used the following configure "caller":

################################################## ################################################## #########

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).

How To Install New "locales"?
For development purposes, I installed the package "EasyPHP" (Apache, PHP, MySQL, phpmyadmin) on an XP SP1 box.

Testing for installed locales ('locale -a'), I found out none were so far in this package.

I searched the Internet via Google, but found no answers as to how to install locales.

Can someone hint me in the right direction, please?

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.

Certain Custom "Page Not Found" Page Problem
I have an ISAPI instalation of PHP over IIS5 server
on Windows 2000. Everything works fine but as I am
under website development I would like to keep
PHP error messages turned on - for my development
purpose. Unfortunately, that concludes that in case
somebody types a fake address like: http://www.myurl/xyz.php
the server replies with something like that:

Warning: Unknown(C:Inetpub
ootxyz.php): failed to open stream:
No such file or directory in Unknown on line 0

Warning: (null)(): Failed opening 'C:Inetpub
ootxyz.php' for inclusion
(include_path='C:InetpubPhpIncl') in Unknown on line 0

This is not the kind a message I would like to be presented to anybody.
In this case I would rather like to see a custom "Page not found" message
instead.

Any ideas how can I configure PHP to keep displaying regular errors
and warnings in all situations but in case of "page not found" - to display
custom error message instead ?

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.

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

"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 ......

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

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 ...

"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

"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."; }
}

Headers For "image Not Found" Image
I'd like to serve an image-not-found image for images... that aren't
found..
I'm already using a custom 404 handler page.. but this question could
apply to images retrieved from a database or script or whatever...

Anyhow, is the 1st method OK, or should #2 be used?
ie, does the client/bot or whatever recognize the 404 on method 1?
Or, does it think everything is dandy because of the redirect.

header('HTTP/1.0 404 Not Found');
header('location: '.$image_url);
exit;

or

header('HTTP/1.0 404 Not Found');
header('Content-Type: image/whatever');
readfile($imagefilepath);
exit

is one way more better?

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:

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:


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