-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
require_once(classes/Config.php): failed to open stream
ginerjm replied to Dianbr's topic in PHP Coding Help
Hard to follow this bunch of code, but the error is pretty self-explanatory. You are trying to find a file that is just where you think it is. The message pinpoints the line with the problem, use the info provided to check your file system to see that the reference is accurate. -
line 123 - one of the vars on that line is inappropriate for whatever is going on there. Is $handle or $ver an array perhaps and you are expecting it to be a string? line 185 is bogus - somewhere else you have a usage of 'prettyPhoto' as an index into an array variable and the array doesn't have an element by that key. Simple as that. The code you showed for this problem does not appear to be the correct chunk.
-
What errors are you getting on that line? BTW - there is a semi at the end of the line - doesn't belong there.
-
See my answer in your other posting
-
What is 'it'? Actually when I ran your code, my error message simply said it couldn't access the file - no mention of permissions. So - PHP can see the file. You (or your php session) cannot.
-
As I already told you. Actually it is a permission issue. Do you have permitted access to that folder and/or file?
-
Uhhh..... I loaded this up in my ide and cleaned up the line breaks and such and the line with that message is commented out. Don't know how you could get that message with the code as it stands. So - assuming that the mangled linefeeds and carrigage returns in the cut and paste I did of your code, I removed the comments. 1 - Do Not Use the @ character to suppress an error. If there is an error You Should Fix It, not ignore it! 2 - In order to even get to that message you had to have been shown the messages (echos) prior to that. Did you in fact get them? You said all you get is that message but I don't see how you could get to the message you state without getting the others. 3 - Obviously the file open did not work. Check your path and name. AND - as mentioned in my signature - turn on error checking which will confirm the failure of the fopen. error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1');
-
If the var is not being used, why not use it again? Just don't get confused should be opening two files at the same time. It's no different than using $I as a counter multiple times in a script.
-
As Mogosselin says - you can use the $_SESSION array. Which you are already using as I see "$_SESSION['applicant'] already in use in your code!!!
-
Unless your script intentionally 'completes in seconds" you should not have a problem except in very extreme circumstances. Scripts that do not involve tedious processes involving lots of data accesses or queries (not wrapped around a 'flock') will usually complete in much less than a second. That means you would have to have many users hitting your app regularly to reach a true impass. As long as your script is well writeen and doesn't put an unduly long lock on a resource, I would not expect any collisions. The lock is merely a tool to ensure that your script succeeds in posting its results.
-
To elaborate on digitzer's post - if you find the <input> tag that has a name attribute that suggests it is for the phone number entry, remove any associated picture attribute that is part of that tag. That would be one way it is being forced to a certain format. In fact html 5 puts out a message on screen when the user tries to enter something that doesn't fit the picture. If otoh there is no picture clause, you'll need to look thru php code for that input tag's 'name=' value and see what php is doing with the input value to enforce formatting.
-
Maybe you should show the code so that we can help you identify how the formatting is occurring now and then we can help you remove it. That's pretty constructive.
-
Took a quick look (something I don't usually do - look at att. files) and see some pretty lengthy code with queries inside your loops. Not good. Work on joining you queries up into one. Also - do you not know what the ! operator is? You constantly write if conditions that only have an else to them and no code for the 'true' condition. Try doing the reverse, as in if (!empty(xxx)) and drop the do nothing part and the else clause Your question refers to your insistence on fetching the first row before you begin your loop. That's where you are losing the first entry. Set your test variable to 'xxx' and then begin your loop without retrieving a row. The way you do it now you have already set your test var when the second row is retrieved so therefor if the county matches you won't have that first heading.
-
Just the opposite. He sets that to false so that PDO doesn't emulate, ie, use un-prepared queries, and in fact DOES use prepare queries.
-
We work with code on this forum. We are not seers so don't expect us to hypothesize and answer for you.
-
And --- Thank You!
-
Jacques1 - Thank you for giving me something I can work with. I will try this later as even us retirees have things to do besides code all day. ps - hoping that 'JSON.decode()' is a pure JS thing since I still haven't learned JQ and will most likely not do it soon. Do you have a recommended book for learning this?
-
I actually am pretty good at JS - have written a lot of it. I just don't use json at all and have no idea how a php script called via ajax is going to return the data I need. Last time I'll ask. Can you Tell me what my ajax script s/b returning? You seem to be avoiding giving me that detail.
-
YOu posted samples of jquery that I've already said I haven't yet learned. So they are not very much use to me now. That is if those examples are what you think my JS should be doing. You didn't answer my last question, nor did you explain what a 'javascript string' (your term) is. Please tell me what you want my php script to return to the ajax caller - in coding terms.
-
I do believe that the mail function requires the headers to be in the 4th (missing) parameter. For one thing you absolutely have to provide a from address there.
-
Still not getting anywhere here. So I make an ajax call to get php to gather my data as it currently does. Then what? What do I echo out for my js to then handle?
-
Since you haven't seen my script, I'm afraid I don't know what you mean by spaghetti code? My code is (imho) very well structured and does not mingle html and php and js except for where the logic drives the creation of it. In this script I use php to gather all the attributes of my files that I need to create the html img tags and pass the variable created to my html output function. Second - I have no event handlers - simply event attributes on html tags. Do you call that an event handler? Lastly - I believe I have said that I don't know how I would use an ajax-called script any differently. As many people (who know far less than I think I do) say - can you tell me what you mean in coding terms? I am very amenable to doing the right thing - I just don't know what it is.
-
Sorry - don't understand your point at all. Not at all.
-
That code is correct. Where are you getting the attributes you speak of? Are they part of the query results? If so , just use them to form your img tag. If not, how do you expect to assign them to each image?