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


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Exec() Fails...help!


I'm very new to php, running apache 1.3.20 with php 4 on a 98 box just for home test development purposes

there's probably an easier way/better alternative to do what i'm trying to do, but i'd be greatful for solutions not alternatives

i'm trying to add a user to an .htpasswd file so need to exec("c:/apache/htdocs/htpasswd.exe -b .htpasswd user password)
It would also be useful to run a mail server remotely with exec("c:mymailserver.exe") but neither will work, i tend to hear the standard windows error sound, but with no message. Apache error logs reveal nothing. What i'm trying to do may be impossible?, i'm new to the language so i don't know...or it may be a permissions problem? Or perhaps something totally seperate?

If anyone has any ideas which may help i'd be very greatful for any advice you could give.




View Complete Forum Thread with Replies

Related Forum Messages:
Flock() Fails With Exec()
My flock() code works fine when run live to the user over http However when the same code is spawned via exec() it all works except the flock():

flock($handle, LOCK_EX + LOCK_NB) always returns an error (never gets the lock)

(Yes I have checked that $handle is valid

Yes I do have backoff and retries

Permissions on the file are set to 777)

Now, I suspect the answer is not to use flock() at all, rather than try to resolve this problem. Code:

View Replies !
Warning: Ftp_exec() [function.ftp-exec]: SITE EXEC Is An Unknown Extension
This is kind of a part II to a question a posted earlier about exec and shell_exec not working.

I'm trying to use ftp_exec to execute some simple command:

$conn_id = ftp_connect("$server") or die ("Cannot initiate connection to host");
ftp_login($conn_id, "$username", "$userpass") or die("Cannot login");
$command = 'cd..'
if (ftp_exec($conn_id, $command)) {
   echo "$command executed successfully";
} else {
   echo "could not execute $command";
}
ftp_close($conn_id);


I'm getting the following error:

Warning: ftp_exec() [function.ftp-exec]: SITE EXEC is an unknown extension in /home/urieilam/public_html/work/video/test1.1.php on line 21
could not execute cd..

Have tried other commands as well, get the same. Could this be a security issue or something to do with p Safe Mode? I don't know much about commands, shell, etc..

View Replies !
Warning: Exec() [function.exec]:
I'm using PHP Version 5.0.4 in IIS5, Window 2003. When I execute my script, it prompt me the following error :

Warning: exec() [function.exec]: Unable to fork [ping 10.8.1.70] in c:Inetpubwwwrootswitch.php on line 62
Below is my script :

<?php
$line1 = exec("ping 10.8.1.70", $output);
exit;
?>

View Replies !
Gettext Fails Me
I can not get gettext to work at all under PHP. I run ubuntu 6.06.1
LTS, and the php5 package there announces that it supports gettext.
Also, php -i sais gettext GetText Support =enabled, so it should be
working. Here follows a minimal example that should be working, but
isn't (gettext and msgfmt are the normal GNU gettext tools):

[redhog@thalari:~/Projects/DemoWave]$ cat foo.php
#! /usr/bin/php
<?php
bindtextdomain($argv[1], $_ENV['TEXTDOMAINDIR']);
echo dgettext($argv[1], $argv[2]);
?>
[redhog@thalari:~/Projects/DemoWave]$ cat
locale/sv_SE/LC_MESSAGES/demowave.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2006 RedHog (Egil Möller) <redhog@redhog.org>
# RedHog (Egil Möller) <redhog@redhog.org>, 2006
#
msgid ""
msgstr ""
"Project-Id-Version: DemoWave 0.9"
"POT-Creation-Date: Sun Oct 24 19:51:42 2004"
"PO-Revision-Date: 2004-10-24 21:02+0200"
"Last-Translator: RedHog (Egil Möller) <redhog@redhog.org>"
"Language-Team: "
"MIME-Version: 1.0"
"Content-Type: text/plain; charset=UTF-8"
"Content-Transfer-Encoding: "
#
msgid "A message"
msgstr "Ett meddelande"
[redhog@thalari:~/Projects/DemoWave]$ msgfmt -o
locale/sv_SE/LC_MESSAGES/demowave.mo
locale/sv_SE/LC_MESSAGES/demowave.po
[redhog@thalari:~/Projects/DemoWave]$ ./foo.php demowave "A message"
A message[redhog@thalari:~/Projects/DemoWave]$
[redhog@thalari:~/Projects/DemoWave]$ gettext demowave "A message"
Ett meddelande[redhog@thalari:~/Projects/DemoWave]$
[redhog@thalari:~/Projects/DemoWave]$

View Replies !
PHP Upload Fails
I'm trying to create a form to upload PDF files to a server, these files can by huge (+150 MB), this shouldn't be a problem because it is a LAN network. But when I try to upload a 159 MB file to the server as a test, the browser acts as it was searching for the next page, probably is. But after 1 half hour still nothing happened?

Now I solved this problem by installing an ASP script, but I don't want to use ASP cause it doesn't work on *nix. Smaller files (< 10MB) are no problem. These are uploaden and moved to the specified directory real fast.

View Replies !
PHP Build Fails With GD
I have libpng installed, and it keeps saying it can't find png.h.
It's located in /usr/local/lib and I've tried pointing in the ./config
to the directory, and it still says it can't find it.
The install command to libpng did fail, but I copied the .h files
manually and symlinked them in the lib/ directory.
FreeBSD5.3-RELEASE i386
PHP 5.0.2
libpng 1.2.8

View Replies !
Mysql_connect Fails
i'm baffled. or maybe missing the obvious ....

when requesting a particular page, which attempts to connect to my MySQL
server, at least one user receives the 'Can't connect ...' message:

Warning: Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2) in /usr/www/users/.../xyz.inc.php on line 108

line 108 of the included file is:

$link = mysql_connect ($h, $u, $p) ;

the user has no problem with the rest of the site, but always has this
problem if the page requested attempts to connect to the server.

no other user has reported the problem and this user is reliable.

i really can't see how the user's browser or firewall could cause this,
but ....

View Replies !
The Following Code Fails
<?php
$filename = "mess.xsl";
$xmldoc = domxml_open_file("mess.xml");
$xsldoc = domxml_xslt_stylesheet_file($filename);
$result = $xsldoc->process($xmldoc);
echo $xsldoc->result_dump_mem($result);
?>

I try to output a message "welcome" in xml file onto the screen but it
does nothing. If I execute raw the xsl file, I can see the message. Do
you know why ?

View Replies !
Using Sessions, Pdf Fails In IE
I've been happily generating pdf files with fpdf for a long time. I just switched from hhttp authentication to sessions, and now pdf generation fails in IE but not in Foxfire.

Does anyone know the fix for this?

View Replies !
DJ Expression Fails
provide an explanation why the following DJ regular expression woes with an invalid regular expression runtime error 107? Thanks

Fields("legal description") Like "SEC [1-36] T[37-43]S R[9-20]W"

View Replies !
Query Fails
I have a query:

$SQL = "SELECT * FROM table WHERE id=".$_GET['id'];

But if I add order by to it:

$SQL = "SELECT * FROM table WHERE id=".$_GET['id'] Order by table_id;

It fails? I know it's something to do with the " being out of place, but surely it has to be there?

View Replies !
Php_ming.dll Now Fails..
with the latest snaps php_ming.dll as well as php_mysql.dll croaked.

View Replies !
PHP CURL Fails
Trying to get curl running in the following environment:

Vista with IIS7
PHP 5.2.0

Tried the following things:

1) Put copies of libeay32.dll and ssleay32.dll into windows/system32

2) Uncommented extension=php_curl.dll in php.ini

3) Declared PHP path and PHP/ext path in System Env variables

4) Verified IUSR has permissions to read/exec all DLLs.

5) Restared computer repeatedly.

I get standard "Fatal error: Call to undefined function curl_init()" when I try to run curl,and there is no mention on curl in phpinfo().

