General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old December 22nd, 2002, 05:06 AM
hal_rac hal_rac is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 8 hal_rac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question new comer questions.

i'm using PHP vers.4.3.ORC2; win2000serv.; IIS;
MySQL 3.23.47

when i wrote the following code:
<?php
$filehandler=fopen("myfile.txt","r");
$data=fread($filehandler,filesize($filehandler));
echo $data;
?>

the following parsing error was generated:
Warning: filesize() [function.filesize]: Stat failed for Resource id #1 (errno=2 - No such file or directory) in f:\inetpub\wwwroot\test.php on line 3

i found the solution 4 hours later was:
$data=fread($filehandler,filesize("myfile.txt"));
So the filename instead the filedescriptor was supposed.

also:
function_exists("isset")?1:0 returns 0!!!! at a time i find
the isset function everywhere in the tutorials.

will i be facing things like that?

i'm a new comer to PHP/MySQL. It's been 2 weeks and i'm
progressing with the speed of light cause i have a
backgroung with various programming language. but
i'm facing a lot of problems with the tutorials herein.
It's seems that there's a lot of incompatibility n
configuration issues. And a lot of time consumed on
problem solving.i'm thinking of building my own
homepage n don't know what standard i can rely on.

Any suggestions???!!!
thanks a lot and excuse for this lot of talking.

Reply With Quote
  #2  
Old December 22nd, 2002, 05:59 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
hmm why not use apache instead of IIS.
__________________
Apache Expert

Reply With Quote
  #3  
Old December 22nd, 2002, 06:08 AM
hal_rac hal_rac is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 8 hal_rac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
what's the advantage of Apache on IIS?
I have the IIS installed n configured to use
PHP after a two days struggle.
In addition i'm accustomed to use IIS, ASP...

Any Idea about the "isset " problem.

thanks asp_man.
u r so rapid.

Reply With Quote
  #4  
Old December 22nd, 2002, 11:46 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Quote:
Any Idea about the "isset " problem.

isset() is in the standard library so should be there, not sure why it would be returning false.

Use the script I attached to this post. This script will give you a complete listing of your installed libraries with each function available to the library....
Attached Files
File Type: zip phpenv.zip (27.6 KB, 322 views)
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #5  
Old December 22nd, 2002, 02:08 PM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Lindset Send a message via AIM to Lindset
It's because because isset() is a language construct and not a function
__________________
Best Regards,
Håvard Lindset

Reply With Quote
  #6  
Old December 24th, 2002, 10:57 AM
hal_rac hal_rac is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 8 hal_rac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb

Quote:
Originally posted by jpenn

isset() is in the standard library so should be there, not sure why it would be returning false.

Use the script I attached to this post. This script will give you a complete listing of your installed libraries with each function available to the library....



i've tried to use the soft. "phpenv.zip" . I changed the "u_name"
and the "u_pass". It was not possible to login from
the "index.php" page. I see the isset function in every
control structure for redirection in all the
"phpenv.___.php" pages. Am i permitted to go around
this problem by putting comments (/**/,//) on the
login parts of the code.

Also i've something to note about:
I think that:
if(($user==$_POST['u_name'])&&($password==$_POST
['u_pass']))
should better be:
if(($_POST['user']==$u_name)&&($_POST['password']==$u_pass))
What do u say?

I appreciate ur support.

Reply With Quote
  #7  
Old December 24th, 2002, 11:01 AM
hal_rac hal_rac is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 8 hal_rac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by Lindset
It's because because isset() is a language construct and not a function


I've read somewhere that "print" can be used in expressions because it can return something that "echo" does not.
Is this a construct and function issue?
I've no clear view about this.

thank you.

Reply With Quote
  #8  
Old December 24th, 2002, 12:18 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 6
Ya - you can comment out that stuff to open up the pages. That app just gives you an inside look at your settings and what modules you have installed and what functions are available to each library with direct links to each function explanation on php.net.

Lol, your note is correct. You can switch those around. Oh, cokkies must be enabled so that could be your problem with the login issue....

Reply With Quote
  #9  
Old December 26th, 2002, 05:15 AM
hal_rac hal_rac is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 8 hal_rac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb

Quote:
Originally posted by jpenn
Ya - you can comment out that stuff to open up the pages. That app just gives you an inside look at your settings and what modules you have installed and what functions are available to each library with direct links to each function explanation on php.net.

Lol, your note is correct. You can switch those around. Oh, cokkies must be enabled so that could be your problem with the login issue....


Thanks again for the soft. It's very useful. Lately i've run SQLServer stored procedure from PHP. And was wondering about
the other mssql______ series of functions. I found it all. In addition I've fond the binary collection functions i've read about. Really thanks.

I've used 75% of the tutorials found here. But a real problem is faced with every application containing logins (header()cookies,sessions) and redirections.

How can i know that COOKIES are enabled!?
(Is it in IE, Tools,internet options,security.)


thanks in advance.

Reply With Quote
  #10  
Old December 26th, 2002, 08:26 AM
Kanu Kanu is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 91 Kanu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
I'd go for Apache. It's far more suited to PHP than IIS. I sincerely dislike IIS.

Reply With Quote
  #11  
Old January 3rd, 2003, 07:33 AM
hal_rac hal_rac is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 8 hal_rac User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by jpenn
Ya - you can comment out that stuff to open up the pages. That app just gives you an inside look at your settings and what modules you have installed and what functions are available to each library with direct links to each function explanation on php.net.

Lol, your note is correct. You can switch those around. Oh, cokkies must be enabled so that could be your problem with the login issue....


this is part of the index.php from:

<?php
...
1 if(isset($_COOKIE['logstatus'])){
2 //setcookie ("logstatus","ok",time()-3600 );
3 header('location: phpenv.servervars.php');
4 exit;
5 }
6 if(isset($_POST['submit'])){
7 if(($_POST['user']==$u_name)&&($_POST['password']==$u_pass)){
8 setcookie ("logstatus","ok",time()+3600 );
9 header("location: phpenv.core.php");
10 exit;
11 }
...
<form name="form1" method="post" action="index.php">
...
?>

I'm never redirected at line 9 for the cookie is never set.
For the cookie "logstatus" to be set i need to comment
line 9. So every time i try to relogin i'm always redirected
at line 3.
I've tried to delete the cookie. So i added line 2 to the
code. I'm always redirected at line 3. The cookie is not
deleted unless i comment line 3. Again n again....

In brief, the sequence of instructions:
setcookie();
header();
is not working one after another.

I've been facing cases like this from the tutorials here
that i can report about. But this is the latest n its
straight to the point.

I appreciate your help fellow OSS programmers.
You'll know that later.

By the way excuse me for my english.
Really thanks.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > new comer questions.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway