Jump to content

Recommended Posts

I was working on a PHP based website and even though I don't know PHP or Java I thought I could make some small changes but ended up bringing my company's website down. Here's what happened: First I downloaded the PHP file I needed to edit. Then I made a backup of that file. I then added one line of Jave script to the <head> section of the file. I uploaded the file. When I went to our site all the pages that used that PHP file were white. I didn't get a 404 error or anything like that, just a white page. All the info that should be on those pages was still in the back-end of our site like it always is.

Then I uploaded the backup that I made but It didn't fix the problem. Can you please take a look at my code from the <head> section that I changed and tell me if there is anything that looks wrong?

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head profile="http://www.w3.org/2005/11/profile">

<title> Santa Ynez Valley Journal | Articles </title>

<link rel="stylesheet" type="text/css" href="../styles/myadmin.css" media="screen" />

<link rel="stylesheet" type="text/css" href="../styles/forms.css" media="screen" />

<link rel="stylesheet" type="text/css" href="../styles/dialog.css" media="screen" />

<script language="JavaScript" src="../js/global.js"></script>

<script language="JavaScript" type="text/javascript" src="../js/validation.js"></script>

<script language="JavaScript" type="text/javascript">

<!--// validates a form, displaying errors next to fields (specific to each document)

function validateForm(form) {

var valid = true;

ResetValidation("span");

switch(form.name) {

case "add":

if (!IsPosInt('page')) {

ShowInvalid('page_error', '* Must be a positive whole number.');

valid = false;

}

if (!IsNotEmpty('title')) {

ShowInvalid('title_error', '* Cannot be empty.');

valid = false;

}

if (!ValidEmail('authorEmail')) {

ShowInvalid('authorEmail_error', '* Not a valid email address.');

valid = false;

}

break;

}

return valid;

}

//-->

</script>

</head>

 

Link to comment
https://forums.phpfreaks.com/topic/188530-emergency-php-help/
Share on other sites

You've not posted any PHP code, so this is hardly a PHP question. Which file have you updated/modified? It would help to know  this, as from what I can see that code is fine (and even if it weren't, it'd still show in source which it doesn't.)

 

Documentation is there for a reason if you need to modify something.  :P

Link to comment
https://forums.phpfreaks.com/topic/188530-emergency-php-help/#findComment-995317
Share on other sites

Sorry I'm basically an amateur who knows enough to royally screw myself. I posted this on here because I was editing a file called .php. The file I edited was called article.php it was part of a larger system where you log into an administrate "back door" of our website and upload articles. I have know idea how anything beyond HTML works so I don't know quite how to answer you completely. For the sake of full discolsure I downloaded the file on Filezilla, edited it in Mac text editor, saved it to my desktop as a .txt file, and then renamed it .php. I don't think that would have any effect but I'm kind of desperate for an answer.

Link to comment
https://forums.phpfreaks.com/topic/188530-emergency-php-help/#findComment-995319
Share on other sites

This is a JavaScript question, if you're desperate however, I'd suggest getting a freelancer from the freelance portion of this forum, I know it should be relatively cheap to fix your problems, as I'm a freelancer :) and we work pretty fast (freelancers).

Link to comment
https://forums.phpfreaks.com/topic/188530-emergency-php-help/#findComment-995321
Share on other sites

Sorry I'm basically an amateur who knows enough to royally screw myself. I posted this on here because I was editing a file called .php. The file I edited was called article.php it was part of a larger system where you log into an administrate "back door" of our website and upload articles. I have know idea how anything beyond HTML works so I don't know quite how to answer you completely. For the sake of full discolsure I downloaded the file on Filezilla, edited it in Mac text editor, saved it to my desktop as a .txt file, and then renamed it .php. I don't think that would have any effect but I'm kind of desperate for an answer.

 

If you turn error reporting on, I'm sure the blank pages will be filled with errors.

 

<?php
ini_set ("display_errors", "1"); 
error_reporting(E_ALL);
?>

 

Make sure the <?php tags aren't nested, if you place that on the top of the php file you edited, we should have a better idea of what is going on!

Link to comment
https://forums.phpfreaks.com/topic/188530-emergency-php-help/#findComment-995325
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.