View Replies !
Mkdir Fails
I have a mkdir script but it doesnt work, the file locations are correct 100% and so is $login but it doesnt create the folder and chmod it.

<?php
$login = $_GET['login'];
mkdir("/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/$login");
chmod("/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/$login", 0777);&#160; 
?>

View Replies !
Post Of Fetched Value Fails
I have a MySql db, in which I search for values to populate a selection
box, as follows :

<select size="1" name="customer">
<option selected="selected">(not queried)</option>
<?php while($nt=mysql_fetch_array($result2)){
echo "<option value=$nt[customer]>$nt[customer]</option>
";}
?>
</select>

This works fine, all the customers appear with their complete names,
including spaces if there are.

When I do a submit of the php page containing this part of code and in
this page I do a

$customer=$_POST['customer'];

then the value of $customer is cutted to the first <blank(space)
encountered.

E,g, : if in the selection box the customer name John Smith appears,
then I get in the result page after the submission as customer=John

When I make a selection box, with fixed populated values (so values not
fetched from the db) then after the submission, I get the correct info
(values are not cutted to the first space).

Is there anybody out there that can give a solution for this strange
(to me) behaviour ?

View Replies !
Apache 2.2.3 PHP 4.4.5 Install Fails
I have Apache 2.2.3 installed and running on WinXP Pro SP2. I
installed PHP 4.4.5 and added the following lines in httpd.conf

PHPIniDir C:/PHP445/
LoadModule php4_module C:/PHP445/php4apache2.dll

When I restarted Apache, i got this error:

The Apache service reported the following error:

Quote:

View Replies !
Setcookie Fails To Set Cookie!
Fourth attempt.. it fails now in login, I check by printing
$_COOKIE['nordicnet_registration'] and there is no value there! Guys, what
on earth do I do about this????

Here is the code that sets the cookie:

if ($hasLoggedIn && ($row = mysql_fetch_row($query))) {
setcookie('nordicnet_registration', $row['nnet_user_registrationnumber'], 0, '/');
@mysql_free_result($query);
mysql_close($dbConn) or die('Could not close db');
$html .= $font . '<font color=000099>Takk for logging inn. For forsatte' .
"<a href=http://$serverName/index.php?content=membersites/Palogget%20S1.php " .
' target=_top>klikk her</a></font></font>'} else if (sizeof($_POST) > 0) {
$errorMsg .= $font . '<font color=cc0000><li>Det finns en problem med
db</li></font></font><p>'
$hasLoggedIn = 0;
}

Because the PHP script is in a frame, instead of using header() I print out
some text with a link <a href=mylink.php target=_top> for the user to click
and to go to another page. By then the cookie should be registered, yet
it's not there!

View Replies !
Sending Twice A Fdf Form Second One Fails
I have written a data handling tool in php and probably you all know
already what are my problems.

Lets explain:

I have found some strange behaviour in Internet Explorer filling out a
form to get some data to download.

After saving the data file an additional dialogue is displayed on IE.
This is not in the other browsers (mozilla, firefox)

The possibilities are,

open : file is opened from local
view dir : shows dir
close : it does close and an addtional usage of the data in the form is
not possible but it is shown there.

But I just only want to close the dialogue not the connection.

If I use mozilla, firefox I could several time download the data file
without an error.

I have searched the web and probably does not have the best wording for
the problem. But I don't have found a question or solution about this.

Sorry, I am not an Internet Explorer Expert. Is this normal in this browser?

View Replies !
System() Function Fails
In a e-commerce site, our bank has given us a Java class that generates a key to validate an order. To make it work, it must be called something like this:

/usr/sbin/java/bin/java -cp /home/users/mysite/tpv.zip CrURLtpv /home/users/mysite/ orderid:0016 ammount:12.00 moneda:XEU language:eng

When via telnet I execute this command, it outputs a URL, which can be used to call the bank secure pay page. Now, obviously I need to get this URL from the PHP script, so I use the system() function and to my surprise I only get this error:

Error occurred during initialization of VM Could not reserve enough space for code cache

Any idea why is this happening? I'm sure the Java class is ok since it works properly when called from prompt. Does the system() function have any memory limitations, or something that may be altering the execution of the class? Is there any way to increase the ammount of memory that is available to the system() function to execute a command?

View Replies !
Trying To Make A Thumbnail But Fails
I created a file name image.php which contains only the following code:

<?php
function createThumbnail($picture,$thumb,$new_w,$new_h) {
$extension=substr($picture,strrpos($picture,".")+1);
switch (strtolower($extension)) {
case "jpg":
case "jpeg":
$src_img=imagecreatefromjpeg($picture);
break;
case "png":
$src_img=imagecreatefrompng($picture);
break;
case "gif":
$src_img=imagecreatefromgif($picture);
break;
case "bmp":
$src_img=imagecreatefromwbmp($picture);
break;
}

$old_x=imagesx($src_img);
$old_y=imagesy($src_img);

if ($old_x > $old_y) {
$thumb_w=$new_w;
$thumb_h=$old_y*($new_h/$old_x);
}elseif ($old_x < $old_y) {
$thumb_w=$old_x*($new_w/$old_y);
$thumb_h=$new_h;
}else{
$thumb_w=$new_w;
$thumb_h=$new_h;
}

$dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);
imagecopyresampled($dst_img,$src_img,0,0,0,0,$thum b_w,$thumb_h,$old_x,$old_y);

switch (strtolower($extension)) {
case "jpg":
case "jpeg":
imagejpeg($dst_img,$thumb);
break;
case "png":
imagepng($dst_img,$thumb);
break;
case "gif":
imagegif($dst_img,$thumb);
break;
case "bmp":
imagewbmp($dst_img,$thumb);
break;
}

imagedestroy($dst_img);
imagedestroy($src_img);
}
?>

