Re: php not working
Posted by: bg17aw (---.midd-bam-1.adsl.virginmedia.com)
Date: March 24, 2013 12:27AM

stevenmartin99 Wrote:
-------------------------------------------------------
> Ye it's called a user error.
>
> If php info works , php works
>
> You doing something silly .
>
> Trust me
Your tone seems kind of condescending and you sound irritated.
It is also not helpful at all, as you don't come with any solution. This problem was described by others before, the green icon, phpinfo working and yet the scripts just show on the browser and don't get executed.

I tried running a php script written by me, I tried the testmysql.php that comes with WAMP, same result.
I tried them in IE, Chrome, Firefox.

I tried them using the 64bit and the 32bit versions of WAMP.

I even did a clean Win7 reinstall just to test that.

In the 2 weeks, I tried everything. I already mentioned it is very frustrating.

So thank you for adding up to that. I guess when technical knowledge lacks, you make up for it by using sarcasm.

Time to move to other AMP solutions I guess, since I pretty much tried everything, including getting support on the forums... guess that will teach me.

Re: php not working
Posted by: bg17aw (---.midd-bam-1.adsl.virginmedia.com)
Date: March 24, 2013 12:36AM

This is the original post of someone else with the same problem:

php not working
Posted by: jariusjames (202.138.133.---)
Date: February 17, 2012 09:10AM

hi guys. i dont know if this is a problem with WAMP or the PHP installed inside wamp. i been writing codes in php when suddenly, it stops working. all my codes are being shown in the browser (IE and chrome) which was not suppose to happen especially with PHP, and a white blank page in mozilla. but dont get me wrong guys because what im testing was only a 'hello world' sort of stuff. im sure there's nothing wrong with my code or something. i've already reinstalled wamp but its still the same. im new to programming PHP but i used to run any of my practice websites with wamp so i can assure you that it run before this problem occurs. NEED HELP!

On page !, I see this post, but then your posts from 2010 get somehow mixed in the middle. Or I must be doing something silly there too, I can't even read a forum... or, just maybe, something is wrong on your part?

Re: php not working
Posted by: stevenmartin99 (Moderator)
Date: March 24, 2013 07:25AM

You're funny.

You are the one who added on to an old post titled "php not working"
But then you clarified in your post that php is working.

What answer were you looking for other than , " your making a mistake"

You didn't supply code , or a screen shot, or explain what happens.

Trust me, my knowledge isn't lacking. But should i have to write out every possible solution because you failed to explain the basics of your problem?


I'll give you 3 hints and they are all BASIC silly mistakes which in 2 weeks if you could not google and research , then I doubt I'll have much luck in getting through to you about forum etiquette.

1. You must use localhost/filename.php to open the file and not just double click on the php file to open it.

2. The file must have the extension .php and not .php.txt even though the .txt could be hidden by windows

3. You must use <?php and not <? as the opening tag as this is the default setting in php.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]



Edited 2 time(s). Last edit at 03/24/2013 07:37AM by stevenmartin99.

Re: php not working
Posted by: bg17aw (---.dab.02.net)
Date: March 27, 2013 09:39PM

Steven,

I added to an old titled "php not working" because it describes exactly my problem and it is considered good practice to avoid opening a new thread if one already exists. How is that funny to you? I think the mere fact that I posted here means I did google, how else would I have found this.

I did supply the code, I mentioned I used testmysql.php that comes with WAMP.

I am way past the level were I don't understand basic concepts like file extensions or opening tags.

Besides, the observation about opening tags was already made in this thread 4 or 5 times.

Also, I specified that it was working before. All this should eliminate the opening tags as a possible issue.

I set .php to open in Notepad++ when I double click or Enter them, and from there I run them in any of the 4 browsers I have installed.

I installed 3 different versions of WAMP, 32 and 64 bit, on a fresh Win7 installation, no luck.
I then installed on a 4th computer (!) running XP, with Teamviewer, Skype and all sorts of software on it, and it works!

So again, as you clearly don't remember my first post, it used to work, I have it on 3 computers, not working on either of them, but working on the 4th with XP.

Any ideeas? I can switch to other solutions, I know all of them, but I am intrigued by this problem, and I like to know why and what happens on my PC. I do have a Masters in computing, hope I did not do something silly, as I did the same on the XP computer.
I should also specify that I have full WP sites installed on WAMP on my computer, and they used to work, built websites from ground up, and published them etc.



Edited 1 time(s). Last edit at 03/27/2013 10:04PM by bg17aw.

Re: php not working
Posted by: stevenmartin99 (Moderator)
Date: March 27, 2013 09:52PM

If u want to get Teamviewer ill fix it , so we both know the issue

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Re: php not working
Posted by: zdy (27.17.16.---)
Date: March 28, 2013 03:47AM

[linux] php not working in userdir (public_html) 04may10
Today I wanted to give my users possibility to test their PHP scripts, but without all the fuss with creating virtual hosts for each one of them. My first and obvious choice was userdir – user creates public_html directory in his home dir, puts there files, and those files are accessible via [servername] URL. To enable this behavior you only have to enable userdir module (a2enmod userdir), and remember to set correct permissions to the userdir (chmod +x $HOME) and public_html (chmod 755 $HOME/public_html). I did this, and everything was working fine, except PHP scripts – browser wanted to download them instead of displaying proper processed content. It appeared that apache in Debian has by default PHP disabled for userdirs. To enable scripting in this dirctory, open file /etc/apache2/mods-enabled/php5.conf, find that piece of code:

1
<IfModule mod_userdir.c>
2
<Directory /home/*/public_html>
3
php_admin_value engine Off
4
</Directory>
5
</IfModule>
and disable it, either by deleting or by commenting it out (precede each line with # sign). You can also change php_admin_value engine setting to On, but if you do that, you will be unable to turn off PHP engine in .htaccess files.
www.cusabio.com/s_antibody.html antibody drug

Re: php not working
Posted by: zdy (27.17.16.---)
Date: March 28, 2013 03:48AM

[linux] php not working in userdir (public_html) 04may10
Today I wanted to give my users possibility to test their PHP scripts, but without all the fuss with creating virtual hosts for each one of them. My first and obvious choice was userdir – user creates public_html directory in his home dir, puts there files, and those files are accessible via [servername] URL. To enable this behavior you only have to enable userdir module (a2enmod userdir), and remember to set correct permissions to the userdir (chmod +x $HOME) and public_html (chmod 755 $HOME/public_html). I did this, and everything was working fine, except PHP scripts – browser wanted to download them instead of displaying proper processed content. It appeared that apache in Debian has by default PHP disabled for userdirs. To enable scripting in this dirctory, open file /etc/apache2/mods-enabled/php5.conf, find that piece of code:

1
<IfModule mod_userdir.c>
2
<Directory /home/*/public_html>
3
php_admin_value engine Off
4
</Directory>
5
</IfModule>
and disable it, either by deleting or by commenting it out (precede each line with # sign). You can also change php_admin_value engine setting to On, but if you do that, you will be unable to turn off PHP engine in .htaccess files.
www.cusabio.com/s_antibody.html antibody drug

Re: php not working
Posted by: bg17aw (---.pete-bam-1.adsl.virginmedia.com)
Date: March 28, 2013 12:33PM

Steven, Teamviewer would be great, I am not sure of your time location, I am in UK, so GMT time, I am online now or could try to be whenever you are.

Thanks.

Sorry, only registered users may post in this forum.