View Full Version : Newbie php problem
mumtaz
02-21-2005, 03:12 PM
I have used php before with few problems, hwoever after starting a new project this morn php seems to have just stopped working.
Even when I just put some a simple echoed "hello world" in dreamweaver, nothing is displayed when I preview it. Also when I look at the source code I can see all of the php code there as if it hasnt been parsed.
This is all done locally.
Has anyone got any ideas???
Thanks in advance for any help you can give me
mancroft
02-21-2005, 03:55 PM
Never used Dreamweaver to run PHP.
Do you have to run it off your localhost server?
mumtaz
02-21-2005, 05:10 PM
Yeah I do for now.
If that is the problem how come it has only stopped working now?
CyanBlue
02-21-2005, 05:28 PM
My guess is that some program(whether it is the program that you have installed last night or some virus or whatever) might have triggered something so that your PHP won't work from then on...
Try this... Create this file and save it as phpinfo.php in the root directory of your web server...
<?php
phpinfo();
?>
and run it from the web browser directly... http://localhost/phpinfo.php
and see if you get the PHP information or not...
If you do, there is problem with your Dreamweaver setup which I cannot help you cuz I don't use DW...
If you do not see the PHP information, it's time to uninstall the PHP and reinstall it... and see if that helps... :)
mumtaz
02-21-2005, 05:47 PM
Thanks for that, I can see the problem.
I guess Ill find a dreamweaver forum now.
Cheers
M
CyanBlue
02-21-2005, 05:49 PM
Um... What is the problem and would you let us know how you solve the problem once you get the solution??? :)
mumtaz
02-21-2005, 05:57 PM
ok soon as I find out i'll post it
mumtaz
02-21-2005, 06:22 PM
even if I use notepad the php still will not work.
CyanBlue
02-21-2005, 06:30 PM
Well... If you do what I say, http://localhost/phpinfo.php that is, what do you see on the web browser screen???
mumtaz
02-21-2005, 07:05 PM
I see the usual phpinfo page with all of the setting and config stuff on it, that bit works normal.
I just dont know what it can be
CyanBlue
02-21-2005, 07:11 PM
Okay... Let me rephrase what you are experiencing... See if I am correct or not...
It sounds like PHP works just fine because you get to be able to execute the PHP commands just fine over the web browser...
But, if you type the same command in the DW, and preview from there, you do not get the normal PHP output, correct???
That's why I said you might have some problem in the test server setup in DW...
BUT, I have no i dea what you meant by NotePad deal... If you use NotePad to type up the PHP script, and save it into the local web server directory, it should work(as it did with the phpinfo.php file case) but you are saying that it does not work... Can you explain what you did with this NotePad??? I just don't understand why it works sometimes and it does not the other times...
mumtaz
02-21-2005, 07:37 PM
If i phyisically type in
http://localhost/test.php
into the address bar it works but if I open the same file directly from the web server directory or from dreamweaver, it doesn't.
With the notepad thing I just copied the same code into a blank notepad document and saved it in the web server directory just to avoid dreamweaver altogether.
I dont understand why it has just started doing this, it has worked fine up until now and i havnt chagned any settings or anything.
CyanBlue
02-21-2005, 07:39 PM
Well... I am not 100% understanding what you are experiencing, but my first choice would be reinstalling the DW... (I know it could be painful if you've got lots of stuff already there...)
mumtaz
02-21-2005, 07:42 PM
It wouldnt delete any of my files or anything would it? What would it effect?
mumtaz
02-21-2005, 07:50 PM
And now I cant access phpMyAdmin which was setup as the homepage on my local server - it just says page cannot be found.
I have just remembered that I downloaded and installed the 'Extended HTML Help' php manual from 'http://www.php.net/download-docs.php'. Would this have affected it because now I think about it, it hasnt worked since I installed this.
CyanBlue
02-21-2005, 08:25 PM
I cannot really answer that question... but I don't think that's really related... I mean the Help file that is...
My suggestion is back up everything and install from the scratch... :)
(Did I tell you that I don't use DW??? I don't... So, that could be something you could solve from the people who use DW as well...)
forzato
03-22-2005, 01:41 PM
I will pay! Name your price! (I've spent 3 full days on what should be a simple task)
I've tried several forums... nobody can help. Can you?
Simple problem really... Flash swf sends variables 'email' and 'name' to php server side script... then script sends an email to the address in variable 'email'... Works perfect *except* when 'email' variable is an address out of the domain of website... then nothing. (in practice the email address stored in the variable 'email' will always be from out-of-domain) Is code wrong? Is server set wrong? Any thoughts whatsoever?
Thank you.
PHP server side script...
<?php
$myredirect = "http://www.corporatecarpricing.com/";
$email = $_POST["email"];
$myname = "Corporate Car Pricing";
$mymail = "CustomerService@CorporateCarPricing.com";
$subject = "***** Corporate Car Pricing ******";
$body = $_POST["name"] . ", here it is your Corporate Car Pricing ";
$headers = "Content-Type: text/plain; charset=us-ascii\nFrom: $myname <$mymail>\nBcc:<$mymail>\nReply-To: <$mymail>\nReturn-Path: <$mymail>\nX-Mailer: PHP";
mail($email,$subject,$body,$headers);
?>
Advice from host...
"localhost" or "2k3mail.siteprotect.com" as the
>> mailserver instead of using "smtp.corporatecarpricing.com" or
>> "mail.corporatecarpricing.com".
Actual PHPINFO file intro...
PHP Version 4.3.4
System Windows NT WSH1011 5.2 build 3790
Build Date Nov 2 2003 23:43:42
Server API ISAPI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS\php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib
CyanBlue
03-23-2005, 02:25 AM
Sounds like that's something that you need to have a talk with your host... ;)
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.