This function successfully creates a thumbnail. The problem is that I
include it in another page (with include_once, just if it matters)
which creates a thumbnail, makes some db updates and then redirects to
another page. When trying to redirect with header("Location:
index.php"); it echos that header has already been sent from image.php.
The problem appears immediatly on include (I deleted the code that
calls the function to test it).
I think it is because I am using imagejpg(); function which outputs to
the browser but I don't know how to change this.

View Replies !
Compiling PHP With Freetype Fails
I have had a working PHP installation (4.3.1) on Redhat 8.0 with several extensions (including GD) that have been working well. Now I needed to add Freetype, because we'll need to use font manipulations with GD.

So I tried to install Freetype 1.3, but the "make" gave me compilation errors. I then forgot about it and installed Freetype 2, without any problems. So I reconfigure php, no problems. My ./configure line is (new options from the last build are in bold): Code:

View Replies !
Header() Sometimes Fails, Sometimes Works, Same Url
<?
header('Pragma: no-cache');// ENSURE CLIENT-SIDE CACHE FLUSHING
$url = "$projectURLPath/index.php";
if ($_REQUEST['logoutMsg']) $url .= '?logoutMsg='.
urlencode($_REQUEST['logoutMsg']);
if ($willAuthenticate && $willUseSSL) {
$dest = 'https://' . $_SERVER['SERVER_NAME'] . $url;
} elseif ($willBasicAuthenticate && $willUseSSL) {
$dest = 'https://EnterYourUserName:EnterPassword@' .
$_SERVER['SERVER_NAME'] . $url;
} elseif ($willAuthenticate) {
$dest = 'http://' . $_SERVER['SERVER_NAME'] . $url;
} elseif ($willBasicAuthenticate) {
$dest = 'http://EnterYourUserName:EnterPassword@' .
$_SERVER['SERVER_NAME'] . $url;
}
header("Location: $dest");// DEFAULT REDIRECT TO MAIN PAGE
exit();

?>

This code scriptlet will allow for redirection to dynamically relocate
to another URL. However, for some bizarre reason, it will not redirect
anywhere; it just dies (no warnings, no errors, no notices, no
nothing!), however, if you refresh your browser, the redirected page
appears, sometimes after 1, 2, 3 tries. Then sometimes it redirects
with no problems at all.

I tried closing my browser, logging out, refreshing everything,
deleting cache/history.. to no avail.

View Replies !
PHP Mail() Function Fails
I have a PHP script which has been working flawlessly (and quickly) on a UNIX server for months. Now, I need to port it to a Windows server because I need to be able to read a dbase files, using the php.ini configuration:

Code: extension=php_dbase.dll
(This is a windows only configuration)

However, now that the script is running on a Windows Server, the mail() function creates errors. Basically, the program executes a query on three MySQL tables (Left Join) then calculates some criteria and generates different e-mails for about 350 customers. The e-mails are sent using the following PHP command: PHP Code:

View Replies !
Logging Out Of PhpMyAdmin 2.8.0.2 Fails
Environment:

phpMyAdmin 2.8.0.2
PHP 4.3.11
Unix (FreeBSD)
MySQL 4.0.16

I was able to successfully install phpMyAdmin and set config.inc.php to
do "http" based authentication. I am able to log in with no problem.
However, upon clicking the "Log out" link provided, once I get the
authentication window to re-login again, if I hit "Cancel".. I'm still
logged in!

If this a "feature" in phpMyAdmin or what did I do wrong?

View Replies !
PHP File Upload Fails
I am trying to do a FTP file upload which works fine on my localhost but on
my ISP server it fails. I can't seem to find where I can go to find the
specific cause of the failure. In both cases the file is being transmitted
to the same FTP server and using the same PHP script so it shouldn't be a
file size or login credentials problem. Could someone please help me out and
give me some ideas what is wrong.

I would really appreciate any help someone could provide as I've spent many
hours on this looking for answers. I've contacted my ISP and they've looked
at everything and also do not have an answer.

Here is the PHP form and script I'm using:

Form:

<form enctype="multipart/form-data" action="fileupload.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="300000" />
Choose a file to upload: <input name="uploadedfile" size="60" type="file" />
<input type="submit" name="continue" value="Continue" />
</form>

PHP:

// set up basic connection
$ftp_server = "ftp.showmyhorse.com";
$conn_id = ftp_connect($ftp_server);

// login with username and password
$ftp_user_name = "XXX";
$ftp_user_pass = "XXX";
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// check connection
if ((!$conn_id) || (!$login_result)) {
$_SESSION['message_new']= "Attempted to connect to
$ftp_server for user $ftp_user_name has failed! ";
break;
} else {
//echo "Connected to $ftp_server, for user $ftp_user_name";
}

// upload the file
$source_file = $_POST["uploadedfile"];

$basename = preg_replace( '/^.+[\/]/', '', $source_file );
$filename = preg_replace( "/[^w.-]+/", "_", $basename );
$ShowID = $_SESSION['ShowID'];
$destination_file = $ShowID . "_" . $filename;

echo "source_file: $source_file <br>";
echo "filename : $filename <br>";
echo "destination_file: $destination_file<br>";

$upload = ftp_put($conn_id, $destination_file, $source_file,
FTP_BINARY);

// check upload status
if (!$upload) {
$_SESSION['message_new']= "FTP upload has failed; Contact

View Replies !
Mysql_query() Fails On First Semicolon (;)
I have a SQL Script with about 5000 SQL Commands.

How can I send it to SQL Server at once?

I see mysql_query() fails on first semicolon (;) who delimits the SQL
Commands.

Another question:
I send to a MySQL server via fast Internet connection, about 500 INSERT
commands one by one via mysql_query().
It takes much time. Why?
I suspect that, mysql_query() after send the query to server, waits for
a "OK" response. If it's true, how can I send and send and send SQL
commands and MySQL server reply "OK" after send all these things?
(or no wait at all?)

View Replies !
Fopen For Write Fails
I'm having trouble opening a file for writing under Red Hat Fedora
Linux.

Here is the statement:

$fp = fopen("/var/www/html/test01.txt","w");

It generates the following error msg:

fopen(/var/www/html/test01.txt): failed to open stream: Permission
denied in /var/www/html/buildhw.php on line 11

Here are the permission settings for the directories and the file that
I'm trying to open:

drwxrwxrwx 25 root root 4096 Aug 13 12:57 var
drwxrwxrwx 11 root root 4096 Aug 13 13:12 www
drwxrwxrwx 2 root root 4096 Dec 26 13:19 html
-rwxrwxrwx 1 mike mike 22 Dec 26 13:17 test01.txt

Here is some more info:

1. Logging in as root makes no difference - still get the same error.

2. If I change the mode from "w" to "r", fopen works. This tells me
that PHP can at least find the file.

3. I can do an fopen on the same file from C, with a mode of "w", and
it works. This implies that it's not a permission issue, but rather
something in PHP or Apache.

4. The account named "apache" is a member of the groups "mike" and
"root".

View Replies !
Htaccess Fails On Proxy?
I log in a directory protected by .htaccess and after I log in,
I close all windows. So I retype the address for the directory
in the browser address bar and it allows me to reenter the directory
without ask for login and password.

When I open a window even in a computer beside mine it allows
reenter the directory.

Why does it happen?

View Replies !
Xml_parse_into_struct() Fails On All Forms Of RSS?
I did a little test to learn about how xml_parse_into_struct() works
and I find, to my surprise, that it fails to work at all with two
different versions of RSS. But it works with an Atom feed just fine.

Go look at this page:

You can see the output here:

You'll note that the where the print_r() is, the Atom feed is turned
into an array, but both versions of RSS that I'm testing here come up
completely empty.

View Replies !
PEAR Installation Fails With 5.2.0 On Win XP
PEAR installation failed with PHP 5.2.0 on Windows XP. The reported error
is mismatch between array types. Did anyone else come across that? Any
solutions?
I didn't have any problems with Linux:

$ php --version
PHP 5.2.0 (cli) (built: Nov 3 2006 21:13:54)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

$ pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.1 stable
Config 1.10.7 stable
Console_Getargs 1.3.2 stable
Console_Getopt 1.2 stable
DB 1.7.6 stable
Date 1.4.6 stable
HTML_Common 1.2.3 stable
HTML_Form 1.3.0 stable
HTML_Table 1.7.4 stable
Log 1.9.9 stable
MDB2 2.3.0 stable
MDB2_Driver_oci8 1.3.0 stable
PEAR 1.4.11 stable
PHP_Beautifier 0.1.11 beta
Var_Dump 1.0.3 stable
XML_Parser 1.2.7 stable
XML_RPC 1.5.1 stable
XML_Util 1.1.1 stable

View Replies !
Js File Fails With Session_start()
i've had this problem and i've had this problem before. IE fails to accept cookies when a js file is being loaded from a tag and i think it causes similar problems with flash files loading movies too. The cookies are sent to php properly and i can access the session id form the file but as soon as i use session start it tries to extend the session cookie life i think which causes ie to die.

I've searched the php site and the net for a way to use a session id to activate a session without it sending a cookie for this one page only but i cannot. I would prefer to use the cookie session method.

View Replies !
Form Fails To Email
Can anyone make rhyme or reason out of why I always get a failure output instead of the form emailing? Other forms using the same code work, but the invoice fails. Code:

View Replies !
Image Upload Fails
I have written a php script for image handling which uploads an image and saves it in three states: the original image, a thumbnail and a watermarked 'preview' image. The script works perfectly every time, exactly as intended.

However, if the image resolution exceeds 3.5 Megapixels in size, or about 1875 pixels in both directions (ie. Height and Width), the script either fails with 'The directory does not exist' or simply produces a blank white page.

The physical size of the file doesn't affect the script at all - I use the ini_set("upload_max_filesize", "64M"); trick.

For Example:
3.7MB image 1600 X 2150 - Succeeds
417Kb image 3008 X 2100 - Fails

The site is hosted on a shared web server, so I cannot directly edit the php.ini or the config files.

View Replies !
Strpos() Fails To Match
Minor problem with strpos() ... If $value is present at the very start of my string $row->mfg_types, the strpos() fails to match. I worked around this by adding the underscore as the first character but what am I doing incorrectly? I understand that it is returning a zero (string matched starting at character 0) which is also boolean false.

$checkboxes = explode('|', $MFG_TYPES);
echo "
<tr><td>Mfg. Types:</td><td>";
foreach ($checkboxes as $value) {
echo "<input type="checkbox" value="$value" name="mfg[]"";
if (!strpos('_'.$row->mfg_types, $value) === false) {
// the '_' was added at front because the function wouldn't
// pickup if the $value started as the first character of the string
echo " checked="on"";
}
echo ">$value<br />";
}
echo "</td></tr>";

View Replies !
Login / Session Fails On IE6
I am writing a login script to administer a backend CMS, and I've noticed that the login script fails completely on ie6.

The login page posts to itself, and checks the values against a MySQL database. If it gets a match, it sets some session variables and redirects to the index page.

The index checks to see if the logged variable is set in the session, otherwise it redirects back to the login page.

Both pages are prefaced with:

session_start();
header("Cache-Control: private");

The latter of which I heard would fix the problem with sessions in ie6.

The login/session works fine in firefox/camino/safari/ie7, but not ie6. In ie6 you hit submit and it just goes back to the same page with the values erased from the form (which shouldn't happen either, since their value is set to $_POST['...'] if the form posted right).

The full login.php is posted below: ....

View Replies !
Session_start() Intermittently Fails
I am using session_start() on index.php and for some reason sometimes it'll fail. No warnings, no errors, no notices, not even after prepending error_reporting(E_ALL) and ini_set('display_errors', TRUE) before session_start() do I see anything, it just plain dies. I used LiveHTTPHeaders to verify that I am getting a 200 OK response, thus everything seems OK except that it's dying on session_start().

Sometimes. I'll go and refresh the page and then POOF everything is just fine, the page delivers. I'll refresh a few more times to test and then after 2 - 3 times it fails again. Then works again. Then fails again. On and on intermittently.

View Replies !
Oracle 9.2 And Ocinewcollection Fails
I have a problem with ocinewcollection which fails with follwing error:

Warning: ocinewcollection(): OCITypeByName: ORA-21301: not initialized
in object mode
and returns false instead of oci-collection....

System is Suse 8.2, lastest CVS snapshot PHP, Oracle 9.2...

View Replies !
Connection Fails After I Refresh
I had someone code my site and they are no longer around. So I'm a php/mySQL newbie. That being said I'm trying to fix a problem I've been having for over a week.

It's a real estate website and on the main page it shows "feature properties" that it gets from the database. If i click around and refresh the page a few times. I loss the connection to the database and that page shows nothing.

I tried contacting me Web Host and they have increased the max_user connections to 35. That still doesn't solve the problem.

View Replies !
Force A Download In IE Fails
OK this  fails to download a file in IE and I have no idea as to why this does. What happens is that it downloads the same php file instead of the required file like it should and does do in FF. FF works fine. Code:

View Replies !
Fsockopen Fails After Upgrade To PHP 4.4.1
I recently upgraded PHP on my VPS, and noticed that a script I use for paypal IPN has stopped working. On further investigation, it seems that the fsockopen() command is no longer functioning. Code:

View Replies !
Error Checking Fails
I'm trying to check if cdate and or ndate is in mysql. If both are I need an error flag if the user is trying to change the value. If cdate is not in the db then insert it. Code:

View Replies !
Unset($_SESSION['var']) Fails
unset($_SESSION['mainDisplay']);

In my original environment (PHP 4.3.2) this line will delete the session variable 'mainDisplay'. But in the testing environment (PHP 4.3.6) the variable persists even after unset() is called.

Is there some special setting in PHP that can allow a session to persist even if you attempt to delete it? I am only able to delete the session variable upon closing the browser and rebooting computer.

View Replies !
Adding Title Tag Fails
Not sure if this will require php code or html It is to be used on a php page. I
have the following and i want to add a title to it:

$Language['index']['gettingstarted] = "
<br><b>M&D Free Treasure</b><br>

M&D is a free <a href='index.php'>Treasure Map</a> set up by a few close friends";

This currntly works but when i add a title it fails anyone know the correct way to do it please? within HTL this works but when i add it to my php page it fails:

$Language['index']['gettingstarted] = "<a href="login.php" title="Free Treasure>Free Treasure here</a>";

View Replies !
The Session Variable Fails
i am having issue with PHP session i think. I have two page login.php
and admn.php As name implied login to log in to admin page manage
database. But as soon as session initiated and passed to admin.php -
the session variable fails and it always default to else section in
php. And again - that what i think i may be completely off base. Code:

View Replies !
Php MySQL Select Fails
I have a mysql problem that has me completely stuck:

If I run the following query in phpMyAdmin, I get 4 results:
SELECT * FROM b4ads WHERE instr(lower(comments),'erika')>0

But, if I insert the query into a .php file as the following line, I only get 3 results:
mysql_query("SELECT * FROM b4ads WHERE instr(lower(comments),'erika')>0",$dbq);

Even if I use the working phpMyAdmin results via the "create PHP" link, it does not work when I insert it into the php file (I still only get the 3 results):
$sql = 'SELECT * '
$sql .= 'FROM `b4ads` '
$sql .= 'WHERE instr( lower( comments ) , 'erika' ) > 0 LIMIT 0, 30'
mysql_query($sql,$dbq);

IMPORTANT HINT:

If I Edit the excluded result in phpMyAdmin, and "Insert as a new row", the new (exact same) row DOES show in the php query.

View Replies !
Createimagefromjpeg With URL Parameters Fails
i have installed gd2 on our linux server and used createimagefromjpeg with a URL parameter. this fails and returns an empty string. i tried to access a native public url but it doesn't work as well.. when i changed the native url to the ip address of the server, it works perfectly.

View Replies !
Xmldocfile() Fails On Apache But Not On IIS
I am new to Apache and have installed the server alongside IIS. I put my website on Apache to test it out, and everything works except any php files that make use of xmldocfile(). On IIS it works fine, but not on Apache.

Is there any special configuration I should have done in the config file for Apache to get this working?

View Replies !
Fails At Standard Operand >
When using Greater Than symbols (>) in php code I have output dumps in html that cease processing at these symbols, though my text editor (Ultraedit) says there are no syntax errors, and running the script results in correctly parsed output as far as I can tell.

I'm very new at php, so I'm assuming my understanding of what I'm looking at is flawed. I'm using a local production version AMP setup on a windows XP machine, using PHP 5.2.1, Apache 2.2.4, and MySQL 5.0.33 Code:

View Replies !
IIS Install Test Fails
I am trying to complete an install of PHP5 on a WIN2000 development PC running IIS. Everything is in place, including the php.ini file copy and the registration for the .php files. When I attempt to run my test file containing phpinfo() the file never loads. I don't get any error messages. It just keeps saying "Waiting for local host." in the status bar.

View Replies !
Insert Values Fails
I am getting the following error:

Column count doesn't match value count at row 1

when I try to run this:

insert into onmylist_person values('value1', 'value2')

My table looks like this:

describe onmylist_person;
+----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+----------------+
| ID | int(11) | | PRI | NULL | auto_increment |
| username | varchar(16) | | MUL | | |
| person | varchar(255) | | MUL | | |
+----------+--------------+------+-----+---------+----------------+

I know it is because I am only inserting 2 values and the table has 3, but I thought the auto_increment creted an incrementing number automatically.

I want the ID to just be a "counter" incrementing on its own, so i only have to insert the 2 fields.

View Replies !

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