Page 1 of 1

php.ini no value

PostPosted: 11. September 2010 18:07
by mrk13
Hi everyone.
I'm new here, and a complete beginner in php home testing. I hope someone can help me. I've spent literally hours trying to find guidance to my problem in the net, without success. Now I have a huge headache. I'm designing pages for a company, using php. And I should finally succeed in setting up a home server. I must be extraordinarily dumb. Please, pretty please, someone, PLEASE help me.

So. I have installed xampplite.
Xampp control panel shows both Apache and Mysql running, happy green boxes.
When I open the htpp://localhost page, I do see the default page 'congratulations! you have succesfully..." etc.
I have set up site definitions in dreamweaver, correctly as I believe: my site is located in xampplite htdocs -directory, and I have set the testing server to local, using php/mysql, also correctly.

The problem: when I open my php site (lets call it mySite here) index in http://localhost/mySite, the correct page opens in firefox - but I still see the php scripts on top of my page: none of my php commands work.

When I type http://localhost/xampp/ to the address bar, and then click phpinfo(), I see that configuration file php.ini path reads 'no value'. Ahha, right. If I understand correctly, that may be why my php scripts are not working. When I navigate to my xampplite setup directory, I do find the php.ini file in what I assume to be the correct folder: D:// xampplite/php.ini ( installed xampplite in D:)

Shouls I change the php.ini location, or perhaps the default path, where xampp (or xampplite) is looking for it? How to do this?

I hope this is a really simple question for you guys... I don't mind looking like a fool. After so long time trying to get it working, I already know I am one. So just pleeeeeease help me.

Thanks a million. No, let's make it two.


edit: forgot to add my system info: I'm using windows 7, 64bit. xampplite is in D: directory.

Re: php.ini no value

PostPosted: 11. September 2010 18:56
by mrk13
uuufff... thanks for trying, but I don't understand a word of german. can you try in english? or, alternatively, in finnish, as i am actually a finn.
tried translating that with imtranslator: all i got was a garbled mess, more complicated than php+ js scripts combined ;)

Re: php.ini no value

PostPosted: 11. September 2010 19:16
by mrk13
If i understand correctly, you're blaming dreamweaver for the problem. Hmm. Even if I open the page straight from htdocs folder, the result is the same. Seems to have nothing to do with dw preview command. And the problem is, that xampp doesn't find / cannot read the php.ini file in its correct location:

here's the info I get with my phpinfo() tool in xampp.

Configuration File (php.ini) Path no value
Loaded Configuration File D:\xampplite\php\php.ini

...I check the file location, and find the php.ini file right where xampp reports to have installed it, in D:/xampplite/php/php.ini . So why does xampp still return 'no value' for php.ini?


Please please please? I'm desperate.

Re: php.ini no value

PostPosted: 11. September 2010 19:45
by mrk13
ok. u mean the first 5 lines of my index.php?
here:

<?

$displayPage = "";
$incPath = "";
$allowedPages = array(

loaded in the net, it works like it should.

Re: php.ini no value

PostPosted: 11. September 2010 19:58
by Altrea
wole wrote:(der allerschlechstete Editor für alls was mit Internet zu tun hat !!!)
Dreamveawer ist ein Abfallprodukt aus Investitionen die sich sonst nie rentieren würden.

Das ist eine sehr subjektive Meinung.
Ich kenne einige semi-professionelle Webentwickler, die mit Entwicklungen mit Dreamweaver gutes Geld verdienen und sehr produktiv und effizient entwickeln können.
Aber die Frage nach dem besten Editor ist bei Webentwicklern ja mehr eine religiöse als objektiv belegbare.

Re: php.ini no value

PostPosted: 11. September 2010 19:59
by Altrea
mrk13 wrote:ok. u mean the first 5 lines of my index.php?
here:

<?

$displayPage = "";
$incPath = "";
$allowedPages = array(

loaded in the net, it works like it should.


Search for "short_open_tags" in the board search.
This Problem is solved a million times before

Re: php.ini no value

PostPosted: 11. September 2010 20:08
by mrk13
well. i searched, and changed the value of short_open_tag from OFF to ON.

still the problem persists. what should i try next?

edit: and the xampp phpinfo() still declares 'no value' to my php.ini configuration file path.

Re: php.ini no value

PostPosted: 11. September 2010 20:11
by Altrea
There is nothing else to try.
short_open_tags IS your problem.

So either you have made something wrong in your change,
or you have forgotten to restart your Apache after the change.

The best way is not to use short_open_tags, but the full version.
Use <?php instead of <?
use <?php echo instead of <?=

Re: php.ini no value

PostPosted: 11. September 2010 20:18
by mrk13
HUGE thanks.

like i told you, i am a stupid beginner. i know nothing - well, trying to learn, at least. i didn't know i should've restarted my apache having made the change in php.ini file. i now restarted apache, and php works.

just to let u know: although i did search the forums for a good few hours, until exhaustion, i did not find the correct (thousands of them... sigh...) posts with the short_open_tag - changing instructions, until you told me. thanks for your patience, for telling it to me, once more.

phew, what a relief! ur a life saver... thank you.

Re: php.ini no value

PostPosted: 11. September 2010 20:20
by Altrea
glad it worked for you :D