Jump to content

PHP/Microsoft=Problem!


quiphics

Recommended Posts

Ok, I had a simple PHP script, sending form data to an email address, and it works fine on my server (linux). I put the same form, with the same code, on my client's server (microsoft - aplus.net) and it no longer works; now it posts this error message

 

PHP Warning: PHP Startup: SV�t$W�=���VhH��j: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: SVWj: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: SVWj: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0

 

Now, I don't know anything about PHP, I used a freeware script, so I have no idea how to debug, or what this means. Can anyone help out a little?

 

If you want the mailing script, or to see the form in action, let me know.

Link to comment
Share on other sites

Hmm post the script someplace if you can, I couldn't imagine a host has straight up just a janky PHP install (at least not for long if they want to keep any customers;) It could be a problem trying to initialize/access an uncommon or non-existant PHP module on the server. More common issue.

 

Also, I don't know the specifics, but from what I understand, the email functionality of PHP is typically strenuous on the server and thus several alternatives have been developed/deployed to cope, so maybe it's trying to use an alternative that isn't yet installed on the server/isn't accessible.

 

Anyway, yes, plz, post or msg the script if you can, I'd be happy to take a look.

Link to comment
Share on other sites

Right, I thought it might be a problem with the server, and they refused to speak to me; if I can tell them specifically what needs tweaking they will look into it. Horrible hosting company, overseas support (and obvious about it) *shudder* keep far away. Anyways, here is the actual script; remember, already working on my (linux) server...

 

<?php
//This is a very simple PHP script that outputs the name of each bit of information (that corresponds to the <code>name</code> attribute for that field) along with the value that was sent with it right in the browser window, and then sends it all to an email address (once you've added it to the script).

if (empty($_POST)) {
print "<p>No data was submitted.</p><p>Please use the back button on your browser and try again.</p>";
exit();
}


//Creates function that removes magic escaping, if it's been applied, from values and then removes extra newlines and returns to foil spammers. Thanks Larry Ullman!
function clear_user_input($value) {
if (get_magic_quotes_gpc()) $value=stripslashes($value);
$value= str_replace( "\n", '', trim($value));
$value= str_replace( "\r", '', $value);
return $value;
}

//Create body of message by cleaning each field and then appending each name and value to it

$body ="Here is the data that was submitted:\n";

foreach ($_POST as $key => $value) {
$key = clear_user_input($key);
$value = clear_user_input($value);
if ($key=='extras') {

if (is_array($_POST['extras']) ){
	$body .= "$key: ";
	$counter =1;
	foreach ($_POST['extras'] as $value) {
			//Add comma and space until last element
			if (sizeof($_POST['extras']) == $counter) {
				$body .= "$value\n";
				break;}
			else {
				$body .= "$value, ";
				$counter += 1;
				}
			}
	} else {
	$body .= "$key: $value\n";
	}
} else {

$body .= "$key: $value\n";
}
}

extract($_POST);
//removes newlines and returns from $email and $name so they can't smuggle extra email addresses for spammers
$email = clear_user_input($email);
$name = clear_user_input($name);

//Create header that puts email in From box along with name in parentheses and sends bcc to alternate address
$from='From: '. $email . "(" . $name . ")" . "\r\n" . 'Bcc: binyamin18@yahoo.com' . "\r\n";


//Creates intelligible subject line that also shows me where it came from
$subject = 'Online Application Info';

//Sends mail to me, with elements created above
mail ('info@bluechipbros.com', $subject, $body, $from);


?>

 

Link to comment
Share on other sites

It is definately a server error. PHP is having trouble loading.

 

It could be a problem trying to initialize/access an uncommon or non-existant PHP module on the server.

 

Considering that php does not ehave modules you can count that out. However, PHP runs as an ASAPI module with IIS, and that is what appears to be having issues loading.

Link to comment
Share on other sites

Nothin funky in there. Only thing I would suspect is the mail function, which sometimes has limited functionality (if not disabled altogether). If nothing else I would run a simple test of the mail function

mail('you@youremail.com', 'mail function test', 'Just a test of PHPs mail function');

 

And if that DOES work, then perhaps something else needs attention. Im headed offline right now but good luck.

Link to comment
Share on other sites

ok, i put the mail function in a blank page. i got the email, but still received the error message after loading the page, the same thing - here it is copied and pasted:

 

PHP Warning: PHP Startup: SV�t$W�=���VhH��j: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: SVWj: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: SVWj: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHP compiled with module API=20060613, debug=0, thread-safety=1 These options need to match in Unknown on line 0

 

any specifics as to what I can tell the server company?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.